Skip to content

fix(ci): wire GitLab CI to publish the system-tests image - #4079

Draft
MilanGarnier wants to merge 1 commit into
milan.garnier/publish-ci-buildsfrom
milan.garnier/publish-ci-builds-gitlab
Draft

fix(ci): wire GitLab CI to publish the system-tests image#4079
MilanGarnier wants to merge 1 commit into
milan.garnier/publish-ci-buildsfrom
milan.garnier/publish-ci-builds-gitlab

Conversation

@MilanGarnier

Copy link
Copy Markdown
Contributor

Stacked on #4065 — needs the GH Actions workflow merged to master first
(workflow_dispatch resolves the workflow by filename against the
default branch, regardless of dispatch ref).

Summary

Test plan

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 30, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 5 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.1]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.2]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.4]   View in Datadog   GitLab

View all 5 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.62% (-0.01%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 74a4136 | Docs | Datadog PR Page | Give us feedback!

@MilanGarnier
MilanGarnier force-pushed the milan.garnier/publish-ci-builds-gitlab branch 2 times, most recently from 7f3f283 to 27419ba Compare August 3, 2026 09:23
@MilanGarnier

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27419ba1bf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $HAS_OPEN_PR != "true"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move PR gating out of the upload job rules

GitLab evaluates rules before any upstream job runs, so the dotenv report emitted by check open pr for system tests cannot populate HAS_OPEN_PR here (see the GitLab rules docs: https://docs.gitlab.com/ci/jobs/job_rules/). In a normal branch pipeline this variable is unset while the rule is evaluated, so $HAS_OPEN_PR != "true" matches and excludes the upload job even when the PR check would later write HAS_OPEN_PR=true; as a result the system-tests artifacts/image never get published for open PR branches.

Useful? React with 👍 / 👎.

fi
fi
# Normalise the arch tarball names so the GitHub Actions side needs only the branch slug.
DEST="s3://dd-trace-php-builds/ci/${CI_COMMIT_REF_SLUG}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Serialize uploads to the per-branch S3 prefix

When two pipelines for the same branch overlap, both upload to the same ci/${CI_COMMIT_REF_SLUG} keys while the old per-slug resource_group was removed. The GitHub workflow later downloads from that shared prefix by slug, so a slower older pipeline can overwrite some or all of a newer pipeline's artifacts before either dispatch downloads them, causing the branch tag to be pushed with stale or mixed package contents; keep the upload/dispatch serialized per slug or use a unique prefix per pipeline/commit.

Useful? React with 👍 / 👎.

Comment on lines +1641 to +1643
- when: always
needs:
- job: "publish docker image for system tests (upload)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate the dispatch job when upload is omitted

In the intended no-open-PR path, the upload job is configured to be omitted, but this dispatch job is still added for every non-default branch and has a hard needs edge to that omitted job. GitLab documents that needs pointing at a job excluded by rules can make pipeline creation fail unless the need is optional (https://docs.gitlab.com/ci/yaml/), so branches without an open PR can fail the package child pipeline instead of cleanly skipping system-tests image publishing.

Useful? React with 👍 / 👎.

@MilanGarnier
MilanGarnier force-pushed the milan.garnier/publish-ci-builds-gitlab branch from 27419ba to d25554f Compare August 4, 2026 11:37
@MilanGarnier
MilanGarnier force-pushed the milan.garnier/publish-ci-builds-gitlab branch from d25554f to 74a4136 Compare August 10, 2026 08:57
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