From 4920a1170545beb509919a1ed105b12e1907782f Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Wed, 1 Jul 2026 11:26:44 +0100 Subject: [PATCH 1/3] RUM-16470: Bump latest-api instrumented test jobs to Android API 37 --- ci/pipelines/default-pipeline.yml | 38 +++++++++++++++++++++---------- gradle/libs.versions.toml | 2 +- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/ci/pipelines/default-pipeline.yml b/ci/pipelines/default-pipeline.yml index a8fd2bd66a..d2b61286b5 100644 --- a/ci/pipelines/default-pipeline.yml +++ b/ci/pipelines/default-pipeline.yml @@ -72,10 +72,24 @@ stages: - !reference [ .snippets, setup-gradle ] - !reference [ .snippets, setup-dd-ci-cli ] - !reference [ .snippets, install-android-api-components ] + start-emulator: + # API 37+ only ships 16 KB-page system images (google_apis_ps16k). Those cannot boot + # under the forced `-qemu -machine virt` launch: it drops the emulator to TCG software + # emulation, which aborts on a 16 KB guest (qemu_mprotect__osdep: mprotect failed: + # Permission denied -> "Abort trap: 6" -> "No online devices found"). Let 16 KB images + # use the default HVF-accelerated machine (16 KB pages are native on the Apple-Silicon + # runners) and give the AVD enough RAM/disk to boot. Older/middle APIs (21/23/28) keep + # the existing `-machine virt` launch untouched. See RUM-16470. + - | + EMULATOR_EXTRA_ARGS=(-qemu -machine virt) + if [[ "$ANDROID_EMULATOR_IMAGE" == *"ps16k"* ]]; then + EMULATOR_EXTRA_ARGS=(-memory 2048 -partition-size 4096) + fi + $ANDROID_HOME/emulator/emulator -avd "$EMULATOR_NAME" -grpc-use-jwt -no-snapstorage -no-audio -no-window -no-boot-anim -verbose "${EMULATOR_EXTRA_ARGS[@]}" & run-legacy-integration-instrumented: - set +e - exit_code=0 - - $ANDROID_HOME/emulator/emulator -avd "$EMULATOR_NAME" -grpc-use-jwt -no-snapstorage -no-audio -no-window -no-boot-anim -verbose -qemu -machine virt & + - !reference [ .snippets, start-emulator ] - DD_TAGS="test.configuration.android_api:$ANDROID_API" ./gradlew :instrumented:integration:connectedDebugAndroidTest $( (( $ANDROID_API <= 23 )) && echo "-Puse-api21-java-backport -Puse-desugaring" ) || exit_code=$? - $ANDROID_HOME/platform-tools/adb emu kill - datadog-ci junit upload --service dd-sdk-android --tags test.configuration.android_api:$ANDROID_API --xpath-tag test.suite=/testcase/@classname instrumented/integration/build/outputs/androidTest-results/connected/debug/ @@ -84,7 +98,7 @@ stages: run-core-it-instrumented: - set +e - exit_code=0 - - $ANDROID_HOME/emulator/emulator -avd "$EMULATOR_NAME" -grpc-use-jwt -no-snapstorage -no-audio -no-window -no-boot-anim -verbose -qemu -machine virt & + - !reference [ .snippets, start-emulator ] - DD_TAGS="test.configuration.android_api:$ANDROID_API" ./gradlew :reliability:core-it:connectedDebugAndroidTest $( (( $ANDROID_API <= 23 )) && echo "-Puse-api21-java-backport -Puse-desugaring" ) || exit_code=$? - $ANDROID_HOME/platform-tools/adb emu kill - datadog-ci junit upload --service dd-sdk-android --tags test.configuration.android_api:$ANDROID_API --xpath-tag test.suite=/testcase/@classname reliability/core-it/build/outputs/androidTest-results/connected/debug/ @@ -93,7 +107,7 @@ stages: run-ndk-instrumented: - set +e - exit_code=0 - - $ANDROID_HOME/emulator/emulator -avd "$EMULATOR_NAME" -grpc-use-jwt -no-snapstorage -no-audio -no-window -no-boot-anim -verbose -qemu -machine virt & + - !reference [ .snippets, start-emulator ] - DD_TAGS="test.configuration.android_api:$ANDROID_API" ./gradlew :features:dd-sdk-android-ndk:connectedDebugAndroidTest $( (( $ANDROID_API <= 23 )) && echo "-Puse-api21-java-backport -Puse-desugaring" ) || exit_code=$? - $ANDROID_HOME/platform-tools/adb emu kill - datadog-ci junit upload --service dd-sdk-android --tags test.configuration.android_api:$ANDROID_API --xpath-tag test.suite=/testcase/@classname features/dd-sdk-android-ndk/build/outputs/androidTest-results/connected/debug/ @@ -275,9 +289,9 @@ test-pyramid:core-it-latest-api: stage: test-pyramid timeout: 1h variables: - ANDROID_API: "36" - ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API;google_apis;${ANDROID_ARCH}" - ANDROID_PLATFORM: "platforms;android-$ANDROID_API" + ANDROID_API: "37" + ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API.0;google_apis_ps16k;${ANDROID_ARCH}" + ANDROID_PLATFORM: "platforms;android-$ANDROID_API.0" ANDROID_BUILD_TOOLS: "build-tools;$ANDROID_API.0.0" script: - !reference [.snippets, setup-macos-ami-runner] @@ -390,9 +404,9 @@ test-pyramid:legacy-integration-instrumented-latest-api: stage: test-pyramid timeout: 1h variables: - ANDROID_API: "36" - ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API;google_apis;${ANDROID_ARCH}" - ANDROID_PLATFORM: "platforms;android-$ANDROID_API" + ANDROID_API: "37" + ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API.0;google_apis_ps16k;${ANDROID_ARCH}" + ANDROID_PLATFORM: "platforms;android-$ANDROID_API.0" ANDROID_BUILD_TOOLS: "build-tools;$ANDROID_API.0.0" script: - !reference [.snippets, setup-macos-ami-runner] @@ -420,9 +434,9 @@ test-pyramid:ndk-instrumented-latest-api: stage: test-pyramid timeout: 1h variables: - ANDROID_API: "36" - ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API;google_apis;${ANDROID_ARCH}" - ANDROID_PLATFORM: "platforms;android-$ANDROID_API" + ANDROID_API: "37" + ANDROID_EMULATOR_IMAGE: "system-images;android-$ANDROID_API.0;google_apis_ps16k;${ANDROID_ARCH}" + ANDROID_PLATFORM: "platforms;android-$ANDROID_API.0" ANDROID_BUILD_TOOLS: "build-tools;$ANDROID_API.0.0" script: - !reference [.snippets, setup-macos-ami-runner] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6eebcdd05f..c321f2a9d3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -49,7 +49,7 @@ androidXJunitRunner = "1.5.0" androidXJunitRules = "1.5.0" androidXExtJunit = "1.1.5" androidXJunitCore = "1.5.0" -espresso = "3.5.1" +espresso = "3.7.0" # Tests Tools assertJ = "3.27.7" From a5e7eb2aab4c7802a5b480aabf399a3060109013 Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Wed, 1 Jul 2026 19:42:00 +0100 Subject: [PATCH 2/3] RUM-16470: Run API 37 instrumented tests on macOS Sequoia runner The API 37 image is 16 KB-page (google_apis_ps16k), which the emulator can only accelerate under HVF on macOS 15+. Route the three latest-api instrumented jobs to the new dd-sdk-android-sequoia runner; API 23/28 jobs stay on Sonoma. Co-Authored-By: Claude Opus 4.8 (1M context) --- ci/pipelines/default-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/pipelines/default-pipeline.yml b/ci/pipelines/default-pipeline.yml index d2b61286b5..42eff59acd 100644 --- a/ci/pipelines/default-pipeline.yml +++ b/ci/pipelines/default-pipeline.yml @@ -285,7 +285,7 @@ test-pyramid:core-it-min-api: test-pyramid:core-it-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sonoma", "specific:true" ] + tags: [ "macos:sequoia-arm64", "specific:true" ] stage: test-pyramid timeout: 1h variables: @@ -400,7 +400,7 @@ test-pyramid:legacy-integration-instrumented-min-api: test-pyramid:legacy-integration-instrumented-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sonoma", "specific:true" ] + tags: [ "macos:sequoia-arm64", "specific:true" ] stage: test-pyramid timeout: 1h variables: @@ -430,7 +430,7 @@ test-pyramid:legacy-integration-instrumented-median-api: test-pyramid:ndk-instrumented-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sonoma", "specific:true" ] + tags: [ "macos:sequoia-arm64", "specific:true" ] stage: test-pyramid timeout: 1h variables: From 9df7f956483f7d7e722cda2ccfa792529df20f21 Mon Sep 17 00:00:00 2001 From: Francisco Veiga Date: Fri, 3 Jul 2026 10:33:48 +0100 Subject: [PATCH 3/3] RUM-16470: Revert instrumented latest-api jobs to Sonoma runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Roll back the Sequoia runner tag change; run on the existing Sonoma runner for now. (Sequoia 15.7 was validated and does not fix the 16 KB emulator — needs macOS 26.) Co-Authored-By: Claude Opus 4.8 (1M context) --- ci/pipelines/default-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/pipelines/default-pipeline.yml b/ci/pipelines/default-pipeline.yml index 42eff59acd..d2b61286b5 100644 --- a/ci/pipelines/default-pipeline.yml +++ b/ci/pipelines/default-pipeline.yml @@ -285,7 +285,7 @@ test-pyramid:core-it-min-api: test-pyramid:core-it-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sequoia-arm64", "specific:true" ] + tags: [ "macos:sonoma", "specific:true" ] stage: test-pyramid timeout: 1h variables: @@ -400,7 +400,7 @@ test-pyramid:legacy-integration-instrumented-min-api: test-pyramid:legacy-integration-instrumented-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sequoia-arm64", "specific:true" ] + tags: [ "macos:sonoma", "specific:true" ] stage: test-pyramid timeout: 1h variables: @@ -430,7 +430,7 @@ test-pyramid:legacy-integration-instrumented-median-api: test-pyramid:ndk-instrumented-latest-api: extends: - .base-cache-pull-job - tags: [ "macos:sequoia-arm64", "specific:true" ] + tags: [ "macos:sonoma", "specific:true" ] stage: test-pyramid timeout: 1h variables: