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: destroy on create failures #2374

Merged
merged 2 commits into from Oct 20, 2018

Conversation

sergiusens
Copy link
Collaborator

When launch fails within the context manager, there is not logic that
ensures the build provider is actually destroyed so the VM does not
stay running.

LP: #1792242

  • 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?

When launch fails within the context manager, there is not logic that
ensures the build provider is actually destroyed so the VM does not
stay running.

LP: #1792242
@kyrofa
Copy link
Contributor

kyrofa commented Oct 19, 2018

+78 −31 😞

@sergiusens
Copy link
Collaborator Author

mostly tests :-)

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2374   +/-   ##
=========================================
  Coverage          ?   90.29%           
=========================================
  Files             ?      196           
  Lines             ?    12742           
  Branches          ?     1924           
=========================================
  Hits              ?    11505           
  Misses            ?      840           
  Partials          ?      397
Impacted Files Coverage Δ
...apcraft/internal/build_providers/_base_provider.py 87.12% <100%> (ø)
snapcraft/internal/build_providers/errors.py 97.05% <100%> (ø)
.../internal/build_providers/_multipass/_multipass.py 84.34% <81.81%> (ø)

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 eafd6d6...22da9a2. Read the comment docs.

@sergiusens sergiusens merged commit ec0fbe2 into canonical:master Oct 20, 2018
@sergiusens sergiusens deleted the build-providers-destroy branch October 20, 2018 16:00
xnox pushed a commit to xnox/snapcraft that referenced this pull request Jul 3, 2020
When launch fails within the context manager, there is not logic that
ensures the build provider is actually destroyed so the VM does not
stay running.

LP: #1792242
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