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

When _can_ ClearBuildCacheMutator(BUILD) be used? #518

Open
joshfriend opened this issue Nov 21, 2023 · 1 comment
Open

When _can_ ClearBuildCacheMutator(BUILD) be used? #518

joshfriend opened this issue Nov 21, 2023 · 1 comment
Labels

Comments

@joshfriend
Copy link
Contributor

joshfriend commented Nov 21, 2023

clear-build-cache-before: Deletes the contents of the build cache before the scenario is executed (SCENARIO), before cleanup (CLEANUP) or before the build is executed (BUILD).

For a scenario using clear-build-cache-before = BUILD or CLEANUP I get errors when using both the tooling api and cli executors:

ClearBuildCacheMutator(BUILD) is not allowed to be executed between builds with invoker Tooling API
ClearBuildCacheMutator(BUILD) is not allowed to be executed between builds with invoker `gradle` command
ClearBuildCacheMutator(CLEANUP) is not allowed to be executed between builds with invoker Tooling API
ClearBuildCacheMutator(CLEANUP) is not allowed to be executed between builds with invoker `gradle` command

It seems that the clear build cache mutator is only usable between scenarios, which is not useful for my case where I want to force a clean local cache on each iteration. I can probably just disable local cache entirely to always force remote cache, but that doesn't really realistically represent the scenario i want to benchmark.

@asodja
Copy link
Member

asodja commented Nov 22, 2023

It should be possible to use it with --no-daemon flag for BUILD and CLEANUP.

The reason why it's not allowed with other invokers is, that daemon keeps cache open or even keep some data in memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants