Only write exceptions for manifest gen when a tag exists
Fixes #1019 Currently, we just raise an exception to the logs regardless, which can make it appear as if there is an issue (when there isn't).
This commit is contained in:
parent
597d6ecd3c
commit
c324ebd7f6
2 changed files with 8 additions and 2 deletions
|
@ -17,6 +17,7 @@ from endpoints.trackhelper import track_and_log
|
|||
from endpoints.notificationhelper import spawn_notification
|
||||
from digest import digest_tools
|
||||
from data import model
|
||||
from data.database import RepositoryTag
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -217,6 +218,11 @@ def fetch_manifest_by_tagname(namespace, repo_name, manifest_ref):
|
|||
try:
|
||||
manifest = model.tag.load_tag_manifest(namespace, repo_name, manifest_ref)
|
||||
except model.InvalidManifestException:
|
||||
try:
|
||||
model.tag.get_active_tag(namespace, repo_name, manifest_ref)
|
||||
except RepositoryTag.DoesNotExist:
|
||||
raise ManifestUnknown()
|
||||
|
||||
try:
|
||||
manifest = _generate_and_store_manifest(namespace, repo_name, manifest_ref)
|
||||
except model.DataModelException:
|
||||
|
|
Reference in a new issue