Change error message when trying to pull a deleted or expired tag
Will let the users know they can recover the tag via time machine Note: This was tested with the Docker protocol, but the new error code is *technically* out of spec; we should make sure its okay.
This commit is contained in:
parent
99d7fde8ee
commit
7d4fed6892
7 changed files with 39 additions and 7 deletions
|
@ -530,6 +530,15 @@ def get_active_tag(namespace, repo_name, tag_name):
|
|||
Namespace.username == namespace)).get()
|
||||
|
||||
|
||||
def get_possibly_expired_tag(namespace, repo_name, tag_name):
|
||||
return (RepositoryTag
|
||||
.select()
|
||||
.join(Repository)
|
||||
.join(Namespace, on=(Repository.namespace_user == Namespace.id))
|
||||
.where(RepositoryTag.name == tag_name, Repository.name == repo_name,
|
||||
Namespace.username == namespace)).get()
|
||||
|
||||
|
||||
def associate_generated_tag_manifest(namespace, repo_name, tag_name, manifest_digest,
|
||||
manifest_data):
|
||||
tag = get_active_tag(namespace, repo_name, tag_name)
|
||||
|
|
Reference in a new issue