Document that a repo version is expected to be created for all sync's regardles of if there is new content remotely or now
We don't document the expectation that every sync should produce a repository version.
Why always make a repo version?¶
It's less surprising to users when they ask Pulp to sync and receive a repo version N+1 that is that same as repo version N. It's more confusing to users if they get some repo verisons for some sync's and not for others depending on the remote state.
We should document the expectation that every sync produces a repository version in the plugin writer docs.
#2 Updated by firstname.lastname@example.org over 1 year ago
- Status changed from NEW to CLOSED - WONTFIX
This is correct behavior. A new RepositoryVersion needs to be created, even if the sync does not add or remove any content units.
The reasoning for this is made clear by a worker crash scenario. When a sync is started, a new RepositoryVersion is created, (number= 2) and Repository.last_version = 2. Before the sync is completed, the worker crashes. While the crash is waiting to be cleaned up, a second sync task is run, which creates another new RepositoryVersion. The second sync task creates a new RepositoryVersion(number=3). If the crash/failure cleanup decrements Repository.last_version, then Repository.last_version will be incorrect, leading to duplicate key errors.
All of this complexity goes away if we have "empty" RepositoryVersions, which can be deleted by the user.
#5 Updated by daviddavis 5 months ago
- Status changed from CLOSED - WONTFIX to NEW
In pulp_ansible, we couldn't use the Stages code and we made the decision to NOT create a repo version when content doesn't change. This of course is not consistent with other plugins. I am reopening this issue to rediscuss this and also to make sure we have proper docs around the correct behavior for plugin writers.
- Subject changed from Sync of unchanged importer update repo version to Document that a repo version is expected to be created for all sync's regardles of if there is new content remotely or now
- Description updated (diff)
- Sprint set to Sprint 54
- Tags Documentation added
After discussion during today's open floor we decided:
1) the current behavior is a good behavior. It's less surprising to users when they ask Pulp to sync and receive a repo version N+1 that is that same as repo version N, and more confusing if they get some repo verisons for some sync's and not for others depending on the remote state.
2) We should document this expectation in the plugin write API, so now this is a docs story
3) it should go on the sprint
Please register to edit this issue