Skip to content

Scope wildcard content removal - #1524

Open
daviddavis wants to merge 1 commit into
pulp:mainfrom
daviddavis:distribution-component-modify-wildcards
Open

Scope wildcard content removal#1524
daviddavis wants to merge 1 commit into
pulp:mainfrom
daviddavis:distribution-component-modify-wildcards

Conversation

@daviddavis

@daviddavis daviddavis commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Define wildcard repository removal according to the supplied distribution and component selectors:

  • remove_content_units=['*'] with a specified distribution and component removes all content from that release component.
  • remove_content_units=['*'] with a specified distribution and component='*' removes all content from that distribution.
  • remove_content_units=['*'] with distribution='*' and component='*' removes all content from the repository.
  • remove_content_units=['*'] without either selector preserves the existing behavior and removes all content from the repository.

Scoped wildcards are expanded through binary and source package component relationships in the base repository version. Content that remain linked outside the selected scope are preserved, while matching relationships are removed.

Document the wildcard contract in the modify serializer and changelog, and add functional coverage for component-scoped, distribution-scoped, and complete repository removal.

Assisted-by: GitHub Copilot

@daviddavis daviddavis changed the title Scope wildcard package removal Scope wildcard content removal Sep 10, 2026
@daviddavis
daviddavis force-pushed the distribution-component-modify-wildcards branch 4 times, most recently from b184871 to 1a31fd5 Compare September 10, 2026 15:43
Define wildcard repository removal according to the supplied
distribution and component selectors:

- remove_content_units=['*'] with a specified distribution and component
  removes all content from that release component.
- remove_content_units=['*'] with a specified distribution and
  component='*' removes all content from that distribution.
- remove_content_units=['*'] with distribution='*' and component='*'
  removes every content unit from the repository.
- remove_content_units=['*'] without either selector preserves the
  existing behavior and removes every content unit from the repository.

Scoped wildcards are expanded through binary and source package
component relationships in the base repository version. Content that
remain linked outside the selected scope are preserved, while matching
relationships are removed.

Also, add validation to prevent release and components from being named
`*`, which seems unlikely but could present a real problem.

Document the wildcard contract in the modify serializer and changelog,
and add functional coverage for component-scoped, distribution-scoped,
and complete repository removal.

Assisted-by: GitHub Copilot
@daviddavis
daviddavis force-pushed the distribution-component-modify-wildcards branch from 1a31fd5 to c66dd80 Compare September 10, 2026 20:03
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.

1 participant