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

Update gradle caching #5

Open
wants to merge 4 commits into
base: androidx-main
Choose a base branch
from
Open

Conversation

yigit
Copy link
Owner

@yigit yigit commented Sep 4, 2021

gradle-command-action action uses the arguments as the cache key and restores dependency cache only in the first run.
This means, it uses the "changed files" as the cache key, which is the same for all projects, making it useless as they'll override each-other.

This PR adds a first invocation to the action and passes the project name as an argument + the toml file.
This should allow each sub project to have its own cache.

There is a certain risk that this might hit the 5GB cache limit as projects won't share cache, causing them to evict each-other (instead of overriding each-other). We don't force exact so it should at least recover from prefix cache key.

Whether this change would help or not is questionable but if we don't get into a cache-eviction race, it might work well.

To be explicit, i disabled the cache for subsequent calls to gradle-command-action and also updated it back to @v1 as the previous issue we hit is fixed.
gradle/gradle-build-action#70

Bug: n/a
Test: CI

gradle-command-action action uses the arguments as the cache key and restores dependency cache only in the first run.
This means, it uses the "changed files" as the cache key, which is the same for all projects, making it useless as they'll override each-other.

This PR adds a first invocation to the action and passes the project name as an argument + the toml file.
This should allow each sub project to have its own cache. 

There is a certain risk that this might hit the 5GB cache limit as projects won't share cache, causing them to evict each-other (instead of overriding each-other). We don't force exact so it should at least recover from prefix cache key.

Whether this change would help or not is questionable but if we don't get into a cache-eviction race, it might work well.

To be explicit, i disabled the cache for subsequent calls to gradle-command-action and also updated it back to @v1  as the previous issue we hit is fixed.
gradle/gradle-build-action#70

Bug: n/a
Test: CI
when builds fail due to connectivity, they take an absurd amount of time and don't recover.
This CL decreases the timeouts to 1 minute but instead doubles the retries to 20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant