Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Issue #2688
closedlast_unit_added is not updated when units are copied over from another repo
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
Updated by bizhang over 7 years ago
This was fixed as a part of https://pulp.plan.io/issues/2577
The code changes for this landed in 2.12.1: https://github.com/pulp/pulp/commit/0005b1375f02d9cbe29bf23b892fa5ec7af343b8
A later commit reverted the bugfix so it's a regression for 2.12.2: https://github.com/pulp/pulp/commit/c0ea5ee4bf8898d80d72c481fbc116fc548b8eeb
Updated by semyers over 7 years ago
So it looks like we need to partially revert c0ea5ee4bf8898d80d72c481fbc116fc548b8eeb, or attempt to reapply 0005b1375f02d9cbe29bf23b892fa5ec7af343b8, whichever is safer.
Updated by semyers over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to semyers
Going to attempt to cherry-pick 0005b1375f02d9cbe29bf23b892fa5ec7af343b8 back into 2.12-dev, will open a PR if successful.
Added by bizhang over 7 years ago
Added by bizhang over 7 years ago
Revision dda4b23e | View on GitHub
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
Updated by semyers over 7 years ago
- Status changed from ASSIGNED to POST
The pick applied without error, all tests continue to pass:
https://github.com/pulp/pulp/pull/2983
Updated by bizhang over 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|dda4b23eb8334fc53a160b104063047c6492493f.
Added by bizhang over 7 years ago
Revision f52b538f | View on GitHub
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
(cherry picked from commit dda4b23eb8334fc53a160b104063047c6492493f)
^ And this second cherry-pick happened because I opened the PR against master, not 2.12-dev. A bug so nice, we fixed it thrice and picked it twice.
Added by bizhang over 7 years ago
Revision f52b538f | View on GitHub
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
(cherry picked from commit dda4b23eb8334fc53a160b104063047c6492493f)
^ And this second cherry-pick happened because I opened the PR against master, not 2.12-dev. A bug so nice, we fixed it thrice and picked it twice.
Updated by bizhang over 7 years ago
Applied in changeset pulp|f52b538f8692c4ad1c31db3392477e6d0e49060e.
Updated by bizhang over 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
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