Skip to content

Validate the Gradle wrapper with gradle/actions/wrapper-validation@v6, fix a log batch test race - #323

Merged
arifBurakDemiray merged 2 commits into
stagingfrom
ci-wrapper-validation-v6
Oct 23, 2026
Merged

arifBurakDemiray merged 2 commits into
stagingfrom
ci-wrapper-validation-v6

Conversation

@arifBurakDemiray

@arifBurakDemiray arifBurakDemiray commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What

validate_gradle.yml moves from the archived gradle/wrapper-validation-action@v3 to gradle/actions/wrapper-validation@v6, the action family the other workflows already use for setup-gradle@v6.

Why

The old action delegates to gradle/actions/wrapper-validation@v3.5.0. Its bundled list (259 checksums) does not have the wrapper JAR of this repository (7d3a4ac4…), so every run fetched the checksums from services.gradle.org. On 2026-10-22 that fetch timed out and failed the check on #275 and #295, while the staging push a minute later passed.

v6.4.0 bundles 373 checksums, this JAR's among them, and fetches only for a JAR it does not know.

Verified

  • The JAR's checksum is in the wrapper-checksums.json of v6.4.0 and not in the one of v3.5.0.
  • v6 keeps the inputs the workflow relies on (min-wrapper-count, allow-snapshots), both left at their defaults.
  • Dependabot's github-actions entry updates gradle/actions/wrapper-validation like the other gradle/actions steps.

Also: a log batch test race

SdkLogGatheringTests.trackingOffHold_keepsTheNewest500Lines_andDAccountsForEveryDroppedLine failed on this PR's first ubuntu run at line 201: lines were still held after the test waited for every batch to be sent.

The send callback in DefaultNetworking removes a sent log batch, then calls Log.onLogBatchSent(), which lets the logger queue the next one. awaitSentBatches waited for the stored batches to reach zero, so it could end between those two steps and see no batch on disk while the logger still held lines.

awaitSentBatches now also waits for the networking task that sent the batch (its callback runs inside it), then for the log delivery. DefaultNetworking.tasks is package-private for that; nothing else changes in the SDK.

Verified

  • With a 200 ms pause added locally between the removal and onLogBatchSent(), the old wait fails this test (expected:<0> but was:<475>) and armedDirective_uploadsTheInitLinesOfItsLevels_withTheGatherIdInBatchesOfAtMostB; the new wait passes all 13 tests of the class.
  • Same class of race as Wait for the lines logged after a request's removal before asserting them #322: something the SDK does after it removes a request.
  • Full suite locally (Java 8): 739 of 739.

🤖 Generated with Claude Code

The archived gradle/wrapper-validation-action@v3 delegates to
gradle/actions/wrapper-validation@v3.5.0, whose bundled checksums
predate the wrapper JAR of this repository, so every run fetched them
from services.gradle.org and a network timeout failed the check. v6
bundles the checksum of this JAR and validates it without a network
call.
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Dependency security scan

Scanned 25 resolved dependencies, failing on HIGH and above.

No known vulnerabilities in 25 resolved dependencies.

Result: passed

Full run log

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Unit Test Results 🚀

739 tests  ±0   739 ✅ +1   2m 48s ⏱️ -2s
 64 suites ±0     0 💤 ±0 
 64 files   ±0     0 ❌  - 1 

Results for commit 0c9f587. ± Comparison against base commit c0b090d.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Code coverage

module lines branches
sdk-java 89.8% (7234/8054) 80.1% (3203/4000)
sdk-java-ui 70.5% (968/1374) 63.2% (499/790)

Files changed by this pull request

file lines covered
sdk-java/src/main/java/ly/count/sdk/java/internal/DefaultNetworking.java 83.8% (150/179)
Least covered classes (10 shown)
class module lines covered uncovered
ly.count.sdk.java.ui.JavaFxContentDisplay sdk-java-ui 10.6% (23/216) 193
ly.count.sdk.java.ui.FxSurfaces sdk-java-ui 74.8% (172/230) 58
ly.count.sdk.java.ui.ExternalBrowser sdk-java-ui 55.0% (66/120) 54
ly.count.sdk.java.internal.SDKCore sdk-java 89.0% (363/408) 45
ly.count.sdk.java.ui.JavaFxWidgetHost sdk-java-ui 81.2% (190/234) 44
ly.count.sdk.java.internal.ModuleRequests sdk-java 75.9% (132/174) 42
ly.count.sdk.java.internal.ModuleContent sdk-java 89.7% (280/312) 32
ly.count.sdk.java.internal.TimedEvents sdk-java 60.8% (48/79) 31
ly.count.sdk.java.internal.SessionImpl sdk-java 90.1% (274/304) 30
ly.count.sdk.java.internal.SDKStorage sdk-java 84.5% (158/187) 29

Full run log

The networking removes a sent log batch and only then lets the logger
queue the next one, so the tests' wait for sent batches could end in
between and find lines still held ("expected:<0> but was:<475>" on CI).
It now also waits for the networking task that sent the batch, for which
DefaultNetworking.tasks is package-private.
@arifBurakDemiray arifBurakDemiray changed the title Validate the Gradle wrapper with gradle/actions/wrapper-validation@v6 Validate the Gradle wrapper with gradle/actions/wrapper-validation@v6, fix a log batch test race Oct 23, 2026
@arifBurakDemiray
arifBurakDemiray merged commit a261452 into staging Oct 23, 2026
16 of 17 checks passed
@arifBurakDemiray
arifBurakDemiray deleted the ci-wrapper-validation-v6 branch October 23, 2026 08:10
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

Successfully merging this pull request may close these issues.

1 participant