Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

handle nested exceptions during cleanup on function deploy failures #172

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

andrew-slutsky
Copy link
Contributor

Summary of the Pull Request

If subprocess.check_output() raises an exception, the handler for TemporaryDirectory() attempts to delete tmpdirname. This causes a permissions error since the terminal's cwd has been changed to tmpdirname. I'm not sure if this happens on Linux but on Windows, another exception is throw along with the error returned by check_output().

PR Checklist

  • CLA signed. If not, go over here and sign the CLI.
  • Tests added/passed

Info on Pull Request

This fix removes the need to use os.chdir().

Validation Steps Performed

I tested this fix using Windows but not Linux.

@bmc-msft bmc-msft linked an issue Oct 19, 2020 that may be closed by this pull request
@bmc-msft bmc-msft changed the title Fixes issue #171 where an exception raised by src/deployment/deploy::subprocess.check_output() results in two exceptions being displayed instead of one handle nested exceptions during cleanup on function deploy failures Oct 19, 2020
@bmc-msft bmc-msft merged commit 85f9ecc into microsoft:main Oct 19, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested exceptions during failure of azure function deployment
2 participants