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

"ERROR: 'remote' was requested for default strategies but no strategy with that identifier was registered" when using --remote_local_fallback and remote executor is down #13487

Closed
fwingerter-Ocient opened this issue May 18, 2021 · 3 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug

Comments

@fwingerter-Ocient
Copy link

fwingerter-Ocient commented May 18, 2021

Description of the problem:

Even with --remote_local_fallback, builds fail when the remote executor is not reachable.

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

$ git clone https://github.com/bazelbuild/examples/ bazel-examples
$ cd bazel-examples/cpp-tutorial/stage1
$ bazel build //... --remote_local_fallback --remote_executor=asdkfasdf:6890
Starting local Bazel server and connecting to it...
INFO: Invocation ID: fe0d20a4-cc89-4867-bce1-8cf6331fb814
WARNING: Failed to query remote execution capabilities: UNAVAILABLE: Unable to resolve host asdkfasdf
INFO: Analyzed target //main:hello-world (15 packages loaded, 57 targets configured).
INFO: Found 1 target...
ERROR: 'remote' was requested for default strategies but no strategy with that identifier was registered. Valid values are: [processwrapper-sandbox, standalone, worker, sandboxed, local]
INFO: Elapsed time: 5.410s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

The WARNINGs are expected, but the ERROR is not. The ERROR can be prevented by passing --spawn_strategy=local, but this prevents using the remote executor if it is up.

What operating system are you running Bazel on?

Ubuntu 16.04.6 LTS (I know it's ancient, but I don't believe this problem is distro-related)

What's the output of bazel info release?

release 4.1.0rc1

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

https://github.com/bazelbuild/examples/
b1c5b85050fa5f199f40183c84a531e458dcf8aa
b1c5b85050fa5f199f40183c84a531e458dcf8aa

Have you found anything relevant by searching the web?

It seems that this behavior is not intended according to this commit: 39512a4

@jin jin added team-Remote-Exec Issues and PRs for the Execution (Remote) team untriaged labels May 19, 2021
@coeuvre
Copy link
Member

coeuvre commented May 19, 2021

39512a4 was for remote cache. The underlying problem for this error is #13340.

@coeuvre coeuvre added P2 We'll consider working on this in future. (Assignee optional) type: bug and removed untriaged labels May 19, 2021
@coeuvre coeuvre self-assigned this May 19, 2021
coeuvre added a commit to coeuvre/bazel that referenced this issue May 19, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without set `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.
@fwingerter-Ocient
Copy link
Author

The difference between this and #13340 is that I'm not explicitly setting the list of strategies at all here, and the error complains about the "default strategies" set in Bazel's implementation (as far as I can tell).

I'm happy with any changes that fix this use-case, of course. Thanks for looking into this.

coeuvre added a commit to coeuvre/bazel that referenced this issue May 20, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without set `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.
bazel-io pushed a commit that referenced this issue Jun 9, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes #13340 and #13487.

Closes #13490.

PiperOrigin-RevId: 378339904
@coeuvre
Copy link
Member

coeuvre commented Jun 9, 2021

Should be fixed by #13490.

@coeuvre coeuvre closed this as completed Jun 9, 2021
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 15, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.

Closes bazelbuild#13490.

PiperOrigin-RevId: 378339904
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 15, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.

Closes bazelbuild#13490.

PiperOrigin-RevId: 378339904
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 15, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.

Closes bazelbuild#13490.

PiperOrigin-RevId: 378339904
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 15, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.

Closes bazelbuild#13490.

PiperOrigin-RevId: 378339904
coeuvre added a commit to coeuvre/bazel that referenced this issue Jul 16, 2021
…ailable.

So that you can set a `--spawn_strategy` that includes `remote` without setting `--remote_executor`. In addition, if `--remote_local_fallback` is set and `remote_executor` is unreachable when build starts, Bazel will fallback to next available strategy.

Fixes bazelbuild#13340 and bazelbuild#13487.

Closes bazelbuild#13490.

PiperOrigin-RevId: 378339904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug
Projects
None yet
Development

No branches or pull requests

3 participants