Skip to content

Add --distribution filter to container content list.#1443

Open
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:issue-2164-distribution-content-filter
Open

Add --distribution filter to container content list.#1443
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:issue-2164-distribution-content-filter

Conversation

@gerrod3

@gerrod3 gerrod3 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Resolve the served repository version from a distribution so users can list tags and other content for an image without manual lookup steps.

Ref: pulp/pulp_container#2164

@gerrod3 gerrod3 force-pushed the issue-2164-distribution-content-filter branch 2 times, most recently from 32a9791 to 0a58401 Compare July 9, 2026 21:07

@mdellweg mdellweg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should rebase and probably squash the last two commits.

Comment thread src/pulpcore/cli/container/content.py Outdated
Comment on lines +62 to +67
if "/container-push/" in repository_href:
repo_ctx: PulpRepositoryContext = PulpContainerPushRepositoryContext(
pulp_ctx, pulp_href=repository_href
)
else:
repo_ctx = PulpContainerRepositoryContext(pulp_ctx, pulp_href=repository_href)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The common base class wouldn't let us do this, right?

if version is not None:
if distribution["repository"]:
distribution_ctx.update(body={"repository": ""}, non_blocking=non_blocking)
distribution_ctx.update(body={"repository": ""}, non_blocking=False)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does the server still not allow to update these in one go?

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.

I believe it does, just my AI agent still struggling to test the code against my dev env and trying random stuff till CI passes.

Do we need the CLI to support pulpcore<3.24? I've removed the inbetween updates with the correct approach the API accepts.

Comment thread src/pulpcore/cli/container/content.py Outdated
Comment on lines +74 to +75
if not distribution:
return

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do you think about inverting the if here?
This currently looks like an if with only a disguised else branch.

@gerrod3 gerrod3 force-pushed the issue-2164-distribution-content-filter branch from 3637f5b to 3f5786b Compare July 15, 2026 18:58
@gerrod3 gerrod3 force-pushed the issue-2164-distribution-content-filter branch 2 times, most recently from f73decd to 9241c73 Compare July 15, 2026 21:35
Resolve the served repository version from a distribution so users can list
tags and other content for an image without manual lookup steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gerrod3 gerrod3 force-pushed the issue-2164-distribution-content-filter branch from 9241c73 to dd6f418 Compare July 15, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants