-
Notifications
You must be signed in to change notification settings - Fork 2.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
buildah bud tests: better handling of remote #16384
buildah bud tests: better handling of remote #16384
Conversation
When I first enabled buildah-bud tests under podman-remote (containers#9887), I got one aspect all wrong: I added a podman-remote() helper function to match the podman() one. Turns out it's never actually called, even when $PODMAN_BINARY=podman-remote, because functions/aliases don't work that way. The way it works is, those few cases in which bud.bats runs podman are not magically remapped to podman-remote, they use the podman() function. That's where we need to check if we're using podman-remote, and that's where we need to remove the registry-and-rootdir options. With this fix, we can reenable two previously-skipped bud tests. Signed-off-by: Ed Santiago <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago 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 |
LGTM |
/lgtm |
I'm not sure I understand your question. If I interpret correctly, you're asking if we can change the buildah tests themselves? This is one of the places that calls podman: (the other is almost identlcal). How would you propose changing those tests? |
...and why does github sometimes show a nice inline excerpt of the lines in question, and other times just a plain link? |
I am saying why not apply
To builders/test/helpers.bash |
Oh! Separation. My thinking at the time was, I don't want buildah knowing anything about podman-remote or about the test-buildah-bud-under-podman environment. Revisiting my decision just now... I still think it stands. I know it's ugly to have these diffs in the podman repo, but I find it uglier to have that code in buildah where it will never be needed. I'm willing to hear arguments in favor, though. @nalind @flouthoc WDYT? |
The question is: should the podman-remote diffs be incorporated into |
My personal vote will be no for this, since in ideal world buildah should not be even aware about podman except the public api changes. We already use this philosophy in code I think tests should do the same, shouldn't it ? But this is just my opinion and if we have a strong reason to do otherwise then I'm cool with it. @nalind WDYT ? |
When I first enabled buildah-bud tests under podman-remote (#9887),
I got one aspect all wrong: I added a podman-remote() helper function
to match the podman() one. Turns out it's never actually called,
even when $PODMAN_BINARY=podman-remote, because functions/aliases
don't work that way.
The way it works is, those few cases in which bud.bats runs
podman are not magically remapped to podman-remote, they use
the podman() function. That's where we need to check if
we're using podman-remote, and that's where we need to
remove the registry-and-rootdir options.
With this fix, we can reenable two previously-skipped bud tests.
Signed-off-by: Ed Santiago [email protected]