gradle-consistent-versions
gradle-consistent-versions copied to clipboard
this plugin strobes when writing lock state
What happened?
I can run this plugin a few times and get different outputs, this causes my circle tests to fail.
example
-org.slf4j:slf4j-api:1.7.28 (61 constraints: a7dcb237)
+org.slf4j:slf4j-api:1.7.28 (60 constraints: 59cdc4b7)
here is another run with the same git repo
-org.slf4j:slf4j-api:1.7.28 (61 constraints: a7dcb237)
+org.slf4j:slf4j-api:1.7.28 (63 constraints: 25fe1336)
3rd run produces the original values of 61 constraints: a7dcb237
What did you want to happen?
Not strobing
I've seen something kinda similar, where CircleCI and local dev disagree, but clearing out the local gradle cache seems to fix it:
find ~/.gradle/caches/modules-2/metadata-* -delete
Does anyone else on your team reproduce this problem? What about CI?
Do add further flavor to this, what's even odder, is that when I run:
./gradlew why --hash a7dcb237
And then regen locks, and then I run:
./gradlew why --hash 25fe1336
Then take the dependency output from both, and do:
cat deps.txt | wc -l
It's identical.
Sorry, didn't mean to close. I'm only seemingly able to reproduce this within the CI environment.
I can repro this on my machine. I can run it 5 times and get 3 different counts. Can we just remove the count part, as long as the versions are the same it should be good, no?
@carrino can you share the output from ./gradlew why
? Or even just obfuscated?
gw why --hash d7bf4e96
does not consistently return the same output.
some runs have extra lines like
io.dropwizard.metrics:metrics-healthchecks -> 1.7.25
io.dropwizard.metrics:metrics-jvm -> 1.7.25
We've seen some issues due to gradle resolution recently which might be connected, though mostly around grpc (https://github.com/gradle/gradle/issues/12229). In that investigation we noticed that gradle's caches can become different across machines, with some recording a dependency as having a different version than others.