Skip to content

Add podman-remote quadlet command#29088

Open
inknos wants to merge 1 commit into
podman-container-tools:mainfrom
inknos:RUN-4852
Open

Add podman-remote quadlet command#29088
inknos wants to merge 1 commit into
podman-container-tools:mainfrom
inknos:RUN-4852

Conversation

@inknos

@inknos inknos commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://redhat.atlassian.net/browse/RUN-4852

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Add quadlet support to podman-remote

@github-actions github-actions Bot added the kind/api-change Change to remote API; merits scrutiny label Jun 30, 2026
@inknos

inknos commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@Honny1 here's the new PR for quadlets after the app were added

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some comments and also tried check some causes of failures.

func (ic *ContainerEngine) QuadletPrint(_ context.Context, _ string) (string, error) {
return "", errNotImplemented
func downloadToTemp(fileURL string) (string, error) {
resp, err := http.Get(fileURL) //nolint:gosec,noctx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if that file doesn't exist and it will get a 404 or 500?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, I will address it

Comment thread pkg/domain/infra/tunnel/quadlet.go Outdated
groups := groupByQuadletFile(allFiles)

for _, group := range groups {
installReport, err := quadlets.Install(ic.ClientCtx, group, options)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, is this right? Each call of this will trigger a systemd reload.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing

Comment thread pkg/domain/infra/tunnel/quadlet.go Outdated
Comment on lines +215 to +224
if cd != "" {
const prefix = "filename="
if idx := strings.Index(cd, prefix); idx != -1 {
filename := cd[idx+len(prefix):]
filename = strings.Trim(filename, "\"'")
if filename != "" {
return filename
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using: mime.ParseMediaType(cd)

Comment thread pkg/domain/infra/tunnel/quadlet.go Outdated
return nil, nil, fmt.Errorf("cannot stat %s: %w", arg, err)
}
if info.IsDir() {
entries, err := os.ReadDir(arg)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use filepath.WalkDir?

Comment thread pkg/bindings/quadlets/quadlets.go
Comment thread pkg/domain/infra/tunnel/quadlet.go Outdated
QuadletErrors: make(map[string]error),
}

allFiles, cleanup, err := resolveInstallPaths(pathsOrURLs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if opts.Application is set and pathsOrURLs dir structure?

@inknos inknos force-pushed the RUN-4852 branch 2 times, most recently from 1a0be6f to 8fd8f35 Compare July 13, 2026 16:35
@inknos

inknos commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

addressed comments, pushed, error, rebased, pushed again

Fixes: https://redhat.atlassian.net/browse/RUN-4852

Signed-off-by: Nicola Sella <nsella@redhat.com>
@Honny1 Honny1 added the bloat_approved Approve a PR in which binary file size grows by over 50k label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat_approved Approve a PR in which binary file size grows by over 50k kind/api-change Change to remote API; merits scrutiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants