-
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
Fix conflict on heredoc temp files #5721
base: main
Are you sure you want to change the base?
Fix conflict on heredoc temp files #5721
Conversation
If two image builds start concurrently and they both use an heredoc with the same EOF marker, then they will use the same filename and overwrite each other. It's possible for concurrent builds to either use the wrong heredoc content or to fail because the file of one build is deleted by the other, leading to this error message: ``` STEP 13/21: COPY <<EOF /file.conf Error: building at STEP "COPY <<EOF /file.conf": reading "/var/tmp/EOF": copier: get: globs [/EOF] matched nothing (0 filtered out): no such file or directory ``` Signed-off-by: Kevin Michel <[email protected]>
I would like to add tests but I'm not familiar with the project, what would be the best place to add these ? (I've tried adding to |
A friendly reminder that this PR had no activity for 30 days. |
@edsantiago thoughts on tests ? |
I see no reason for tests. However, @kmichel-aiven , could you please clean up your git commit, and rebase? |
57c134c
to
aba0beb
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kmichel-aiven The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@flouthoc if you get a minute to look at this one, I'd appreciate it. |
This isn't going to work as intended when the destination for a COPY with a heredoc is a directory - the destination file's name should be the same as the delimiter, and |
What type of PR is this?
/kind bug
What this PR does / why we need it:
If two image builds start concurrently and they both use an heredoc with the same EOF marker, then they will use the same filename and overwrite each other.
It's possible for concurrent builds to either use the wrong heredoc content or to fail because the file of one build is deleted by the other, leading to this error message:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?