-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading from v0.15.2 to v0.16.0 breaks types generation #2744
Comments
Someone else on my dev team has confirmed the same process fails for him:
|
I tried to generate a new project and experience the same issue.
From reading through #1854 (comment) I tried the "workaround" of manually exporting However: Why is this failing on an upgrade from v0.15.2 to v0.16.0, when I did not need to manually export This seems to be an |
Digging through the repo history and issues, I think I found an explanation by @joelanford here:
It looks like there was a proposal to fix this so that end-users who download the release (versus building from source) will not need to worry about setting Is this something the project is still open to? |
@aharbis Absolutely. Sorry that got lost in the holiday ether! Would you be interested in submitting a PR? If not, I will. This has been coming up quite often and would be nice to finally fix for folks. |
@joelanford No worries! Sure, I'd be happy to. I'll try to put something together this week. |
If the user's GOROOT does not match the GOROOT used to build the binary, they would be required to explicitly set the GOROOT env variable to their go env GOROOT. To avoid this step for end-users we can explicitly pull the GOROOT from go env and explicitly set the GOROOT env variable. Fixes: operator-framework#2744
@joelanford Submitted PR #2754 with a proposed fix. |
* cmd/operator-sdk/internal: explicitly set GOROOT If the user's GOROOT does not match the GOROOT used to build the binary, they would be required to explicitly set the GOROOT env variable to their go env GOROOT. To avoid this step for end-users we can explicitly pull the GOROOT from go env and explicitly set the GOROOT env variable. Fixes: #2744
Type of question
Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk?
Support on upgrading to v0.16.0 from v0.15.2.
Question
What did you do?
In our project we are working on migrating from Operator SDK v0.15.2 to v0.16.0, following the migration guide. After upgrading my
operator-sdk
binary to v0.16.0, theoperator-sdk generate k8s
step fails in our build process.What did you expect to see?
Following the migration guide, we should expect to see a successful upgrade to v0.16.0 without any breaking changes to our CRD types.
What did you see instead? Under which circumstances?
The error reported is as follows (project name/repo redacted):
This particular error:
has been seen before, and I've found a handful of previous issues in this repo with this error. However, none of those solutions seem to apply here.
Environment
N/A
N/A
Additional context
For reference,
GOROOT
is set appropriately as reported bygo env
:It's worth also noting that for some reason this build is passing in our Travis CI, with v0.16.0
operator-sdk
binary. So I'm certainly not claiming this is not a local env issue; however, I'm not sure what is breaking on the version upgrade.Our project builds fine on v0.15.2 in my local env.
As for package dependencies, since I know that's also been a sort of cause for this kind of error, we are pulling in another internal package (not a public go pkg) from our GitHub Enterprise repos. In order for this to work, we set a
git config
rule to useurl.[new].insteadof=[old]
to handle pulling in the repo(s) via SSH instead of HTTPS. We also use this same config in Travis CI, which works fine.The text was updated successfully, but these errors were encountered: