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
enable building without varlink
tag
#6353
enable building without varlink
tag
#6353
Conversation
☔ The latest upstream changes (presumably #6341) made this pull request unmergeable. Please resolve the merge conflicts. |
e4e49cb
to
312d2b6
Compare
varlink
tagvarlink
tag
06f289d
to
de29580
Compare
varlink
tagvarlink
tag
cf63127
to
1f802a2
Compare
varlink
tagvarlink
tag
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.
Really nice work. Just one question.
.PHONY: varlink_generate | ||
ifneq (or $(findstring varlink,$(BUILDTAGS)),$(findstring varlink,$(BUILD_TAGS))) |
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'm super rusty on Makefile magic, but this doesn't look right to me. Are you looking for varlink
in either of those two variables? If so would this work?
ifneq (,$(findstring varlink,$(BUILDTAGS) $(BUILD_TAGS)))
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.
yes, I'm looking for varlink in those two. I'll give that a try, thanks!
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.
there seems to be some integration test issues that I'm looking into as well.
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.
make lint
fails with:
# $BUILD_TAGS variable is used in hack/golangci-lint.sh
.PHONY: varlink_generate
-ifneq (or $(findstring varlink,$(BUILDTAGS)),$(findstring varlink,$(BUILD_TAGS)))
+ifneq (,$(findstring varlink,$(BUILD_TAGS) $(BUILDTAGS)))
varlink_generate: .gopathok pkg/varlink/iopodman.go ## Generate varlink
else
varlink_generate:
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.
Probably some magic syntax detail I'm missing.
Well, does the or
format work? If you run make
with varlink in either variable, does it trigger the desired varlink_generate?
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.
The or
format works well for make lint
. I don't need to specify varlink
buildtag for tunnel and abi as it will automatically use it from the golangci-lint.sh file. Both make
and `make BUILDTAGS='varlink' work correctly as well.
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.
OK - sorry to have muddled things. LGTM, thanks.
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.
btw, what you suggested I think should work as well, which is what seems to be suggested in the official make doc, but for whatever reason it doesn't seem to work in this case. Maybe more eyes would help..
1f802a2
to
12302dc
Compare
Btw, I guess in the default case, it will now skip varlink build and tests. Let me know if CI needs to continue testing for the varlink case as well. |
Hmmm. CI is not happy, and it doesn't look (at first glance) like a flake:
|
err, yes that's a consequence of me wrapping test/endpoint/endpoint.go inside varlink buildtag. Could someone please let me know if |
There is no way I can answer that but I'm going to jump in anyway: a quick |
68cfda3
to
e385635
Compare
I added conditional to skip endpoint tests if no varlink buildtag found. |
554652b
to
cde93cd
Compare
Issue gh#6286 was already fixed in a prior commit but the Makefile still ran some varlink steps by default. This commit makes any varlink build steps dependent on the varlink build tag and also makes the contrib rpm spec file independent of varlink. Endpoint tests will be run only if BUILDTAGS contains varlink. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
cde93cd
to
8a914e8
Compare
LGTM |
It would be nice to split out the varlink code into a separate Makefile.Varlink. And then optionally include it if necessary. That might cleanup the Makefile. /lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lsm5, rhatdan 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 |
default build without
varlink
tagIssue gh#6286 was already fixed in a prior commit but the Makefile still
ran some varlink steps by default.
This commit makes any varlink build steps dependent on the varlink
build tag and also makes the contrib rpm spec file independent of
varlink.
Signed-off-by: Lokesh Mandvekar lsm5@fedoraproject.org