Skip to content

[PULP-2500] Deactivate local DistributedPublication in favour of pulpcore's - #1546

Merged
quba42 merged 1 commit into
pulp:mainfrom
pedro-psb:phase-out-distributed-publications
Oct 9, 2026
Merged

quba42 merged 1 commit into
pulp:mainfrom
pedro-psb:phase-out-distributed-publications

Conversation

@pedro-psb

Copy link
Copy Markdown
Member

This deactivates the use of DistributedPublication, as the content app is already using pulpcore's version effectively. It doesn't remove the tables (yet) to ensure zero-downtime-upgrades don't fail. That should be done in a future commit/release.

Closes: #1430
Assisted-by: GPT-6-Luna

📜 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

@pedro-psb
pedro-psb force-pushed the phase-out-distributed-publications branch from f533db6 to 4d5a872 Compare October 6, 2026 20:43
Comment thread pulp_deb/tests/unit/test_distributed_publication_migration.py
@pedro-psb

pedro-psb commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

This doesnt add new functional test, because the existing tests for distributed content should just keep working:

def test_download_cached_content(
deb_init_and_sync,
deb_distribution_factory,
deb_publication_factory,
deb_fixture_server,
download_content_unit,
http_get,
deb_get_content_types,
deb_modify_repository,
):
"""Verify that previously published content can still be downloaded."""
# Create/sync a repo and then a distro
repo, _ = deb_init_and_sync()
distribution = deb_distribution_factory(repository=repo)
deb_publication_factory(repo, structured=True, simple=True)
# Find a random package and get its hash digest
package_content = deb_get_content_types("apt_package_api", DEB_PACKAGE_NAME, repo)
package = choice(package_content)
url = deb_fixture_server.make_url(DEB_FIXTURE_STANDARD_REPOSITORY_NAME)
package_hash = hashlib.sha256(http_get(urljoin(url, package.relative_path))).hexdigest()
# Remove content and republish
deb_modify_repository(repo, {"remove_content_units": ["*"]})
deb_publication_factory(repo, structured=True, simple=True)
# Download the package and check its checksum
content = download_content_unit(distribution.base_path, package.relative_path)
content_hash = hashlib.sha256(content).hexdigest()
assert package_hash == content_hash

@pedro-psb pedro-psb changed the title Deactivate local DistributedPublication in favour of pulpcore's [PULP-2500] Deactivate local DistributedPublication in favour of pulpcore's Oct 7, 2026

@quba42 quba42 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given this is a follow up/cleanup task for #925, the tests have remained green, I trust those involved, and I also don't use this feature myself, I am tempted to wave this through.

However, before I do, I would like to give the original contributor of the original change @daviddavis, as well as his teammate @acheng-01 (whom it is my understanding has inherited David's role from then) a chance to weigh in.

Do either of you want to review this before I end up simply approving and merging it?

@acheng-01

Copy link
Copy Markdown

Given this is a follow up/cleanup task for #925, the tests have remained green, I trust those involved, and I also don't use this feature myself, I am tempted to wave this through.

However, before I do, I would like to give the original contributor of the original change @daviddavis, as well as his teammate @acheng-01 (whom it is my understanding has inherited David's role from then) a chance to weigh in.

Do either of you want to review this before I end up simply approving and merging it?

Give me today to review for any potential breaking issues on our end. I'll report back in a bit.

@acheng-01 acheng-01 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Relatively low-risk upgrade path.

@pedro-psb

Copy link
Copy Markdown
Member Author

Thanks for the review.
I'll just update the test to be skipped then.

This deactivates the use of DistributedPublication, as the content app
is already using pulpcore's version effectively. It doesn't remove the
tables (yet) to ensure zero-downtime-upgrades don't fail. That should
be done in a future commit/release.

Closes: pulp#1430
Assisted-by: GPT-6-Luna
@pedro-psb
pedro-psb force-pushed the phase-out-distributed-publications branch from 4d5a872 to 050ebc0 Compare October 8, 2026 20:14
@quba42
quba42 merged commit f0905ba into pulp:main Oct 9, 2026
14 checks passed
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.

Hoisting Distributed Publication to pulpcore

3 participants