gradle / wrapper-validation-action

Gradle Wrapper Validation Action
https://github.com/marketplace/actions/gradle-wrapper-validation
MIT License
259 stars 58 forks source link

Request timeout: /distributions/gradle-8.7-rc-3-wrapper.jar.sha256 #191

Closed Omico closed 4 months ago

Omico commented 8 months ago

image

JLLeitschuh commented 7 months ago

@bigdaz is there a potential that this occurred during an RC release? Perhaps there's some race condition between the JSON and the sha256 checksum existing in the AWS bucket?

Omico commented 7 months ago

I guess if we merge #186, the problem can be solved.

bigdaz commented 7 months ago

@Omico Do you see this error consistently, or did it resolve itself? You're right that a new release with the latest checksums would have prevented this failure, but the fetch-on-demand functionality should continue to work for newly released Gradle versions.

JLLeitschuh commented 7 months ago

You're right that a new release with the latest checksums would have prevented this failure, but the fetch-on-demand functionality should continue to work for newly released Gradle versions.

Sorry, to clarify, do you know if the Gradle release process uploads the https://services.gradle.org/distributions/gradle-[VERSION]-wrapper.jar.sha256 first, or updates the https://services.gradle.org/versions/all first.

Depending upon ordering in the https://github.com/gradle/gradle release process, there could be a race condition where the wrapper-validation-action has pulled the https://services.gradle.org/versions/all, but the https://services.gradle.org/distributions/gradle-[VERSION]-wrapper.jar.sha256 doesn't exist yet.

bigdaz commented 7 months ago

Sorry, to clarify, do you know if the Gradle release process uploads the https://services.gradle.org/distributions/gradle-[VERSION]-wrapper.jar.sha256 first, or updates the https://services.gradle.org/versions/all first.

I don't have any knowledge of this process.

Omico commented 7 months ago

but the https://services.gradle.org/distributions/gradle-[VERSION]-wrapper.jar.sha256 doesn't exist yet.

It exists. I can download it manually when I face this issue, but I tried multiple times, and the CI always failed. https://services.gradle.org/distributions/gradle-8.7-rc-3-wrapper.jar.sha256

I circumvented this problem by hardcoding the hash.

      - uses: gradle/wrapper-validation-action@v2
        with:
          allow-checksums: 'cb0da6751c2b753a16ac168bb354870ebb1e162e9083f116729cec9c781156b8'

Now, the issue cannot be reproduced and is becoming a mystery. 🫠

I removed the allow-checksums and tried 8.7-rc-4, which works. Then I tried 8.7-rc-3 again, which also works.