Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

crono: update digests when creating tags #825

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Conversation

mssola
Copy link
Collaborator

@mssola mssola commented Apr 18, 2016

In this commit the CatalogJob task will also update the manifest digests of
the tags that are to be created.

See #822

Signed-off-by: Miquel Sabaté Solà [email protected]

In this commit the CatalogJob task will also update the manifest digests of
the tags that are to be created.

See SUSE#822

Signed-off-by: Miquel Sabaté Solà <[email protected]>
@flavio
Copy link
Member

flavio commented Apr 18, 2016

LGTM, you might want to extend the test suite to cover also exception handling

@mssola
Copy link
Collaborator Author

mssola commented Apr 18, 2016

@flavio the manifest method itself is already unit-tested, that's why I didn't bother too much extending tests in this regard. For this fix though, the important thing is that any exception whatsoever will be treated equally as an error, so the digest will be just empty. Moreover, this fix is using the manifest method to just pick the digest, which is something I introduced quite recently but that I was going to implement in integration tests.

@flavio
Copy link
Member

flavio commented Apr 18, 2016

👍

@mssola mssola merged commit b319360 into SUSE:master Apr 18, 2016
@mssola mssola deleted the crono-digest branch April 18, 2016 12:50
mssola added a commit to mssola/Portus that referenced this pull request May 3, 2016
Soft delete support has been supported in Docker Distribution since at least
2.1. This was not enough to implement the removal of images/tags in Portus
because there was no support to GC these soft deleted blobs. Since 2.4, it's
possible to not just delete the manifest, but also to GC blobs no longer
referenced by any image manifest. This means that after being able to track
digests, we can now safely provide image/tag removal support. For safety
concerns, tags with an empty digest will not be allowed to be removed (this
is more likely to be the case of Portus versions that have been running for
some time). In previous PRs this has already been addressed, so admins can
update their DB filling in the empty gaps (e.g. see PRs SUSE#825 or SUSE#830).

The main downside of this change is that there is no way for a client to detect
whether a remote registry supports GC. Because of this, a configuration option
has been provided, which is disabled by default. The rationale is that
administrators that are really sure about the availability of GC on their
private registry will have to enable it explicitly.

Fixes SUSE#197

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit to mssola/Portus that referenced this pull request May 3, 2016
Soft delete support has been supported in Docker Distribution since at least
2.1. This was not enough to implement the removal of images/tags in Portus
because there was no support to GC these soft deleted blobs. Since 2.4, it's
possible to not just delete the manifest, but also to GC blobs no longer
referenced by any image manifest. This means that after being able to track
digests, we can now safely provide image/tag removal support. For safety
concerns, tags with an empty digest will not be allowed to be removed (this
is more likely to be the case of Portus versions that have been running for
some time). In previous PRs this has already been addressed, so admins can
update their DB filling in the empty gaps (e.g. see PRs SUSE#825 or SUSE#830).

The main downside of this change is that there is no way for a client to detect
whether a remote registry supports GC. Because of this, a configuration option
has been provided, which is disabled by default. The rationale is that
administrators that are really sure about the availability of GC on their
private registry will have to enable it explicitly.

Fixes SUSE#197

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit to mssola/Portus that referenced this pull request May 3, 2016
Soft delete support has been supported in Docker Distribution since at least
2.1. This was not enough to implement the removal of images/tags in Portus
because there was no support to GC these soft deleted blobs. Since 2.4, it's
possible to not just delete the manifest, but also to GC blobs no longer
referenced by any image manifest. This means that after being able to track
digests, we can now safely provide image/tag removal support. For safety
concerns, tags with an empty digest will not be allowed to be removed (this
is more likely to be the case of Portus versions that have been running for
some time). In previous PRs this has already been addressed, so admins can
update their DB filling in the empty gaps (e.g. see PRs SUSE#825 or SUSE#830).

The main downside of this change is that there is no way for a client to detect
whether a remote registry supports GC. Because of this, a configuration option
has been provided, which is disabled by default. The rationale is that
administrators that are really sure about the availability of GC on their
private registry will have to enable it explicitly.

Fixes SUSE#197

Signed-off-by: Miquel Sabaté Solà <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants