Project

Profile

Help

Issue #2688

last_unit_added is not updated when units are copied over from another repo

Added by elyezer almost 3 years ago. Updated 11 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Version:
2.12.2
Platform Release:
2.12.2
Blocks Release:
2.12.z
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

Steps to reproduce:

  1. Create a repo with a feed and sync it
  2. Create a second repo without a feed and don't sync it
  3. Copy units from the first repo to the second
  4. 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:

  1. Create a repo with a feed and sync it
  2. Create a second repo without a feed and don't sync it
  3. 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'],
    },
    }
  1. Publish the second repo
  2. Check the last_unit_added field

Associated revisions

Revision dda4b23e View on GitHub
Added by bizhang almost 3 years ago

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

Revision dda4b23e View on GitHub
Added by bizhang almost 3 years ago

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

Revision f52b538f View on GitHub
Added by bizhang almost 3 years ago

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.

Revision f52b538f View on GitHub
Added by bizhang almost 3 years ago

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.

History

#1 Updated by bizhang almost 3 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

#2 Updated by elyezer almost 3 years ago

  • Blocks Release 2.12.z added

#3 Updated by semyers almost 3 years ago

So it looks like we need to partially revert c0ea5ee4bf8898d80d72c481fbc116fc548b8eeb, or attempt to reapply 0005b1375f02d9cbe29bf23b892fa5ec7af343b8, whichever is safer.

#4 Updated by semyers almost 3 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.

#5 Updated by semyers almost 3 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

#6 Updated by bizhang almost 3 years ago

  • Status changed from POST to MODIFIED

#8 Updated by bizhang almost 3 years ago

  • Platform Release set to 2.12.2

#9 Updated by bizhang almost 3 years ago

  • Status changed from MODIFIED to ON_QA

#10 Updated by bizhang almost 3 years ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter 11 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF