[PULP-1045] Add support for serving superseded publications for a retention period#7546
[PULP-1045] Add support for serving superseded publications for a retention period#7546
Conversation
4b940b8 to
2ad945c
Compare
2ad945c to
c87f525
Compare
|
Can you make sure this doesn't collide with https://github.com/pulp/pulp_deb/blob/main/pulp_deb/app/models/publication.py#L136 |
I've tested with pulp_deb running alogside. There was a collision with the reverse relationship name, then I've simply renamed the reverse relationship. I'll create a test PR on deb to be sure.
Yes, I'll open an issue there and start a conversation. |
|
The test PR is fine: pulp/pulp_deb#1429 |
|
I've opened the issue for the superseeding with some options: pulp/pulp_deb#1430 |
|
I want a review of this, but I'd like pulp_deb folks feedback (on the general operation) before merging. |
a8afc90 to
85e7550
Compare
mdellweg
left a comment
There was a problem hiding this comment.
Quite a complex thing, but looks good over all.
|
|
||
| Defaults to `False`. | ||
|
|
||
| ### DISTRIBUTED\_PUBLICATION\_RETENTION\_PERIOD |
There was a problem hiding this comment.
Should this be a global thing?
There was a problem hiding this comment.
This could be a more complex setting and be defined per plugin, or not exposed at all. I could be convinced either way. I decided to start with this as a middle ground.
| pub.delete() | ||
| assert not DistributedPublication.objects.filter(distribution=dist).exists() | ||
|
|
||
| def test_deleting_older_repository_version_doesnt_clear_dps(self, db): |
There was a problem hiding this comment.
What's dps? (Actually there's no need for abbreviation in test case names. They don't have call sites.)
There was a problem hiding this comment.
Ah DistributedPublication(s). That's covered by the class name. How about:
test_does_not_happen_when_deleting_old_repository_version?
|
Can you squash before merging? |
Introduces a DistributedPublication model to track which publications are associated with each distribution. When a new publication becomes the latest for a repository, older ones are retained and served by the content handler for a configurable grace period, allowing clients to continue fetching from superseded publications without interruption. Handles publications with pass-trough=True|False. The behavior is sumarized: Given: - CA=ContentArtifact, - PA=PublishedAritfact - PU=Publication - RV=RepositoryVersion - DP=DistributedPublication - DT=Distribution Then CA is retrieved with: - no-pass-through: CA<-PA<-PU<-DP->DT - pass-through: CA<-RV<-PU<-DP->DT Closes: pulp#7514 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b34f6e6 to
1f7224a
Compare
Introduces a DistributedPublication model to track which publications are associated with each distribution. When a new publication becomes the latest for a repository, older ones are retained and served by the content handler for a configurable grace period, allowing clients to continue fetching from superseded publications without interruption.
Handles publications with pass-trough=True|False. The behavior is sumarized:
Given:
Then CA is retrieved with:
Closes: #7514
📜 Checklist
See: Pull Request Walkthrough