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

Inefficient caching of Android binary artifacts Vs libraries/tests. #18565

Open
oliviernotteghem opened this issue Jun 2, 2023 · 1 comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Android Issues for Android team type: feature request

Comments

@oliviernotteghem
Copy link

oliviernotteghem commented Jun 2, 2023

Description of the feature request:

TL;DR; In order to properly populate remote cache for developers, one has to build both android binaries and android/jvm libraries. This is costly and inefficient, as it requires double CI capacity/jobs. Can we please fix this?

When building android binaries, target platform is changed to android and artifacts are not shared when, let's say, a developer build the corresponding android library(ies) to run locally a unit test. In this case, the target platform is the local machine.
This means that, in order to have cache hits for both building project android binaries and project libraries/unit test/robolectric tests, we need to build both separately on CI. As these are not sharing output artifacts, jobs takes twice longer. Our CI cost essentially is doubled.

Fixing this means for most company significant $ savings. This problem is exacerbated by the fact we need to run build separately on both linux and mac.

What underlying problem are you trying to solve with this feature?

Avoiding having to rebuild project twice on CI when populating remote cache for local devs.

Which operating system are you running Bazel on?

Mac/Linux

What is the output of bazel info release?

No response

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 master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

Found an undocumented flag 'experimental_platform_in_output_dir' which could potentially help.

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

No response

@fmeum
Copy link
Collaborator

fmeum commented Jun 7, 2023

One half of this is on the Bazel 7 roadmap, the other one is probably covered by #6526. Both are actively being worked on.

@ahumesky ahumesky added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Jan 23, 2024
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-Android Issues for Android team type: feature request
Projects
None yet
Development

No branches or pull requests

6 participants
@fmeum @ahumesky @sgowroji @oliviernotteghem @Pavank1992 and others