Project

Profile

Help

Story #5757

As a user, I can expect that an empty repository version will always be created first on repo creation.

Added by iballou 16 days ago. Updated 13 days ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
Katello-P1
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 62

Description

Katello relies on being able to create a repository and a publication before any content has been added to the repository. Since pulpcore no longer creates a repository version when no changes are being made, users are unable to create an 'empty' repository version. As a result, a publication can't be created either. In order to keep the behaviour of repository version creation consistent, it would be best if pulpcore simply created an empty repository version when a repository is created.

Associated revisions

Revision 4068a8fd View on GitHub
Added by daviddavis 14 days ago

Create an initial repo version when repos get created

fixes #5757
https://pulp.plan.io/issues/5757

Required PR: https://github.com/pulp/pulp_file/pull/322

Revision 562cdf65 View on GitHub
Added by daviddavis 14 days ago

Fix tests for new initial repo version change

ref #5757
https://pulp.plan.io/issues/5757

Required PR: https://github.com/pulp/pulpcore/pull/400

(cherry picked from commit 7d9c9668b1e999c2478c2c9ba2e0ff201d591041)

Revision 0dcf0147 View on GitHub
Added by daviddavis 14 days ago

Create an initial repo version when repos get created

fixes #5757
https://pulp.plan.io/issues/5757

Required PR: https://github.com/pulp/pulp_file/pull/323

(cherry picked from commit 4068a8fd9f10c20836ecfbf3eaa7175c918c875a)

Revision 2f91b292 View on GitHub
Added by daviddavis 14 days ago

Fix tests for initial repo version

ref #5757

Revision babb693c View on GitHub
Added by daviddavis 10 days ago

Updating tests for initial repo version change

ref #5757

Revision a9950883 View on GitHub
Added by daviddavis 8 days ago

Fix tests for initial repo version

ref #5757

(cherry picked from commit 2f91b292dd8b5d40a7baf428a1cfab09d92d0e07)

History

#1 Updated by daviddavis 16 days ago

  • Sprint/Milestone set to 3.0

#2 Updated by dkliban@redhat.com 16 days ago

  • Description updated (diff)

Each plugin is responsible for handling the requests to create a Repository resource. Pulpcore should provide a post_save() hook for the Repository master model. This hook should create a RepositoryVersion for the newly created Repository.

https://docs.djangoproject.com/en/2.2/ref/signals/#post-save

#3 Updated by daviddavis 16 days ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 62

#4 Updated by dkliban@redhat.com 16 days ago

We could probably accomplish this without overriding the post_save signal. We could simply override the save method to call super() and then create a RepositoryVersion.

We should also consider starting the version numbering with 0. A newly created repository has last_version set to 0 by default. After the repository version 0 is created, the repository would not need to be updated. If the empty repository version is number 1, then the Repository.last_version field needs to be updated.

#5 Updated by daviddavis 14 days ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#6 Updated by daviddavis 14 days ago

  • Status changed from ASSIGNED to POST

#7 Updated by daviddavis 14 days ago

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

#8 Updated by daviddavis 14 days ago

  • Status changed from MODIFIED to POST

#9 Updated by daviddavis 14 days ago

  • Status changed from POST to MODIFIED

#10 Updated by ipanova@redhat.com 13 days ago

  • Status changed from MODIFIED to POST

#11 Updated by ipanova@redhat.com 13 days ago

  • Status changed from POST to MODIFIED

Please register to edit this issue

Also available in: Atom PDF