Skip to content

sha256 of http_archive is not checked #10630

@linzhp

Description

@linzhp

Description of the problem / feature request:

The sha256 of http_archive is not checked on macOS sometimes

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Checkout bazel-contrib/bazel-gazelle@92bc7b0
  2. Run bazel build //:gazelle, verify it succeeds
  3. Apply the following patch, which changed the rules_go version without changing its sha:
diff --git a/WORKSPACE b/WORKSPACE
index 867d957..e95f7c3 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -6,8 +6,8 @@ http_archive(
     name = "io_bazel_rules_go",
     sha256 = "b27e55d2dcc9e6020e17614ae6e0374818a3e3ce6f2024036e688ada24110444",
     urls = [
-        "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.21.0/rules_go-v0.21.0.tar.gz",
-        "https://github.com/bazelbuild/rules_go/releases/download/v0.21.0/rules_go-v0.21.0.tar.gz",
+        "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.20.4/rules_go-v0.20.4.tar.gz",
+        "https://github.com/bazelbuild/rules_go/releases/download/v0.20.4/rules_go-v0.20.4.tar.gz",
     ],
 )
  1. Run bazel build //:gazelle again. It still succeeds

What operating system are you running Bazel on?

macOS 10.15.2

What's the output of bazel info release?

release 2.0.0

Any other information, logs, or outputs that you want to share?

The same issue can be reproduced since at least Bazel 1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions