-
Notifications
You must be signed in to change notification settings - Fork 187
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!: pass annotations as a string #468
feat!: pass annotations as a string #468
Conversation
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Codecov Report
@@ Coverage Diff @@
## main #468 +/- ##
===========================================
+ Coverage 55.69% 67.58% +11.88%
===========================================
Files 6 7 +1
Lines 237 327 +90
===========================================
+ Hits 132 221 +89
+ Misses 90 85 -5
- Partials 15 21 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…uggestion Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
We need unit tests. Let there be unit tests. |
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Going to update UX, as discussed with the community, exiting with error when both flags are provided is a good option for now. @shizhMSFT /cc @sajayantony @qweeah |
@junczhuMSFT This looks good. I think #466 can also apply this UX: if both |
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
…czhuMSFT/oras into junczhu/manifest-annotations
@junczhuMSFT Since this changes the |
Well Noted |
Working on it |
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
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.
LGTM
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
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.
LGTM
FileRefs []string | ||
} | ||
|
||
// ApplyFlags applies flags to a command flag set. |
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.
Just a clarifying question here! In the first implementation I have, the user could provide an annotations file, and this wasn't just for the manifest, you could have keys $manifest
or $config
or the fullpath/relative path of a blob to indicate that we want to add annotations there. But now the new argument --annotation key=value
seems to be scoped just for the final manifest, and not a config or particular blob. Is this a correct interpretation?
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.
And in this case, wouldn't we only care if both are defined given we have $manifest
in the file lookup plus an --annotation
? E.g., providing this new flag with an annotation file without manifest annotations should not be an issue, but as I see here the client is just disallowing both to be defined.
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.
Hello @vsoch thank you for insight.
- If users want to update annotations including keys
$manifest
,$config
and more, they can use--annotation-file
and provide an annotations file - If users only want to update manifest annotations, they can use
--annotation
. They don't have to create a file just to upload a single annotation - I have set up a condition that
--annotation
and--annotation-file
cannot be both specified to make sure their implements are isolated to each other
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.
Yes so my question is why not to allow a file with $manifest and a one off annotation that has a key that doesn’t overlap? It could be a use case given that someone has a file with common/shared annotations and then a few custom to a container. I think this should be allowed because there is no complexity in terms of duplicate keys - it’s just reading a file and then adding one off annotations from the command line. And you’d immediately reject/exit given duplicates only.
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Resolve #362
BREAKING CHANGE: update annotation UX
Signed-off-by: Juncheng Zhu junczhu@microsoft.com