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

mobile-install fails with BWOB #14523

Closed
jlaxson opened this issue Jan 6, 2022 · 5 comments
Closed

mobile-install fails with BWOB #14523

jlaxson opened this issue Jan 6, 2022 · 5 comments
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

@jlaxson
Copy link
Contributor

jlaxson commented Jan 6, 2022

Description of the problem / feature request:

When running a command like bazel mobile-install --remote_download_outputs=minimal //:my_target, the action fails with an error like:

FileNotFoundError: [Errno 2] No such file or directory: './bazel-out/arm64-v8a-opt/bin/libs/tsdf/_dx/tsdf_android/classes.dex.zip'

It succeeds if you switch --remote_download_outputs=minimal for --remote_download_outputs=all

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

bazel mobile-install --remote_download_outputs=minimal //:my_android_binary_target

What operating system are you running Bazel on?

macOS 12

What's the output of bazel info release?

release 5.0.0-pre.20210708.4

Have you found anything relevant by searching the web?

No mentions of classes.dex.zip in bazel issues.

@Bencodes
Copy link
Contributor

Bencodes commented Jan 7, 2022

@jlaxson You might want to try --remote_download_outputs=toplevel so that Bazel knows to download the outputs for //:my_target.

@brentleyjones
Copy link
Contributor

cc @coeuvre

@ahumesky
Copy link
Contributor

cc @tjgq

@ahumesky ahumesky added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Oct 25, 2022
@tjgq tjgq added team-Remote-Exec Issues and PRs for the Execution (Remote) team and removed team-Android Issues for Android team labels Oct 25, 2022
@coeuvre
Copy link
Member

coeuvre commented Oct 26, 2022

I think this can be solved by a similar approach like #16545.

copybara-service bot pushed a commit that referenced this issue May 19, 2023
They were missing from the inputs, but since the action had the LOCAL execution requirement it ran locally without sandboxing, so this bug could only be triggered by building without the bytes.

Also change the execution requirement to NO_REMOTE, which permits sandboxing and would have caught this issue even when building with the bytes.

Related to #14523.

PiperOrigin-RevId: 533549342
Change-Id: I731f15071e5e08822a298abc5146b91a56ba1071
@tjgq
Copy link
Contributor

tjgq commented May 22, 2023

In my testing, mobile-install now seems to work with --remote_download_minimal. @jlaxson - would you be able to confirm this by building your project with head Bazel? (the last relevant commit was 2b104c8).

fweikert pushed a commit to fweikert/bazel that referenced this issue May 25, 2023
They were missing from the inputs, but since the action had the LOCAL execution requirement it ran locally without sandboxing, so this bug could only be triggered by building without the bytes.

Also change the execution requirement to NO_REMOTE, which permits sandboxing and would have caught this issue even when building with the bytes.

Related to bazelbuild#14523.

PiperOrigin-RevId: 533549342
Change-Id: I731f15071e5e08822a298abc5146b91a56ba1071
@tjgq tjgq closed this as completed May 31, 2023
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

7 participants