Skip to content

Prepare plugin for v4 API - #1326

Merged
ggainey merged 1 commit into
pulp:mainfrom
aKlimau:prep-for-v4
Aug 13, 2026
Merged

Prepare plugin for v4 API#1326
ggainey merged 1 commit into
pulp:mainfrom
aKlimau:prep-for-v4

Conversation

@aKlimau

@aKlimau aKlimau commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Update viewsets to accept **kwargs, fix hardcoded v3 urls.
https://redhat.atlassian.net/browse/PULP-2189

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@github-actions github-actions Bot added no-changelog no-issue multi-commit Add to bypass single commit lint check labels Aug 11, 2026
@aKlimau aKlimau changed the title Prepare viewsets for v4 Prepare plugin for v4 API Aug 11, 2026
Comment thread pulp_python/app/management/commands/repair-python-metadata.py Outdated
r = re.compile(
rf"""
(?:{settings.API_ROOT}(?:[-_a-zA-Z0-9]+/)?api/v3/repositories/python/python/[-a-f0-9]+/)
(?:{settings.API_ROOT}(?:[-_a-zA-Z0-9]+/)?api/v\d+/repositories/python/python/[-a-f0-9]+/)

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.

👍

@ggainey ggainey 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.

Change looks good - approved

@jobselko

Copy link
Copy Markdown
Member

test_domain_object_creation in test_domains.py hardcodes v3 in an assertion

@ggainey

ggainey commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

test_domain_object_creation in test_domains.py hardcodes v3 in an assertion

Yes - but that's a global issue. See https://redhat.atlassian.net/browse/PULP-2220 - I want us to have a way for the tests to know what version of the API they are running against, so we can replace assertions with '/v3/' in them with something like '/VERSION/' and have everything Just Work.

Asserting on strings that don't require the version-part, or substituting /v\d+/, is fine as well - but def want 2220 in next sprint, so we can have more-version-aware testing :)

@jobselko

Copy link
Copy Markdown
Member

@ggainey Thanks for the clarification! So are you ok with fixing the test now? Or should we revert the change?

@github-actions github-actions Bot removed the multi-commit Add to bypass single commit lint check label Aug 13, 2026
@ggainey

ggainey commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@ggainey Thanks for the clarification! So are you ok with fixing the test now? Or should we revert the change?

Current state is fine. Since the test is really "does the domain-name show up in the HREF", and doesn't actually care about the version, this is better at defining what we're actually testing for. So we're good :)

@ggainey
ggainey merged commit 8f2deda into pulp:main Aug 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants