Skip to content

Add migrate endpoint for push repositories#2406

Draft
gerrod3 wants to merge 2 commits into
pulp:mainfrom
gerrod3:migrate-push
Draft

Add migrate endpoint for push repositories#2406
gerrod3 wants to merge 2 commits into
pulp:mainfrom
gerrod3:migrate-push

Conversation

@gerrod3

@gerrod3 gerrod3 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a migrate action on push repositories that dispatches a task to convert ContainerPushRepository into ContainerRepository
  • Support optional copy_versions to preserve full repository version history (defaults to copying only the latest version)
  • Reassociate distributions, return the created repository in the task result, and add functional test coverage

Test plan

  • Run pytest pulp_container/tests/functional/api/test_migrate_push_repository.py
  • Verify POST /pulp/api/v3/repositories/container/container-push/{pk}/migrate/ returns 202 and completes successfully
  • Confirm migrated repository appears under container repositories with preserved content and distribution link
  • Test copy_versions: true when multiple repository versions exist

Made with Cursor

Provide an async API to convert legacy ContainerPushRepository instances into ContainerRepository while preserving content and distribution links.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify copy_versions semantics, warn about in-flight uploads, and cover post-migrate push plus full version history replay.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant