-
Notifications
You must be signed in to change notification settings - Fork 785
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
Handle RUN --mount with relative targets and no configured workdir #5798
Handle RUN --mount with relative targets and no configured workdir #5798
Conversation
3a001da
to
fa452a1
Compare
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.
code LGTM but I think the test should actually check that they get mounted correctly
tests/bud.bats
Outdated
echo RUN --mount=type=bind,src=Containerfile,target=Containerfile pwd >> ${TEST_SCRATCH_DIR}/Containerfile | ||
echo RUN --mount=type=cache,target=cachesubdir pwd >> ${TEST_SCRATCH_DIR}/Containerfile | ||
echo RUN --mount=type=tmpfs,target=tmpfssubdir pwd >> ${TEST_SCRATCH_DIR}/Containerfile | ||
run_buildah build ${TEST_SCRATCH_DIR} |
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 feel like this should actually verify that these mounts are actually mounted at the proper expected target?
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.
Updated.
fa452a1
to
1f91b7a
Compare
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, nalind 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 |
When the target location of a RUN --mount is specified as a relative path, we normally try to convert it to an absolute path by combining it with the currently-configured working directory. If there is no such value, though, the result is still not an absolute path. Work around this by using "/" when the configured working directory is "". Set this field in the `runMountInfo` struct on FreeBSD, as we already did on Linux. Signed-off-by: Nalin Dahyabhai <[email protected]>
1f91b7a
to
701d6bb
Compare
Rebased. |
/lgtm |
0787ba6
into
containers:main
What type of PR is this?
/kind bug
What this PR does / why we need it:
When the target location of a RUN --mount is specified as a relative path, we normally try to convert it to an absolute path by combining it with the currently-configured working directory. If there is no such value, though, the result is still not an absolute path. Work around this by using "/" when the configured working directory is "".
Set this field in the
runMountInfo
struct on FreeBSD, as we already did on Linux.How to verify it
New integration test!
Which issue(s) this PR fixes:
Fixes #5738
Special notes for your reviewer:
Does this PR introduce a user-facing change?