Project

Profile

Help

Issue #1042

Exception raised when building error message on relative_url collision

Added by bcourt over 5 years ago. Updated over 1 year ago.

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

Description

If a repo is created using a relative_url

The line https://github.com/pulp/pulp_rpm/blob/pulp-rpm-2.6.1-1/plugins/pulp_rpm/plugins/distributors/yum/configuration.py#L469
is checking which will raise a KeyError if 'relative_url' has not been defined in the distributor config.

conflicting_relative_url = distributor['config']['relative_url'] or conflicting_repo_id

This should be replaced with something like

if 'relative_url' in distributor['config']:
    conflicting_relative_url = distributor['config']['relative_url'] or conflicting_repo_id
else:
    conflicting_relative_url = conflicting_repo_id

Associated revisions

Revision 1465d905 View on GitHub
Added by ipanova@redhat.com over 5 years ago

Exception raised when building error message on relative_url collision

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

It turns out that pulp complains not only for relative_url collision of another relative_url repo, but also for relative_url collision with repo id of existing repo.

Due to this behaviour pulp renders incorrect and false message.

History

#1 Updated by bcourt over 5 years ago

  • Severity changed from 2. Medium to 3. High

Raising severity to high as this prevents the user from seeing the reason an error is being raised.

#2 Updated by mhrivnak over 5 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
  • Tags Easy Fix added

Please add verification steps.

#3 Updated by ipanova@redhat.com over 5 years ago

  • Status changed from NEW to ASSIGNED

#4 Updated by ipanova@redhat.com over 5 years ago

  • Assignee set to ipanova@redhat.com

#5 Updated by ipanova@redhat.com over 5 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by ipanova@redhat.com over 5 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#7 Updated by ipanova@redhat.com over 5 years ago

  • Platform Release set to 2.6.4

#8 Updated by dkliban@redhat.com about 5 years ago

  • Platform Release changed from 2.6.4 to 2.6.5

#9 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from MODIFIED to 5

#10 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF