-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation for uploaded and synced manifests #866
Add validation for uploaded and synced manifests #866
Conversation
3fba8c0
to
43bbd44
Compare
The reported problems with invalid manifest types are now gone (#854, #853):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great overall, thank you for adding the validation!
I don't see validation for schema1 will you add it too?
It would be great to add this validation to the sync worklow too. Will you do it as part of this PR or in a separate one? |
43bbd44
to
d24891b
Compare
@ipanova, I have added a schema for v1 manifests (I think they share the schema with signed v1 manifests) and added the validation to the sync pipeline. How do you like it now? Do I need to attach a fourth issue for adding the validation during the sync procedure? Unrelated: |
d24891b
to
dbed3c2
Compare
dbed3c2
to
694c83d
Compare
694c83d
to
16bd36f
Compare
your PR might fix this issue too #883 |
f4773a4
to
020c434
Compare
Re-using this isseure should be fine to include validation for synced and uploaded content.
That's a good question, we will need to evaluate the complexity of the #648 but from the user perspective, this would be a handy sync behavior. |
020c434
to
b6e389d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This work will greatly improve the quality of the sync and upload pipelines! 🎆
pulp_container/app/registry_api.py
Outdated
# when a user uploads a manifest list with zero listed manifests (no blobs were uploaded | ||
# before) and the specified repository has not been created yet, create the repository | ||
# without raising an error | ||
create_new_repo = request.content_type in ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/request.content_type/media_type
pulp_container/app/registry_api.py
Outdated
models.MEDIA_TYPE.INDEX_OCI, | ||
) | ||
_, repository = self.get_dr_push(request, path, create=create_new_repo) | ||
|
||
if request.content_type in ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/request.content_type/media_type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b6e389d
to
68ac260
Compare
To make it a meaningful number of comments to 45 ;) ( only by @lubosmj request) I will leave here some more 🐒 |
and the last one! 🦭 |
68ac260
to
06538ff
Compare
In this commit, a couple of validation schemas were
introduced to the sync and push workflows. Newly added
manifests or manifest lists are now being validated by
the JSON validator.
closes #854
closes #853
closes #672