bazelbuild/bazel

Repo failure can cause false credential helper error/warning messages

Open

#24,039 opened on Oct 21, 2024

View on GitHub
 (1 comment) (1 reaction) (1 assignee)Java (25,384 stars) (4,465 forks)batch import
P2bad error messaginghelp wantedteam-ExternalDepstype: bug

Description

Description of the bug:

If a repo rule fails whilst credential helpers are executing, the result is multiple credential helper warnings that can appear both before and after the repo rule error. The result is that the user is diverted to investigating credential helper issues that are not real.

It appears that when bazel aborts credential helper invokations after a repo failure in different thread, warning messages are emitted. These can include:

  • credential helper timeout
  • credential helper parse error
  • attempting to fetch X despite credential helper issue
  • failed to fetch X, due to 401 error (because credential helper was stopped)

After an error, threads that are forced to stop should not generate warning or error messages after the force stop.

This happens even with --experimental_worker_for_repo_fetching=off

Which category does this issue belong to?

External Dependency

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

No response

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

7.4.0rc2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

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

No response

Contributor guide