-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix native go build #5799
Fix native go build #5799
Conversation
Suppressing Go 1.16 warning: 'go build: -i flag is deprecated' Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
The installation path for node-labeller.sh is /usr/bin. Dont call it from /bin assuming the directories are symlinked. Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
Don't build virtctl for darwin and windows if LINUX_ONLY env var is defined. Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes
/lgtm
One question I have still: what is the use case for injecting a custom manifest-templator?
@dhiller , its not for a 'custom' templator. The issue for us is that kubevirt/hack/build-manifests.sh Lines 35 to 37 in 37ec453
Unfortunately bazel does not work well in our build environemnt as it tends to pull many dependencies from the web (which we do not need in general since we provide our own containers). The idea to work it around is to prebuilt the default templator using native go
|
It may probably still not be the best option for you to build, but note that offline building would be possible by pre-fetching dependencies and pointing bazel to directory with them via |
Thanks for the suggestion. I've already looked a bit into that direction. Indeed it is possible to setup offline builds with bazel. But in fact we do not need most of the dependencies like e.g. RPMs and exteranl modules since at the end we build our own container images. We really need only the binaries and currently the easiest way to get those is by using native go build. |
hack/build-manifests.sh
Outdated
bazel run \ | ||
--config=${HOST_ARCHITECTURE} \ | ||
//:build-manifest-templator -- ${templator} | ||
templator=${MANIFEST_TEMPLATOR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A clear indicator if one wants to use bazel
or go
would be something I would prefer. It a little bit a mix-and-match with unclear fallback paths for some users. Could you improve that a little?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about moving the build of manifest-templator
tool to a separate make target. Or even better: include it in the bazel-build
/ go-build
. That way hack/build-manifests.sh
can only do the manifests generation. What do you think? Is there any reason to keep bazel run ... //:build-manifest-templator ...
here?
@rmohr , I refactored it a bit to make the bazel
/ go
choice more obvious. Does it now look similar to what you would expect here? Hope I understood your comment correctly...
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
0bb6696
to
fc120d8
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rmohr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The PR includes several fixes for native Go build (without Bazel):
-i
go build flag (to suppress warning)Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #5602
Special notes for your reviewer:
Release note: