Skip to content

Handle Access Denied error when cleaning up build directory on Windows #960

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

Merged
merged 3 commits into from
May 17, 2022

Conversation

jonsimantov
Copy link
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

Some of the build artifacts on Windows end up as read-only files, which shutil.rmtree doesn't handle by default. Pass in an onerror handler to make the files writable and try again.

This causes the disk space usage of build_testapps on Windows desktop to drop from 11GB+ to 2.5GB.


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Tested in #959 and in this PR's integration tests.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@jonsimantov jonsimantov requested a review from DellaBitta May 16, 2022 21:54
@jonsimantov jonsimantov added the tests-requested: quick Trigger a quick set of integration tests. label May 16, 2022
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels May 16, 2022
@jonsimantov jonsimantov removed the tests: in-progress This PR's integration tests are in progress. label May 16, 2022
@github-actions
Copy link

github-actions bot commented May 16, 2022

Integration test with FLAKINESS (succeeded after retry)

Requested by @jonsimantov on commit 0fa2eba
Last updated: Mon May 16 20:21 PDT 2022
View integration test log & download artifacts

Failures Configs
firestore [TEST] [FLAKINESS] [iOS] [macos] [1/2 ios_device: ios_target]
(1 failed tests)  FirestoreIntegrationTest.AuthWorks

Add flaky tests to go/fpl-cpp-flake-tracker

@jonsimantov jonsimantov added the tests-requested: quick Trigger a quick set of integration tests. label May 16, 2022
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests-requested: quick Trigger a quick set of integration tests. labels May 16, 2022
@jonsimantov jonsimantov added the tests-requested: quick Trigger a quick set of integration tests. label May 16, 2022
@github-actions github-actions bot removed tests-requested: quick Trigger a quick set of integration tests. tests: failed This PR's integration tests failed. labels May 16, 2022
@jonsimantov jonsimantov requested a review from sunmou99 May 16, 2022 22:08
Copy link
Contributor

@sunmou99 sunmou99 left a comment

Choose a reason for hiding this comment

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

This is an interesting solution. I saw similar problems before, and I just added os.chmod before the code that is causing the problem.

@jonsimantov jonsimantov added the skip-release-notes Skip release notes check label May 17, 2022
@jonsimantov jonsimantov enabled auto-merge (squash) May 17, 2022 00:11
@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label May 17, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label May 17, 2022
@jonsimantov jonsimantov merged commit 0fa2eba into main May 17, 2022
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests: succeeded This PR's integration tests succeeded. labels May 17, 2022
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label May 17, 2022
@firebase firebase locked and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-release-notes Skip release notes check tests: succeeded This PR's integration tests succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants