pulp / pulp/pulpcore

Retain repo version is not encouraged in Pulp Replica servers

Open
#7,022 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Version
pulpcore == 3.73.1
pulp_rpm == 3.29.0

Describe the bug
In the master upstream pulp server the retain repo version is set to 1/some value for many of the repositories. The retainr epo versions is not set in the replica server, hence all versions are maintained in the pulp replica server.

To Reproduce
Pulp replication from upstream pulp server.

Expected behavior
Replicate the repository versions from the upstream pulp server to the replica server also.

Additional context
Retain repo version is set to 1 in upstream pulp server.
{ "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/018deee6-c05e-74d4-a768-ae6aa12c1186/", "prn": "prn:rpm.rpmrepository:018deee6-c05e-74d4-a768-ae6aa12c1186", "pulp_created": "2024-02-28T08:48:36.449454Z", "pulp_last_updated": "2025-10-14T18:51:35.875569Z", "versions_href": "/pulp/api/v3/repositories/rpm/rpm/018deee6-c05e-74d4-a768-ae6aa12c1186/versions/", "pulp_labels": {}, "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/018deee6-c05e-74d4-a768-ae6aa12c1186/versions/265/", "name": "source_lrh8_baseos_x86_64", "description": null, "retain_repo_versions": 1, "remote": "/pulp/api/v3/remotes/rpm/rpm/018deee6-b18f-7217-a3ee-b6517a65fb45/", "autopublish": false, "metadata_signing_service": null, "package_signing_service": null, "package_signing_fingerprint": null, "retain_package_versions": 0, "checksum_type": null, "metadata_checksum_type": null, "package_checksum_type": null, "gpgcheck": null, "repo_gpgcheck": null, "sqlite_metadata": false, "repo_config": {}, "compression_type": null, "layout": null }
There are 122 repository versions in the Pulp replica server
{ "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/01964640-6f43-71f4-bc0c-2b2bc66c59b5/", "prn": "prn:rpm.rpmrepository:01964640-6f43-71f4-bc0c-2b2bc66c59b5", "pulp_created": "2025-04-18T00:15:50.084713Z", "pulp_last_updated": "2025-10-14T02:25:16.742161Z", "versions_href": "/pulp/api/v3/repositories/rpm/rpm/01964640-6f43-71f4-bc0c-2b2bc66c59b5/versions/", "pulp_labels": { "UpstreamPulp": "0196463e-55e1-72bb-a2ed-738161ade2cd" }, "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/01964640-6f43-71f4-bc0c-2b2bc66c59b5/versions/121/", "name": "source_lrh8_baseos_x86_64", "description": null, "retain_repo_versions": null, "remote": null, "autopublish": false, "metadata_signing_service": null, "package_signing_service": null, "package_signing_fingerprint": null, "retain_package_versions": 0, "checksum_type": null, "metadata_checksum_type": null, "package_checksum_type": null, "gpgcheck": null, "repo_gpgcheck": null, "sqlite_metadata": false, "repo_config": {}, "compression_type": null, "layout": null }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Pulp replication from the upstream server and compare the repository settings and versions shown in the issue. Trace how the upstream retain_repo_versions value is handled when the replica repository is created or updated. Done means the replica retains the upstream setting of 1 and does not accumulate all 122 repository versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.