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

bazel: unable to fetch non-mirrored dependencies in CI/locally #71679

Closed
irfansharif opened this issue Oct 18, 2021 · 4 comments
Closed

bazel: unable to fetch non-mirrored dependencies in CI/locally #71679

irfansharif opened this issue Oct 18, 2021 · 4 comments
Assignees
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf

Comments

@irfansharif
Copy link
Contributor

irfansharif commented Oct 18, 2021

Describe the problem

Saw the following error in this build for #71225. Is it a known issue?

WARNING: Download from https://github.com/bazelbuild/rules_nodejs/releases/download/4.1.0/rules_nodejs-4.1.0.tar.gz failed: class java.io.IOException GET returned 403 Forbidden
ERROR: An error occurred during the fetch of repository 'build_bazel_rules_nodejs':
   Traceback (most recent call last):
	File "/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
		download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_nodejs/releases/download/4.1.0/rules_nodejs-4.1.0.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/build_bazel_rules_nodejs/temp2605887283821107915/rules_nodejs-4.1.0.tar.gz: GET returned 403 Forbidden
ERROR: Error fetching repository: Traceback (most recent call last):
	File "/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
		download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_nodejs/releases/download/4.1.0/rules_nodejs-4.1.0.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/build_bazel_rules_nodejs/temp2605887283821107915/rules_nodejs-4.1.0.tar.gz: GET returned 403 Forbidden
ERROR: no such package '@build_bazel_rules_nodejs//': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_nodejs/releases/download/4.1.0/rules_nodejs-4.1.0.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/build_bazel_rules_nodejs/temp2605887283821107915/rules_nodejs-4.1.0.tar.gz: GET returned 403 Forbidden

Poking around other failing bors builds, I'm also seeing the following for #71625 (+cc @dt).

[Run Bazel build] ERROR: An error occurred during the fetch of repository 'cmake-3.19.6-Linux-x86_64':
[19:16:34]	[Run Bazel build]    Traceback (most recent call last):
[19:16:34]	[Run Bazel build] 	File "/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
[19:16:34]	[Run Bazel build] 		download_info = ctx.download_and_extract(
[19:16:34]	[Run Bazel build] Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-x86_64.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/cmake-3.19.6-Linux-x86_64/temp2048485385104842867/cmake-3.19.6-Linux-x86_64.tar.gz: GET returned 403 Forbidden
[19:16:34]	[Run Bazel build] ERROR: Error fetching repository: Traceback (most recent call last):
[19:16:34]	[Run Bazel build] 	File "/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
[19:16:34]	[Run Bazel build] 		download_info = ctx.download_and_extract(
[19:16:34]	[Run Bazel build] Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-x86_64.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/cmake-3.19.6-Linux-x86_64/temp2048485385104842867/cmake-3.19.6-Linux-x86_64.tar.gz: GET returned 403 Forbidden
[19:16:34]	[Run Bazel build] ERROR: /go/src/github.com/cockroachdb/cockroach/c-deps/BUILD.bazel:70:6: //c-deps:libgeos depends on @cmake-3.19.6-Linux-x86_64//:cmake_tool in repository @cmake-3.19.6-Linux-x86_64 which failed to fetch. no such package '@cmake-3.19.6-Linux-x86_64//': java.io.IOException: Error downloading [https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-x86_64.tar.gz] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/cmake-3.19.6-Linux-x86_64/temp2048485385104842867/cmake-3.19.6-Linux-x86_64.tar.gz: GET returned 403 Forbidden
[19:16:34]	[Run Bazel build] ERROR: Analysis of target '//c-deps:libgeos' failed; build aborted: Analysis failed
@irfansharif irfansharif added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-build-system labels Oct 18, 2021
@irfansharif
Copy link
Contributor Author

Another instance here for #71350.

	[Run unit tests] Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/ninja_1.10.2_linux/temp9268324977521590621/ninja-linux.zip: GET returned 400 The request URI is invalid.
[18:58:24]	[Run unit tests] ERROR: Error fetching repository: Traceback (most recent call last):
[18:58:24]	[Run unit tests] 	File "/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
[18:58:24]	[Run unit tests] 		download_info = ctx.download_and_extract(
[18:58:24]	[Run unit tests] Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/ninja_1.10.2_linux/temp9268324977521590621/ninja-linux.zip: GET returned 400 The request URI is invalid.
[18:58:24]	[Run unit tests] INFO: Repository remotejdk11_linux instantiated at:
[18:58:24]	[Run unit tests]   /DEFAULT.WORKSPACE.SUFFIX:52:6: in <toplevel>
[18:58:24]	[Run unit tests]   /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
[18:58:24]	[Run unit tests] Repository rule http_archive defined at:
[18:58:24]	[Run unit tests]   /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
[18:58:24]	[Run unit tests] ERROR: /go/src/github.com/cockroachdb/cockroach/c-deps/BUILD.bazel:40:6: //c-deps:libproj depends on @ninja_1.10.2_linux//:ninja_tool in repository @ninja_1.10.2_linux which failed to fetch. no such package '@ninja_1.10.2_linux//': java.io.IOException: Error downloading [https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip] to /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/external/ninja_1.10.2_linux/temp9268324977521590621/ninja-linux.zip: GET returned 400 The request URI is invalid.
[18:58:24]	[Run unit tests] ERROR: Analysis of target '//pkg/geo/geotransform:geotransform_test' failed; build aborted: Analysis failed

I guess it doesn't always break the "make sure generated code is up-to-date" check, but it did for #71225.

@rickystewart
Copy link
Collaborator

As of now at master those dependencies (rules_nodejs-4.1.0.tar.gz, etc.) are mirrored, so we shouldn't encounter this any more :)

@irfansharif
Copy link
Contributor Author

ERROR: An error occurred during the fetch of repository 'com_github_knz_strtime':
   Traceback (most recent call last):
        File "/private/var/tmp/_bazel_irfansharif/99e666e4e674209ecdb66b46371278df/external/bazel_gazelle/internal/go_repository.bzl", line 129, column 17, in _go_repository_impl
                fail("failed to fetch %s: %s" % (ctx.name, result.stderr))
Error in fail: failed to fetch com_github_knz_strtime: fetch_repo: github.com/knz/[email protected]: Get "https://proxy.golang.org/github.com/knz/strtime/@v/v0.0.0-20200318182718-be999391ffa9.info": net/http: TLS handshake timeout
ERROR: Error fetching repository: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_irfansharif/99e666e4e674209ecdb66b46371278df/external/bazel_gazelle/internal/go_repository.bzl", line 129, column 17, in _go_repository_impl
                fail("failed to fetch %s: %s" % (ctx.name, result.stderr))
Error in fail: failed to fetch com_github_knz_strtime: fetch_repo: github.com/knz/[email protected]: Get "https://proxy.golang.org/github.com/knz/strtime/@v/v0.0.0-20200318182718-be999391ffa9.info": net/http: TLS handshake timeout

For local builds, I'm seeing this. I assume this is another issue (un-mirrored go deps)?

@irfansharif irfansharif changed the title bazel: unable to fetch non-mirrored dependencies in CI bazel: unable to fetch non-mirrored dependencies in CI/locally Oct 21, 2021
@rickystewart
Copy link
Collaborator

We're not mirroring Go dependencies at all yet -- work in progress. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf
Projects
None yet
Development

No branches or pull requests

3 participants