Skip to content

Conversation

@brettlangdon
Copy link
Member

@brettlangdon brettlangdon commented Dec 9, 2025

Description

APMLP-584

Migrate Linux + macOS wheel builds to GitLab CI

This PR moves all Linux and macOS wheel building from GitHub Actions to GitLab. The intent is to consolidate our build logic, speed up CI, and give us tighter control over caching and execution order.

Changes

  • Linux wheels, macOS wheels, and the sdist now build entirely in GitLab.
  • macOS builds are split:
    • All commits: only Python 3.14 (amd64/arm64).
    • main, release branches, tags: full macOS build matrix.
  • Windows wheels still come from GitHub Actions; GitLab pulls those artifacts.
    • Our GitLab instance does not yet support Windows arm64 runners.
  • Wheels now build on every commit, not just PRs.
  • All build/test logic is unified behind a single uv-based script.
  • Only Linux wheels are published to the public S3 bucket.

Impact on development

  • Faster pipelines: downstream jobs (benchmarks, integration tests, etc.) can start as soon as the first wheels land, rather than waiting for the slowest GHA job.
  • More predictable caching and fewer cross-platform CI quirks.
  • A single build script and environment reduces divergence between platforms.
  • Lays groundwork for upcoming CI performance improvements and cleaner release automation.

This is a functional migration only—no packaging or release behavior changes beyond the move itself.

Testing

Risks

Any jobs which depend on the GHA artifacts existing will start to fail, if we don't know who is relying on them then they can have a negative downstream impact. Remediation for any of those jobs is to use the public S3 bucket instead.

Additional Notes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

CODEOWNERS have been resolved as:

.gitlab/scripts/build-sdist.sh                                          @DataDog/python-guild @DataDog/apm-core-python
.gitlab/scripts/build-wheel-helpers.sh                                  @DataDog/python-guild @DataDog/apm-core-python
.gitlab/scripts/build-wheel.sh                                          @DataDog/python-guild @DataDog/apm-core-python
.github/workflows/build_deploy.yml                                      @DataDog/python-guild @DataDog/apm-core-python
.github/workflows/build_python_3.yml                                    @DataDog/python-guild @DataDog/apm-core-python
.gitignore                                                              @DataDog/apm-core-python
.gitlab-ci.yml                                                          @DataDog/python-guild @DataDog/apm-core-python
.gitlab/benchmarks/macrobenchmarks.yml                                  @DataDog/python-guild @DataDog/apm-core-python
.gitlab/benchmarks/microbenchmarks.yml                                  @DataDog/python-guild @DataDog/apm-core-python
.gitlab/package.yml                                                     @DataDog/python-guild @DataDog/apm-core-python
setup.py                                                                @DataDog/python-guild

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 247 ± 2 ms.

The average import time from base is: 251 ± 3 ms.

The import time difference between this PR and base is: -3.9 ± 0.1 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.766 ms (1.12%)
ddtrace.bootstrap.sitecustomize 1.397 ms (0.57%)
ddtrace.bootstrap.preload 1.397 ms (0.57%)
ddtrace.internal.remoteconfig.client 0.656 ms (0.27%)
ddtrace 1.368 ms (0.55%)
ddtrace._logger 0.689 ms (0.28%)
ddtrace.internal.telemetry 0.689 ms (0.28%)
ddtrace.internal.telemetry.writer 0.689 ms (0.28%)
ddtrace.internal.utils.version 0.689 ms (0.28%)
ddtrace.version 0.689 ms (0.28%)
ddtrace.internal._unpatched 0.029 ms (0.01%)
json 0.029 ms (0.01%)
json.decoder 0.029 ms (0.01%)
re 0.029 ms (0.01%)
enum 0.029 ms (0.01%)
types 0.029 ms (0.01%)

@brettlangdon brettlangdon added the changelog/no-changelog A changelog entry is not required for this PR. label Dec 10, 2025
brettlangdon added a commit that referenced this pull request Dec 11, 2025
## Description

This PRs adds an initial "setup" stage to the pipeline where we compute
and expose the following variables to the rest of the pipeline:


- **GH_PR_NUMBER:** The GitHub PR number if there is an open PR for this
commit, empty otherwise
- **HAS_OPEN_PR:** "true" if there is an open PR for this commit,
"false" otherwise
- **IS_MAIN_BRANCH:** "true" if the current branch is main
- **IS_RELEASE_BRANCH:** "true" if the current branch is a release
branch (e.g., "1.2"), "false" otherwise
- **IS_RELEASE:** "true" if the current commit is a release tag (e.g.,
"v1.2.3"), "false" otherwise
- **IS_MERGE_QUEUE:** "true" if the current branch is a merge queue
branch (e.g., starts with "gh-readonly-queue/"), "false" otherwise

The goal is to provide consistent controls for which jobs to run when,
e.g. should a job run only when we have a PR open or only during a
release?

real example, with #15572 we want to be sure we still restrict
benchmarks to only run/pass when we have an open PR to reduce volume,
today that is controlled by the fact that the GHA wheel building only
happens when a PR is open.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants