-
Notifications
You must be signed in to change notification settings - Fork 482
Snapcraft try #2524
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
Snapcraft try #2524
Conversation
This exposes the prime directory inside the build provider onto the host and messages the user to run "snap try" on that directory. LP: #1805212 Signed-off-by: Sergio Schvezov <[email protected]>
d7c55fa
to
e1ea969
Compare
Hah, I will have to split out those lxd snapcraft try tests as they fail require snapcraft to come from the store which is unfortunate as we still have no injection for lxd |
Codecov Report
@@ Coverage Diff @@
## master #2524 +/- ##
==========================================
- Coverage 89.17% 89.08% -0.09%
==========================================
Files 201 201
Lines 13615 13659 +44
Branches 2057 2065 +8
==========================================
+ Hits 12141 12168 +27
- Misses 1039 1052 +13
- Partials 435 439 +4
Continue to review full report at Codecov.
|
@@ -272,7 +298,8 @@ def pack(directory, output, **kwargs): | |||
required=False, | |||
help="Forces snapcraft to use LXD for this clean command.", | |||
) | |||
def clean(parts, use_lxd): | |||
@click.option("--unprime", is_flag=True, required=False, cls=HiddenOption) |
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 note, newer click versions added hidden=true so we can use that when we upgrade click.
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.
The implementation of this feature is not obvious and addresses a number of small pitfalls found when exposing the provider-built prime back to the outer environment, including unpriming/repriming (but I see no painless alternative to this). Overall the implementation is functional and probably as clean as it can be given all the details it must deal with. Good work!
Any time we need to deal with state inside the container/VM it becomes a matter of re-execution and knowing where you are standing, so yeah, you are correct, this has not been the easiest :-) |
./runtests.sh static
?./runtests.sh tests/unit
?