-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: simplify how subjects are created from existing manifest #131
Conversation
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.
I like how this works! The reason the support is simple is because the interaction is more complex than seems at face value. If we want to fully support a client doing this interaction, the full thing is described here: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pushing-manifests-with-subject Let me know your thoughts.
Well... I kinda don't like when things are half-done. 🙂 So.. I'll look into it and try to improve the push logic. (I may not have much time in the next two weeks though...) Do you think it would make sense to split the |
00c2de4
to
2fca120
Compare
Since we don't have a command line client, let's start with what you have now - a push that takes a subject. If "attach" comes down to just doing that command again, we don't need attach. But if there is another use case not covered, we can consider adding it. |
@vsoch does anything have to change in this PR or is this fine? 🙂 |
You'll want to finish up by:
|
Signed-off-by: Tomas Coufal <[email protected]>
2fca120
to
5db7ebe
Compare
Done, thank you. 🙂 |
Hi folks 👋
I've noticed the Python Oras client library has kind of rudimentary support for attached artifacts. I'd like to address a couple of UX caveats in several PRs. Please let me know if it's heading in the right direction or if you have a different perspective.
This PR addresses a difficulty when creating a Subject reference.
As of today, an
oras-py
user needs to know how the subject spec is constructed, and how to calculate size and digest. This makes it quite hard to come up with a usable structure that can be used when pushing an artifact. I've addressed this by adding afrom_manifest
class method to theSubject
data class. There may be a nicer, cleaner solution than a class method, let me know what you think.