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

[7.3.0] Ensure that downloads are cancelled on repo rule restart #22757

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

bazel-io
Copy link
Member

When a repository rule is restarted due to memory pressure, all its downloads must be interrupted. While this happened for repository_ctx.download, the download_and_extract method did not register its PendingTask. Since downloads happen on a separate executor, they would continue even through restarts, leading to warnings (see below) or even left over download temp directories.

WARNING: Download from https://github.com/uutils/coreutils/releases/download/0.0.26/coreutils-0.0.26-aarch64-apple-darwin.tar.gz failed: class java.io.FileNotFoundException /private/var/tmp/_bazel_fmeum/0465a0857e26a35c072f48ab751a1794/external/aspect_bazel_lib~~toolchains~coreutils_darwin_arm64/temp2576567839043404337/coreutils-0.0.26-aarch64-apple-darwin.tar.gz (No such file or directory)

Closes #22748.

PiperOrigin-RevId: 643389876
Change-Id: Ia2cab4b4d73340379c17d4a1e5c327ff43505050

Commit 2fb187f

When a repository rule is restarted due to memory pressure, all its downloads must be interrupted. While this happened for `repository_ctx.download`, the `download_and_extract` method did not register its `PendingTask`. Since downloads happen on a separate executor, they would continue even through restarts, leading to warnings (see below) or even left over download temp directories.

```
WARNING: Download from https://github.com/uutils/coreutils/releases/download/0.0.26/coreutils-0.0.26-aarch64-apple-darwin.tar.gz failed: class java.io.FileNotFoundException /private/var/tmp/_bazel_fmeum/0465a0857e26a35c072f48ab751a1794/external/aspect_bazel_lib~~toolchains~coreutils_darwin_arm64/temp2576567839043404337/coreutils-0.0.26-aarch64-apple-darwin.tar.gz (No such file or directory)
```

Closes bazelbuild#22748.

PiperOrigin-RevId: 643389876
Change-Id: Ia2cab4b4d73340379c17d4a1e5c327ff43505050
@bazel-io bazel-io requested a review from a team as a code owner June 14, 2024 18:05
@bazel-io bazel-io added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Jun 14, 2024
@bazel-io bazel-io requested a review from meteorcloudy June 14, 2024 18:05
@meteorcloudy meteorcloudy added this pull request to the merge queue Jun 17, 2024
Merged via the queue into bazelbuild:release-7.3.0 with commit f5f7403 Jun 17, 2024
33 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants