<div dir="ltr"><div>Hey guys,</div><div>thank you for the provided feedback!</div><div><br></div><div>Mihai,</div><div>i think this kind of unexpected problems can be faced even nowadays where:</div><div>Luke uploads an rpm A, Joy removes rpm A and B. Luke distributes repo and tries to dnf install rpm A.</div><div><br></div><div>Simon,</div><div>In my personal opinion, i don't see it as a good practice to apply 'force' flag on the Tag. As Mihai pointed out, manifest is still perfectly pullable by digest.</div><div><br></div><div>I think the reason to introduce the force flag is to be able to remove artifact that has higher level references.<br></div><div><br></div><div>For example: Force remove manifest/manifest list with digest X, even if it has tags.</div><div>Or:</div><div>Force remove manifest with digest X, even if it is referenced in manifest lists.<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">I will create a ticket that will describe what we have discussed here. Possibility of force removal of the Tag will still be opened for discussion, before we groom the story.</div><div dir="ltr"><br></div><div>Thank you!</div><div><br></div><div dir="ltr">--------<br>Regards,<br><br>Ina Panova<br>Senior Software Engineer| Pulp| Red Hat Inc.<br><br>"Do not go where the path may lead,<br> go instead where there is no path and leave a trail."<br></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 22, 2019 at 2:52 PM Mihai Ibanescu <<a href="mailto:mihai.ibanescu@gmail.com">mihai.ibanescu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Replies inline.<br>
<br>
On Mon, Jul 22, 2019 at 6:54 AM Simon Baatz <<a href="mailto:gmbnomis@gmail.com" target="_blank">gmbnomis@gmail.com</a>> wrote:<br>
> On Fri, Jul 19, 2019 at 01:13:20PM +0200, Ina Panova wrote:<br>
> Btw.  we have code in our automation to explicitly address this case,<br>
> i.e.  we filter out manifest digests when the manifest digests are<br>
> referenced by manifest lists that are still needed.  This code always<br>
> felt out of place; Docker is the only artifact type that requires<br>
> special treatment when removing artifacts.<br>
<br>
Docker in itself is "special", in that multiple tags can (and<br>
typically will) point to the same manifest.<br>
<br>
While rpm packages can be shared across multiple repositories<br>
seamlessly, docker is different in that the content (manifests) can be<br>
shared within the same repository. So you need to play the refcount<br>
dance at some point.<br>
<br>
> (As said in my previous mail, I don't like the approach to delete<br>
> recursively on tag removal. But it may be what most users expect(?))<br>
<br>
I don't like it either, but the docker engine can get away with it,<br>
because the local registry acts kind of like a cache of the upstream<br>
registry.<br>
<br>
If you implement the upstream registry (which is what pulp does), you<br>
can't remove a manifest just because no tags point to it - the<br>
manifest is still perfectly usable by pulling with its digest.<br>
<br>
> >    As a possible solution we could add a 'force' flag that will not rely<br>
> >    on the users' good will, but will ensure that if a user specifies it he<br>
> >    is aware of implications. Otherwise if no 'force' flag is specified we<br>
> >    go with behaviour:<br>
> >    ----><br>
> >    You can remove an artifact if no<br>
> >    artifact on a higher level references it. If it can be removed, all<br>
> >    (otherwise unused) artifacts on lower levels are deleted recursively.<br>
> >    For example, you cannot delete a manifest that is still referenced by<br>
> >    a manifest list or tag.<br>
> >    Thoughts?<br>
><br>
> That sounds like a good idea. Would the recursive removal also be done<br>
> on deletion of a tag?<br>
<br>
I like the force flag, I just fear unexpected transactional problems:<br>
<br>
* user Luke notes that the manifest has tags A and B<br>
* Luke wants to remove the manifest, so he decides to "use the force"<br>
* user Joy tags the same manifest with tag C<br>
* Luke proceeds with his removal, except that the state of the repo<br>
has changed since he decided to use the force<br>
* Joy gets no joy pulling the image with tag C, because it's gone<br>
</blockquote></div>