Project

Profile

Help

Issue #2514

closed

Creating a group no longer updates the existing group

Added by mihai.ibanescu@gmail.com over 7 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.10.3
Platform Release:
2.11.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

In pulp 2.7, if a group was uploaded (via the API's /import_upload/) and it already existed, it was updated.

In pulp 2.10, the update doesn't happen anymore.

The problem is in the yum importer, in _handle_group_category_comps:

    else:
        # uploading a package group, package category or package environment
        unit_data = {}
        unit_data.update(metadata or {})
        unit_data.update(unit_key or {})
        try:
            unit = model_class(**unit_data)
        except TypeError:
            raise ModelInstantiationError()

        try:
            unit.save()
        except NotUniqueError:
            unit = unit.__class__.objects.filter(**unit.unit_key).first()

        repo_controller.associate_single_unit(repo, unit)

Notice that, if the unit exists (and fails to save), the existing unit is never updated.

Actions #1

Updated by bmbouter over 7 years ago

This sounds like a behavioral regression due to the mongoengine rewrite. This was not intentional so semver.org would motivate us to restore the original functionality as soon as we can.

Actions #2

Updated by mhrivnak over 7 years ago

  • Project changed from Pulp to RPM Support
  • Category deleted (14)
Actions #3

Updated by mihai.ibanescu@gmail.com over 7 years ago

  • Status changed from NEW to ASSIGNED
Actions #4

Updated by mihai.ibanescu@gmail.com over 7 years ago

  • Assignee set to mihai.ibanescu@gmail.com
Actions #5

Updated by bizhang over 7 years ago

  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
Actions #7

Updated by mihai.ibanescu@gmail.com over 7 years ago

  • Status changed from ASSIGNED to POST

Added by Mihai Ibanescu over 7 years ago

Revision c51546d0 | View on GitHub

Update the group if one exists in the db.

closes #2514 https://pulp.plan.io/issues/2514

Actions #8

Updated by Anonymous over 7 years ago

  • Status changed from POST to MODIFIED
Actions #9

Updated by semyers over 7 years ago

  • Platform Release set to 2.11.1
Actions #10

Updated by semyers over 7 years ago

  • Status changed from MODIFIED to 5
Actions #12

Updated by semyers over 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #13

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF