ci: migrate macOS jobs to tart VM runner - #1335
Open
alee1246 wants to merge 6 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 07aaa09 | Docs | Datadog PR Page | Give us feedback! |
The test:native-android job (and benchmarks build-and-upload:app) failed with "Unable to locate a Java Runtime" when running sdkmanager. Java 17 is installed in the tart VM image, but openjdk@17 is keg-only and the image only exports JAVA_HOME/PATH in ~/.zshrc — which the tart runner's non-interactive shell does not source. Export JAVA_HOME/PATH in the install-android-sdk snippet so sdkmanager can find Java. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vault's aws auth does not honor AWS_EC2_METADATA_SERVICE_ENDPOINT on the tart VMs, so it cannot reach the IAM-proxy creds. The AWS CLI does; export the resolved creds so vault's credential chain picks them up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s macOS GitLab CI workloads from dedicated macos:sonoma runners to macos:tart virtualized runners, pinning jobs to the repo-specific tart VM image to ensure consistent toolchains and isolation.
Changes:
- Switch macOS CI jobs to
macos:tartand pin the tart VM image fortest:*jobs and the benchmarksbuild-and-upload:appjob. - Update Android SDK install snippets to set
JAVA_HOMEand prepend the JDK toPATH(for SDK manager / tooling). - Update benchmarks secret retrieval to export AWS credentials in CI before Vault AWS auth.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
benchmarks/scripts/secrets/get-secret.sh |
Exports AWS credentials in CI prior to Vault AWS login. |
benchmarks/.benchmarks-ci.yml |
Moves benchmarks build job to tart runner + pinned VM image; updates Android SDK snippet JAVA env. |
.gitlab-ci.yml |
Moves all test:* macOS jobs to tart runner + pinned VM image; updates Android SDK snippet JAVA env. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Fix JAVA_HOME/install-jdk-17 ordering in test:native-android and build-and-upload:app so JDK 17 is installed before the Android SDK snippet relies on it - Centralize the duplicated tart VM image string into a TART_VM_IMAGE variable in .gitlab-ci.yml and benchmarks/.benchmarks-ci.yml - Check the exit status of `aws configure export-credentials` before eval'ing its output in get-secret.sh, instead of failing silently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the macOS GitLab CI jobs from dedicated
macos:sonoma/specific:truerunners to virtualizedmacos:tartrunners, using the repo-specific tart VM image (dd-sdk-reactnative-sonoma).Migrated jobs:
test:lint,test:js,test:build,test:native-android,test:native-ios,test:native-ios-sr,test:native-ios-newarch, andbuild-and-upload:app(benchmarks pipeline).VM image:
packer/macos-vm/team/dd-sdk-reactnative-sonoma.pkr.hcl→486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/ci-platform-machine-images/tart-vm:dd-sdk-reactnative-sonoma-latestMotivation
The virtualized tart runners have a number of benefits over dedicated macOS runners:
mac2.metalhostmac2.metalhosts → cost reduction from needing fewer instancesChanges
.gitlab-ci.ymltest:*job tags frommacos:sonoma/specific:truetomacos:tartand pin the repo-specific tart VM imagebenchmarks/.benchmarks-ci.ymlbuild-and-upload:apptags tomacos:tartand pin the repo-specific tart VM imageTest plan
test:*jobs pass on the tart runnerbuild-and-upload:apppasses on the tart runner🤖 Generated with Claude Code
Passing build job
https://gitlab.ddbuild.io/DataDog/dd-sdk-reactnative/-/jobs/1871065405