Actions
Issue #2688
closedlast_unit_added is not updated when units are copied over from another repo
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.12.2
Platform Release:
2.12.2
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Steps to reproduce:
- Create a repo with a feed and sync it
- Create a second repo without a feed and don't sync it
- Copy units from the first repo to the second
- Check the last_unit_added field
The output below was generated on Pulp 2.12.2b1:
$ pulp-admin rpm repo create --repo-id destination
Successfully created repository [destination]
$ pulp-admin rpm repo copy rpm --match "name=bear" --from-repo-id source --to-repo-id destination
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Copied:
bear-4.1-1-noarch
$ pulp-admin rpm repo list --fields last_unit_added --repo-id destination
+----------------------------------------------------------------------+
RPM Repositories
+----------------------------------------------------------------------+
Id: destination
Last Unit Added: None
Same happens when trying to do the actions over API, the steps for doing that are:
- Create a repo with a feed and sync it
- Create a second repo without a feed and don't sync it
- Post to actions/associate on the second repo with the following body:
body = {
'source_repo_id': source_repo['id'],
'criteria': {
'filters': {'unit': {'name': 'unit_name'}},
'type_ids': ['rpm'],
},
}
- Publish the second repo
- Check the last_unit_added field
Actions
update last_unit_added when units are copied
re #2577 https://pulp.plan.io/issues/2577
(cherry picked from commit 0005b1375f02d9cbe29bf23b892fa5ec7af343b8)
The cherry-picked commit was accidentally reverted on 2.12-dev in commit c0ea5ee4bf8898d80d72c481fbc116fc548b8eeb. The original PR containing this change was https://github.com/pulp/pulp/pull/2949
closes #2688 https://pulp.plan.io/issues/2688