gradle-consistent-versions icon indicating copy to clipboard operation
gradle-consistent-versions copied to clipboard

this plugin strobes when writing lock state

Open carrino opened this issue 5 years ago • 7 comments

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

carrino avatar Jan 21 '20 21:01 carrino

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?

iamdanfox avatar Jan 22 '20 11:01 iamdanfox

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.

mglazer avatar Jan 22 '20 15:01 mglazer

Sorry, didn't mean to close. I'm only seemingly able to reproduce this within the CI environment.

mglazer avatar Jan 22 '20 15:01 mglazer

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 avatar Jan 22 '20 19:01 carrino

@carrino can you share the output from ./gradlew why? Or even just obfuscated?

iamdanfox avatar Jan 22 '20 20:01 iamdanfox

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

carrino avatar Jan 23 '20 21:01 carrino

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.

dansanduleac avatar Feb 14 '20 18:02 dansanduleac