Skip to content
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

build-providers: add support for --shell-after #2253

Merged
merged 4 commits into from Sep 10, 2018

Conversation

sergiusens
Copy link
Collaborator

@sergiusens sergiusens commented Sep 8, 2018

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on bug reports?
  • If this is a new feature. Have you discussed the design on the forum?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh tests/unit?

Remove unneeded use of build_options in clean to not over populate it
with options.

LP: #1782769

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Adds support for shelling into the environment after the requested
step has been executed.

LP: #1782767

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
@sergiusens sergiusens changed the title Build providers shell after build-providers: add support for --shell-after Sep 8, 2018
@codecov-io
Copy link

codecov-io commented Sep 8, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@3410ec3). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2253   +/-   ##
=========================================
  Coverage          ?   90.58%           
=========================================
  Files             ?      214           
  Lines             ?    13624           
  Branches          ?     2016           
=========================================
  Hits              ?    12341           
  Misses            ?      886           
  Partials          ?      397
Impacted Files Coverage Δ
snapcraft/cli/lifecycle.py 87.61% <100%> (ø)
snapcraft/cli/_options.py 85.18% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3410ec3...8070d9c. Read the comment docs.

@@ -65,6 +66,8 @@ def _execute(
instance.pack_project(output=output)
else:
instance.execute_step(step)
if shell_after:
instance.shell()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little surprising. What happens if the shell exits with error status, at this point?
I'd expect the shell_after check to be done after we'd cleared the try/except block -- if necessary with its own exception handler.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will raise a proper exception that is captured correctly in our exit handler

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that what you want? the step itself didn't fail, just the shell after. Are the same messages still applicable? Do you want shell and debug to interact in this way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point now. Will fix too

@sergiusens sergiusens merged commit 21cfd47 into canonical:master Sep 10, 2018
@sergiusens sergiusens deleted the build-providers-shell-after branch September 27, 2018 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants