Project

Profile

Help

Issue #2688

closed

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

Added by elyezer over 7 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
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:

  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

Also available in: Atom PDF