-
Notifications
You must be signed in to change notification settings - Fork 254
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
🌱 E2E: Add build tags #2042
🌱 E2E: Add build tags #2042
Conversation
Maybe also worth mentioning that at least CAPO and CAPA also uses the |
/cc @mquhuy @kashifest I would value your input on this |
@lentzi90: GitHub didn't allow me to request PR reviews from the following users: on, would, your, input, I, value, this. Note that only metal3-io members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This would be useful. Thanks for adding it.
Do we need to change something for this? I can see we only run golangci-lint locally, we dont build/tag anything? |
|
||
.PHONY: build-vbmctl | ||
build-vbmctl: | ||
cd test; go build --tags=e2e,vbmctl -ldflags $(LDFLAGS) -o $(abspath $(BIN_DIR)/vbmctl) ./vbmctl/main.go |
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.
Do we also add build-vbmctl
as part of build
phony, as I see build-e2e
is there.
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 think it is better to leave it. If we add it htere, then libvirt-dev would be needed for make build
. We will anyway build this code as part of the e2e pipeline.
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.
Hmm now I wonder if we should do the same for golanci-lint also. It is not so nice to have them behave differently.
make lint
-> lint everythingmake build
-> build everything except vbmctl
/retest |
/hold |
If we want golangci-lint to check the code that binds to libvirt there is no way around it unfortunately. I'm not sure how golangci-lint works, but in some sense it must be building the code because it sees the same error as We could chose to split the linting so that We could for example have it like this:
|
691017b
to
fdbe6d5
Compare
This makes use of build tags for the e2e tests and related tools. The goal is to make it easier to compile and develop BMO by relaxing the requirement for libvirt bindings. They are now only needed when working on the relevant code. One exception is golangci-lint. In order for it to go through all code, we need to include the build tags when running the linters. Developers that want to run golangci-lint will need the libvirt bindings. Signed-off-by: Lennart Jern <[email protected]>
fdbe6d5
to
ceb01bf
Compare
/retest |
1 similar comment
/retest |
These fixture test failures are driving me mad... Attempting to fix in #2043 |
No strong preference from me, but imo it would be good to not have to install libvirt-dev in the lint job. We could repurpose the current lint workflow to be the lint-e2e, and config it so that it only runs when we edit the code inside the Otherwise, I think this PR is a nice improvement. Not sure if any developer will ever work on this repo without installing |
/retest |
/lgtm |
/hold cancel I'm still open to discuss how we handle the linters, but if you are happy like this, then lets merge @kashifest |
Lets merge it and see if the we need a change in the linter once we hit an issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest 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 |
/test test |
/test test |
/retest |
We seem to be hitting the golanci-lint deadline. Fixing here: #2046 |
This makes use of build tags for the e2e tests and related tools. The goal is to make it easier to compile and develop BMO by relaxing the requirement for libvirt bindings. They are now only needed when working on the relevant code.
One exception is golangci-lint. In order for it to go through all code, we need to include the build tags when running the linters. Developers that want to run golangci-lint will need the libvirt bindings.
What this PR does / why we need it:
Developer doesn't have libvirt-dev installed and runs
make unit
->