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

"an input to unknown location has changed" with experiment-configuration-cache #776

Closed
SimonMarquis opened this issue Dec 20, 2024 · 10 comments

Comments

@SimonMarquis
Copy link

SimonMarquis commented Dec 20, 2024

While upgrading to the new Develocity naming, the experiment-config-cache workflow started acting weird.

Specifically, the 2 Gradle run (in the same GHA job) does not re-use the configuration cache, because of "Calculating task graph as configuration cache cannot be reused because an input to unknown location has changed." as you can see here: https://github.com/SimonMarquis/SealedObjectInstances/actions/runs/12432422305/job/34712511059#step:4:259

And the corresponding Gradle Scan does not show what it is but "an input to unknown location has changed ": https://scans.gradle.com/s/46lwbdtmths4c/performance/configuration#summary-configuration-caching-cache-invalidation-reason

On my local environment it works as expected. The configuration cache is first stored, then restored on 2nd run.

Any tips on how to debug this further?

EDIT: --info does not seem to be helpful.
EDIT: using Gradle 8.11.1

@SimonMarquis
Copy link
Author

I found 3 interesting things from the Gradle configuration cache reports:

  • GIT_TRACE_PERFORMANCE input (env variable) is in the 1st execution only
  • durian.plugins.com.diffplug.common.base.Errors.Plugins.Log input (system property) is also in the 1st execution
  • there are 40 files from .gradle/caches/modules-2/ that are also part of the 1st execution only.

@erichaagdev
Copy link
Member

erichaagdev commented Dec 20, 2024

Hi, @SimonMarquis. Thanks for taking the time to report this.

I can't think of a reason why the rename would cause this. My first theory is it has something to do with the setup-gradle step that we include, though I haven't been able to investigate deeply. If you don't mind experimenting, I wonder if you could try to copy the action and exclude the setup-gradle step to see if it helps at all. Please let me know.

@SimonMarquis
Copy link
Author

Unfortunately I got the same result: "Calculating task graph as configuration cache cannot be reused because an input to unknown location has changed."

https://github.com/SimonMarquis/SealedObjectInstances/actions/runs/12433656005?pr=313

@SimonMarquis
Copy link
Author

SimonMarquis commented Dec 20, 2024

It seems like that configuring Gradle with my own setup-gradle solved the issue. 🎉
I tried to also force the cache-disabled: true but it worked the same way 🤷

@SimonMarquis
Copy link
Author

It seems like to only appear when running on the main (default) branch 🤔

@SimonMarquis
Copy link
Author

Clearing GitHub action's cache fixes the issue, for 1 build...
Then it fails again 🤯

@erichaagdev
Copy link
Member

Hi @SimonMarquis. Is this still an issue? I see your latest runs are successful.

@SimonMarquis
Copy link
Author

I'm not 100% sure why/how it happens since Gradle does not really say what the input change is. The attempts only show flakiness when clearing the entire cache.
I suspected the issue was coming from spotless that I recently upgraded to a beta version, and I ended up reverting it.
I'll see when the stable version is released if the issue persists.

@SimonMarquis
Copy link
Author

Indeed, this is still happening now with the same Cache miss reason: an input to unknown location has changed.

@erichaagdev
Copy link
Member

@SimonMarquis I don't believe this is an issue with the scripts or the experiment. We eliminated the possibility that it was caused by the rename by copying & pasting the action code.

I see this issue gradle/gradle#25469 that seems to be related to the error you're seeing. I would ask you to give it a 👍, but I see you already have. Since you seem to be able to reproduce it, perhaps you could share the steps to do so over in that issue?

I am going to go ahead and close this issue since we determined this is not an issue caused by this project.

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

No branches or pull requests

2 participants