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

Failure during briefcase create can leave build in unstable state #411

Open
freakboy3742 opened this issue May 27, 2020 · 1 comment
Open
Labels
bug A crash or error in behavior.

Comments

@freakboy3742
Copy link
Member

This was discovered using Linux builds, but it almost certainly exists on any platform where an explicit build step exists.

To replicate:

  • Create a helloworld project
  • Modify pyproject.toml, adding a support_package entry that points to a non-existent support package.
  • Run briefcase build linux. The build will fail, but a linux directory will exist.
  • Remove the support package reference from pyproject.toml.
  • Re-run briefcase build linux.

The build will fail because the Docker container doesn't exist. The Docker container is constructed as part of the create command, but the part of the build command that detects whether the create command completed successfully isn't a reliable test of "end state completeness".

Either:

  1. the create command should clean up after itself if it fails, or
  2. the build command should use a different mechanism to test that create succeeded.

One option would be to use an explicit "stage finished" file marker - a hidden file dropped in the platform directory that can be used as an explicit marker that "this step finished successfully".

This is potentially an issue on any of the implied steps (e.g., run -> build -> create could fail at any point in that process if the "do I need to build" check isn't a 100% reliable test of did the previous build complete).

@freakboy3742 freakboy3742 added bug A crash or error in behavior. up-for-grabs labels May 27, 2020
@freakboy3742
Copy link
Member Author

For clarity: The fix here is simple: manually delete the intermediate directory, and/or only use the explicit commands (create then update, not an update with an implied create). However, since the smarts exist, we should aim to actually make them smart :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

1 participant