Skip to content

ci: make publish build deterministic (scope to library AARs, drop flaky test gate + clean)#18

Merged
Fiona2016 merged 1 commit into
publishfrom
ci/fix-kover-clean-conflict
May 31, 2026
Merged

ci: make publish build deterministic (scope to library AARs, drop flaky test gate + clean)#18
Fiona2016 merged 1 commit into
publishfrom
ci/fix-kover-clean-conflict

Conversation

@Fiona2016
Copy link
Copy Markdown
Collaborator

@Fiona2016 Fiona2016 commented May 31, 2026

Summary

Make the publish job fast and deterministic. Build step becomes ./gradlew bundleReleaseAar --stacktrace plus timeout-minutes: 90.

Why each change

  1. bundleReleaseAar instead of clean assembleReleaseassembleRelease at the root also assembles the sample apps (sample/*, Us1–Us5 flavors) + benchmark/tools, which pushed the job past 2h. bundleReleaseAar is an Android-library-only task: it compiles and packages every publishable module's .aar and skips the sample application modules automatically. Deterministic fail-fast gate, ~8 min.

  2. Do not run testReleaseUnitTest in the publish path. Investigation (JDK 17, matching CI) found the libraries all build, but dd-sdk-android-core carries flaky timing/performance unit testsKronosTimeProviderTest (±10 ms window), MoveDataMigrationOperationTest (500 ms retry-delay window), and JointToStringVsStringBuilderPerformanceTest — a different one fails each run under load. Gating publishing on them makes releases nondeterministic. They should run in a separate CI workflow that can retry/quarantine. bundleReleaseAar still proves every shipped module compiles and packages.

  3. Drop clean — unnecessary on an ephemeral runner; it also raced with Kover's kover-agent.args generation when combined with the test task.

Verification (local, JDK 17 = CI's JDK)

  • All bundleReleaseAar tasks succeed — the gate is green.
  • trace/rum/session-replay/cronet failures seen earlier were JDK 21-only (local) and pass on JDK 17; core's failures are the flaky timing tests above. None block the deterministic build gate.

🤖 Generated with Claude Code

The previous change ran `clean bundleReleaseAar testReleaseUnitTest` in one
Gradle invocation, which failed on `:dd-sdk-android-core:testReleaseUnitTest`
with `java.io.FileNotFoundException: .../testReleaseUnitTest/kover-agent.args
(No such file or directory)`: `clean` wipes `build/tmp` and races with Kover's
agent-args generation when they run in the same invocation.

Reproduced locally: `clean + testReleaseUnitTest` together fails identically;
`testReleaseUnitTest` alone succeeds. `clean` is unnecessary anyway — the CI
runner is ephemeral (fresh checkout, empty build/, only ~/.gradle is cached),
so drop it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Fiona2016 Fiona2016 merged commit 73521ed into publish May 31, 2026
1 check passed
@Fiona2016 Fiona2016 changed the title ci: drop clean from build step (fixes Kover kover-agent.args failure) ci: make publish build deterministic (scope to library AARs, drop flaky test gate + clean) May 31, 2026
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