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

Verifying the hash of downloaded Bazel binary #295

Merged
merged 3 commits into from
Mar 4, 2022

Conversation

linzhp
Copy link
Contributor

@linzhp linzhp commented Jan 24, 2022

In some areas with unstable or slow internet, the downloaded Bazel may be corrupted. We should verify the hash of the downloaded binary, delete the binary and prompt users to try again if it is corrupted. For backward compatibility for existing mirrors that don't have sha256 file, we will skip the verification if the ".sha256" file doesn't exist.

Formatting

Don't create tempfile

more strict about sha256 file

Python 2 compatibility

Improve error message
@linzhp
Copy link
Contributor Author

linzhp commented Feb 1, 2022

@philwo Would you mind also taking a look at this?

@linzhp
Copy link
Contributor Author

linzhp commented Mar 2, 2022

@fweikert Would you mind taking a look at this too?

bazelisk.py Show resolved Hide resolved
@fweikert fweikert merged commit 81f38ed into bazelbuild:master Mar 4, 2022
@linzhp linzhp deleted the hash branch May 30, 2022 21:04
gcf-merge-on-green bot referenced this pull request in googleapis/gapic-generator-typescript Jul 22, 2022
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@bazel/bazelisk](https://togithub.com/bazelbuild/bazelisk) | [`^1.11.0` -> `^1.12.0`](https://renovatebot.com/diffs/npm/@bazel%2fbazelisk/1.11.0/1.12.0) | [![age](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/compatibility-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@bazel%2fbazelisk/1.12.0/confidence-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>bazelbuild/bazelisk</summary>

### [`v1.12.0`](https://togithub.com/bazelbuild/bazelisk/releases/tag/v1.12.0)

[Compare Source](https://togithub.com/bazelbuild/bazelisk/compare/v1.11.0...v1.12.0)

This release brings new features and fixes to both versions of Bazelisk:

Go:

-   Added support for basic HTTP authentication via a .netrc file ([https://github.com/bazelbuild/bazelisk/pull/292](https://togithub.com/bazelbuild/bazelisk/pull/292))
-   Improved and fixed Apple Silicon support ([https://github.com/bazelbuild/bazelisk/pull/299](https://togithub.com/bazelbuild/bazelisk/pull/299), [https://github.com/bazelbuild/bazelisk/pull/303](https://togithub.com/bazelbuild/bazelisk/pull/303))
-   Rolling releases are now fetched from GCS instead of GitHub ([https://github.com/bazelbuild/bazelisk/pull/319](https://togithub.com/bazelbuild/bazelisk/pull/319))

Python:

-   Added support for Apple Silicon ([https://github.com/bazelbuild/bazelisk/pull/272](https://togithub.com/bazelbuild/bazelisk/pull/272))
-   Implemented verification of downloaded Bazel binaries ([https://github.com/bazelbuild/bazelisk/pull/295](https://togithub.com/bazelbuild/bazelisk/pull/295))

We'd like to thank our contributors [@&#8203;chenrui333](https://togithub.com/chenrui333), [@&#8203;codeman9](https://togithub.com/codeman9), [@&#8203;cpsauer](https://togithub.com/cpsauer), [@&#8203;keith](https://togithub.com/keith), [@&#8203;linzhp](https://togithub.com/linzhp), [@&#8203;Warchant](https://togithub.com/Warchant) and [@&#8203;xinnjie](https://togithub.com/xinnjie)!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-generator-typescript).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjIuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEyMi4xIn0=-->
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.

2 participants