https://pulp.plan.io/https://pulp.plan.io/favicon.ico2019-10-10T18:28:02ZPulpPulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=483872019-10-10T18:28:02Zdaviddavis
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/48387/diff?detail_id=49006">diff</a>)</li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=483892019-10-10T18:57:51Zbmbouterbmbouter@redhat.com
<ul></ul><p>Where should we add this check? We could add this check <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/models/repository.py#L371-L383" class="external">here</a> Or we could check it at end when creating a RepositoryVersion in core <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/models/repository.py#L316" class="external">here</a></p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=483902019-10-10T18:59:53Zdaviddavis
<ul></ul><p>I think <code>add_content</code> makes the most sense so it can fail fast. I don't have a huge preference though.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=483922019-10-10T19:05:49Zgmbnomis
<ul></ul><p>I agree, I think <code>add_content</code> should validate its input.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=484032019-10-10T19:31:52Zbmbouterbmbouter@redhat.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/48403/diff?detail_id=49014">diff</a>)</li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=484072019-10-10T20:07:14Zbmbouterbmbouter@redhat.com
<ul><li><strong>Sprint</strong> set to <i>Sprint 60</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=484212019-10-11T14:32:13Zfao89
<ul><li><strong>Triaged</strong> changed from <i>No</i> to <i>Yes</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=484382019-10-12T16:38:27Zgmbnomis
<ul></ul><p>Another option for where to implement it:</p>
<p>Given we have <a class="issue tracker-1 status-11 priority-6 priority-default closed" title="Issue: Core should not add/remove content to a repository or create a repository_version without plugin ... (CLOSED - CURRENTRELEASE)" href="https://pulp.plan.io/issues/3541">#3541</a>, we could offer the entire <code>repo_key</code> check as a generic implementation that plugins may mix in/derive from/use in their <code>add_content</code> hooks.</p>
<p>This would simplify the <code>add_content</code> implementation in RepositoryVersion.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=485332019-10-17T13:21:35Zdaviddavis
<ul></ul><p>This is on hold until we figure <a href="https://pulp.plan.io/issues/3541" class="external">https://pulp.plan.io/issues/3541</a> out.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=485572019-10-17T17:17:09Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>ASSIGNED</i></li><li><strong>Assignee</strong> set to <i>bmbouter</i></li></ul><p>I'm taking as assigned so I can incorporate this fix into the delivery of 3541. <a href="https://pulp.plan.io/issues/3541" class="external">https://pulp.plan.io/issues/3541</a></p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=486572019-10-25T07:46:36Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 60</i> to <i>Sprint 61</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=489442019-11-07T21:45:57Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>NEW</i></li><li><strong>Assignee</strong> deleted (<del><i>bmbouter</i></del>)</li><li><strong>Sprint</strong> deleted (<del><i>Sprint 61</i></del>)</li></ul><p>I started working on this, but I want to pick it up after the 3.0 branch point (or release). I believe this for a few reasons:</p>
<ul>
<li>It's a bugfix so it can be fixed later</li>
<li>it's not a blocker</li>
<li>it's not a very common situation</li>
<li>it should come with a test (which takes a bit more time to create)</li>
<li>there is other higher prio work atm.</li>
</ul>
<p>I'm also removing from the sprint for ^ reasons.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=519652020-01-14T17:46:10Zbmbouterbmbouter@redhat.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>3.1.0</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=529592020-02-11T14:31:29Zdaviddavis
<ul><li><strong>Sprint/Milestone</strong> changed from <i>3.1.0</i> to <i>3.2.0</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=529762020-02-11T15:36:39Zfao89
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/52976/diff?detail_id=53432">diff</a>)</li><li><strong>Sprint</strong> set to <i>Sprint 66</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530062020-02-12T15:04:19Zfao89
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>ASSIGNED</i></li><li><strong>Assignee</strong> set to <i>fao89</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530122020-02-12T18:28:31Zfao89
<ul></ul><p>seems the code is prepared to replace content based on repo_key_fields:
remove_duplicates: <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/plugin/repo_version_utils.py#L16" class="external">https://github.com/pulp/pulpcore/blob/master/pulpcore/plugin/repo_version_utils.py#L16</a>
test_second_unit_replaces_the_first: <a href="https://github.com/pulp/pulp_file/blob/master/pulp_file/tests/functional/api/test_crud_content_unit.py#L264" class="external">https://github.com/pulp/pulp_file/blob/master/pulp_file/tests/functional/api/test_crud_content_unit.py#L264</a></p>
<pre><code class="text syntaxhl" data-language="text">In [1]: repo = FileRepository.objects.first()
In [2]: repo.content.all()
Out[2]: <QuerySet [<Content (pulp_type=file.file): pk=735cbb5a-494c-4f88-9e10-2f85a2a1fb82>, <Content (pulp_type=file.file): pk=208f273c-2035-4863-834d-ecdd98789f55>]>
In [3]: [o.content for o in RepositoryVersion.objects.all()]
Out[3]:
[<QuerySet []>,
<QuerySet [<Content (pulp_type=file.file): pk=208f273c-2035-4863-834d-ecdd98789f55>]>,
<QuerySet [<Content (pulp_type=file.file): pk=735cbb5a-494c-4f88-9e10-2f85a2a1fb82>]>]
</code></pre> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530162020-02-12T19:27:33Zfao89
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>POST</i></li></ul><p><a href="https://github.com/pulp/pulp_file/pull/356" class="external">https://github.com/pulp/pulp_file/pull/356</a></p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530172020-02-12T19:41:43Zfao89
<ul><li><strong>Status</strong> changed from <i>POST</i> to <i>ASSIGNED</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530192020-02-12T19:50:42Zdaviddavis
<ul><li><strong>Subject</strong> changed from <i>Content with duplicate repo_keys can be added to a repo version</i> to <i>Content with duplicate repo_key_fields can be added to a repo version</i></li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/53019/diff?detail_id=53474">diff</a>)</li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530382020-02-13T15:02:23Zfao89
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>POST</i></li></ul><p><a href="https://github.com/pulp/pulpcore/pull/537" class="external">https://github.com/pulp/pulpcore/pull/537</a></p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=530712020-02-14T15:20:08ZAnonymous
<ul><li><strong>Status</strong> changed from <i>POST</i> to <i>MODIFIED</i></li></ul><p>Applied in changeset <a class="changeset" title="Duplicate repo_key_fields raises an error https://pulp.plan.io/issues/5567 closes #5567" href="https://pulp.plan.io/projects/pulp/repository/pulpcore/revisions/dff17733e4e4e205f39475333b760a60b53a5e4c">pulpcore|dff17733e4e4e205f39475333b760a60b53a5e4c</a>.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=531352020-02-17T20:27:22ZAnonymous
<ul></ul><p>Applied in changeset <a class="changeset" title="Duplicate repo_key_fields raises an error https://pulp.plan.io/issues/5567 closes #5567 (cherry..." href="https://pulp.plan.io/projects/pulp/repository/pulpcore/revisions/fd3a2ae9e9244e8bc50492daf7df3da17105ac5d">pulpcore|fd3a2ae9e9244e8bc50492daf7df3da17105ac5d</a>.</p> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=531452020-02-18T15:12:29Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>CLOSED - CURRENTRELEASE</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=531502020-02-18T15:13:14Zbmbouterbmbouter@redhat.com
<ul><li><strong>Sprint/Milestone</strong> changed from <i>3.2.0</i> to <i>3.1.1</i></li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=536432020-03-02T14:20:50Zdaviddavis
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-11 priority-7 priority-high2 closed" href="/issues/6229">Issue #6229</a>: Syncing both Fedora 30 and Fedora 31 modular repos into Pulp (different repos) will cause the later sync to fail</i> added</li></ul> Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionhttps://pulp.plan.io/issues/5567?journal_id=541302020-03-18T14:46:24Zttereshcttereshc@redhat.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-11 priority-6 priority-default closed" href="/issues/6362">Issue #6362</a>: Check for duplicated content happens without plugin input</i> added</li></ul>