quadlet API: fix tar install when non-quadlet file sorts first#28696
quadlet API: fix tar install when non-quadlet file sorts first#28696inknos wants to merge 1 commit into
Conversation
|
@simonbrauner , if you want to take a look at this after what we discussed today, I decided to touch the api function instead of the QuadletInstall function |
| quadlet_5=quadlet-test-5-$(cat /proc/sys/kernel/random/uuid).container | ||
| containerfile_1=quadlet-test-containerfile-1-$(cat /proc/sys/kernel/random/uuid).Containerfile | ||
| containerfile_1=quadlet-test-containerfile-1-$(cat /proc/sys/kernel/random/uuid) | ||
| configfile_1=quadlet-test-configfile-1-$(cat /proc/sys/kernel/random/uuid).conf |
There was a problem hiding this comment.
Is this file removed on cleanup?
| tar --format=posix -C "$TMPD" -cvf "$TMPD/$quadlet_7$containerfile_3.tar" "$quadlet_7" "$containerfile_3" &> /dev/null | ||
|
|
||
| t POST "libpod/quadlets" "$TMPD/$quadlet_7$containerfile_3.tar" 200 \ | ||
| '.InstalledQuadlets|length=2' \ |
|
|
||
| t GET "libpod/quadlets/$quadlet_7/file" 200 | ||
| is "$output" "$quadlet_7_content" "quadlet-7 should be installed" | ||
| is "$(cat "$quadlet_install_dir/$containerfile_3")" "$containerfile_3_content" "containerfile_3 should be installed" |
There was a problem hiding this comment.
Should ' $ configfile_1 ' also be checked?
There was a problem hiding this comment.
fixing your comments, thanks
QuadletInstall expects the quadlet file to be first in the file list, The API handler passes files in filepath.Walk order (lexicographic). Install would fail if a file like "Containerfile" comes before the quadlet file. Signed-off-by: Nicola Sella <nsella@redhat.com>
719b8e2 to
9f7216b
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
I'm not sure whether it makes more sense to fix this in
Otherwise LGTM |
QuadletInstall expects the quadlet file to be first in the file list, The API handler passes files in filepath.Walk order (lexicographic). Install would fail if a file like "Containerfile" comes before the quadlet file.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?