quadlet API: fix tar install when non-quadlet file sorts first#28696
Open
inknos wants to merge 1 commit into
Open
quadlet API: fix tar install when non-quadlet file sorts first#28696inknos wants to merge 1 commit into
inknos wants to merge 1 commit into
Conversation
Collaborator
Author
|
@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 |
Honny1
reviewed
May 14, 2026
| 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 |
Member
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" |
Member
There was a problem hiding this comment.
Should ' $ configfile_1 ' also be checked?
Collaborator
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?