Skip to content

[SDK-115] Drop racy parallel pre-build step from inapp-e2e-tests workflow#1060

Closed
franco-zalamena-iterable wants to merge 1 commit into
masterfrom
SDK-115-bcit-ci
Closed

[SDK-115] Drop racy parallel pre-build step from inapp-e2e-tests workflow#1060
franco-zalamena-iterable wants to merge 1 commit into
masterfrom
SDK-115-bcit-ci

Conversation

@franco-zalamena-iterable

Copy link
Copy Markdown
Contributor

Summary

First commit of SDK-115 (stabilising the BCIT integration-test suite in CI). This single change unblocks the in-app E2E check that has been red on every PR since 2026-05-18.

Supersedes #1055 (open since 2026-05-21, mergeable + all checks green, but unattended). If #1055 lands first, this PR becomes an empty no-op and I'll close it.

Root cause (verbatim from the workflow comment added in this commit)

The previous Pre-download Gradle and Build (Parallel with Emulator) step backgrounded:

./gradlew :integration-tests:assembleDebug :integration-tests:assembleDebugAndroidTest --no-daemon &

On the old macos-15-intel runner this background process was CPU-starved by emulator boot, so the race window was tiny and nobody noticed. After commit 7d4a80ba migrated the job to ubuntu-latest + KVM, both Gradle processes get real CPU and run in true parallel, racing on integration-tests/build/intermediates/merged_res_blame_folder/ and failing :integration-tests:mergeDebugAndroidTestResources with:

Failed to create MD5 hash for file ... values-az.json as it does not exist

The action's script: already invokes ./gradlew :integration-tests:connectedDebugAndroidTest, which transitively assembles the APKs, so the pre-build step is pure (broken) optimisation. Wall-clock cost of removing it: ~30-90s on cold Gradle cache.

SDK-115 roadmap (this PR is step 1 of N)

Follow-up PRs on top of this one will:

  • Consolidate integration-tests.yml (broken duplicate, uses non-BCIT secrets, macos-latest, dead develop trigger) into the surviving inapp-e2e-tests.yml.
  • Expand the test selection from the single InAppMessageIntegrationTest#testInAppMessageMVP to a matrix covering Push, Embedded, and Deep Link integration tests (the suite that the BCIT Iterable project was set up for).
  • Make push-sync timeouts env-configurable, replace the hard-coded notification-search strings with a TestConstants constant.
  • Tail logcat.txt into $GITHUB_STEP_SUMMARY on failure so PR reviewers don't need to download artifacts.
  • Optional hygiene: stop committing integration-tests/google-services.json (inject via secret).

Test plan

Made with Cursor

After the SDK-170 migration of this workflow to ubuntu-latest + KVM
(#1048, commit 7d4a80b), every PR opened against master has been
failing the In-App Message E2E Tests check at the build stage:

    Execution failed for task ':integration-tests:mergeDebugAndroidTestResources'.
    > Cannot access output property 'blameLogOutputFolder' …
       > Failed to create MD5 hash for file
         '.../merged_res_blame_folder/.../values-az.json' as it does not exist.

with this warning a few lines earlier:

    Detected multiple Kotlin daemon sessions at kotlin/sessions

The 'Pre-download Gradle and Build (Parallel with Emulator)' step
backgrounded a separate Gradle invocation that was meant to assemble
the APKs while the emulator booted. On macos-15-intel the background
process was resource-starved during emulator boot (2 cores / slow HVF)
so it usually finished or stalled before the action's Gradle started.
On ubuntu-latest + KVM both Gradle processes get real CPU and run in
true parallel, racing on the same integration-tests/build/intermediates
directory.

Affected runs:
  - feature/sdk-338-mobile-inbox-customization: 5 failures
  - fix/SDK-412-UUA-Naming-inconsistencies: 1 failure
  - SDK-170-emulator-network-trace: green (warm cache made the race
    window negligible — masked the regression during review)

Removing the parallel pre-build is sufficient. The action's script
already invokes ':integration-tests:connectedDebugAndroidTest' which
transitively builds the APKs it needs. Expected wall-clock impact:
+30-90s on a cold Gradle cache, traded for 'all PRs can run this
check'.

Co-authored-by: Cursor <cursoragent@cursor.com>
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