-
Notifications
You must be signed in to change notification settings - Fork 782
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
Pass cwd for hooks exec run function #4871
base: main
Are you sure you want to change the base?
Pass cwd for hooks exec run function #4871
Conversation
3289545
to
4092e4e
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fangpenlin, TomSweeneyRedHat 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 |
Now that containers/common#1521 has merged, are there adjustments necessary for this PR? |
@TomSweeneyRedHat yeah, changes are needed, I will update it later tonight |
4092e4e
to
d4204e8
Compare
@TomSweeneyRedHat I have updated the PR with the new method I added in common lib. I guess I can only wait until they merge it and make a new one then? By the way, should I check-in vendor changes in my PR? I saw that they were not excluded from the Git repo |
@fangpenlin This needs a rebase. |
d4204e8
to
66d5fe4
Compare
@rhatdan Rebased. But I saw there's a |
I would only worry about the lint check if lint is blowing up. Looks like tests are failing though. |
6185ee6
to
715ae4d
Compare
@fangpenlin c/common v0.54.0 has been created fwiw. I'm trying to vendor it now into Buildah, but I'm having some machine issues. doing so. |
@fangpenlin Still working on this? |
Oh, sorry, forgot this one. Just rebased |
715ae4d
to
e3adeb1
Compare
LGTM |
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.
Commit subject is too long, CI is blocked because of it. Could you please amend commit subject.
Remove [NO NEW TESTS NEEDED] from commit message, you should be all set then. |
Signed-off-by: Fang-Pen Lin <[email protected]>
e3adeb1
to
b38a391
Compare
Okay, done. What about now? |
@rhatdan the Smoke Test says this
Should I add the |
@fangpenlin |
I am not too familiar with buildah code base. But I did a quick search and it seems like the Line 169 in 8aa4d36
Line 182 in 8aa4d36
buildah/imagebuildah/stage_executor.go Line 661 in 8aa4d36
So I guess as long as the existing tests run very basic building image stuff, that path should be touched at some point. The only thing missing is that we didn't test specifically for the cwd part. Personally I would rely more on the test cases from upstream project However, if a specific test is really needed, I can find a time to add it. Maybe test against |
A friendly reminder that this PR had no activity for 30 days. |
What type of PR is this?
For fixing the wrong cwd bug in podman:
containers/podman#18907
What this PR does / why we need it:
I added a new
cwd
argument for run hooks in common package:containers/common#1514
for fixing cwd not set bug of poststop hook exec run in podman:
containers/podman#18907
It seems like buildah also depends on the same function and also call hooks exec, so this PR fixes the issue altogether.
How to verify it
Run unit tests
Which issue(s) this PR fixes:
Fixes containers/podman#18907
Special notes for your reviewer:
This PR depends on containers/common#1514 to be merged. Sorry first time contributor, I am not sure what's the correct workflow to make changes in upstream
common
repo. I assume I should create a new PR in common repo first, then wait for a new release fromcommon
then update the vendor file in this repo to make it depends on the changes I made in common?Does this PR introduce a user-facing change?
Yes, after this PR merged, the cwd of hook exec called by buildah will be the bundle dir (the one containing OCI spec
config.json
file) instead of current cwd from invoking buildah command.