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
cli: snapcraft promote #2556
cli: snapcraft promote #2556
Conversation
Create a snap Status/Status class to easily handle the state response and construct a channel set to use with the promote command. LP: #1827513 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Codecov Report
@@ Coverage Diff @@
## master #2556 +/- ##
==========================================
+ Coverage 88.85% 88.98% +0.12%
==========================================
Files 202 204 +2
Lines 13794 13941 +147
Branches 2088 2108 +20
==========================================
+ Hits 12257 12405 +148
+ Misses 1093 1091 -2
- Partials 444 445 +1
Continue to review full report at Codecov.
|
Thanks @sergiusens, the implementation looks good and easy to update to the actual promote endpoint when it exists in the store. Meanwhile, there is a remote possibility of revisions being partially promoted (if an attempt fails), running the same promotion command will fix it. |
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 a very nice, elegantly coded and almost spotless implementation. Just added a few nitpicking comments about type annotations.
Thanks @cprov wrt promotion being individual releases, we do indeed suffer from this possibily, just like on the web interface, although it is easier to surface on a GUI than on a CLI Thanks for the compliments @cmatsuoka, I will get to the type annotations. |
Create a snap Status/Status class to easily handle the state response and construct a channel set to use with the promote command. LP: #1827513 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
elif parsed_from_channel.risk == "edge" and parsed_from_channel.branch is None: | ||
raise click.BadOptionUsage( | ||
"{!r} is not a valid set value for --from-channel.".format( | ||
parsed_from_channel | ||
) | ||
) |
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.
What's up with this limitation? Bites me all the time. Why can't we promote from edge? It's documented right above as being valid, and we have a CI system that ONLY lands stuff in edge. Am I missing something?
I had a conversation and it is going away
…On Sun, Jun 14, 2020 at 8:45 PM Kyle Fazzari ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In snapcraft/cli/store.py
<#2556 (comment)>:
> + elif parsed_from_channel.risk == "edge" and parsed_from_channel.branch is None:
+ raise click.BadOptionUsage(
+ "{!r} is not a valid set value for --from-channel.".format(
+ parsed_from_channel
+ )
+ )
What's up with this limitation? Bites me all the time.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2556 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIX7ZNSQW6S52Y4HJSZXLLRWVOKPANCNFSM4HLD6TBA>
.
|
Create a snap Status/Status class to easily handle the state response
and construct a channel set to use with the promote command.
LP: #1827513
Signed-off-by: Sergio Schvezov sergio.schvezov@canonical.com
./runtests.sh static
?./runtests.sh tests/unit
?