Skip to content

ci: post a stale dd-trace v5 pin to Slack instead of failing - #877

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
mainfrom
cbeauchesne/dd-trace-v5-pin-slack
Dec 3, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
mainfrom
cbeauchesne/dd-trace-v5-pin-slack

Conversation

@cbeauchesne

Copy link
Copy Markdown
Collaborator

What does this PR do?

check_dd_trace_v5_pin.sh exit codes:

  • 0 success
  • 1 something prevent the check to proceed
  • 2 the pin is stale

On main, workflow behavior:

  • when the dd-trace v5 pin is stale (exit code 2), no longer fails , but rather posts a reminder to #apm-serverless, and the job succeeds;
  • check failed (any exit code other than 0 or 2): posts an alert to #apm-serverless, and the job fails.

On pull requests, workflow behavior:

Keep the current behavior: a stale pin or a failed check fails the job, and nothing is posted to Slack.

Motivation

Agreed in this Slack thread: a stale pin means the job did its job, and it shouldn't count as a CI failure in Green CI.

Testing Guidelines

Exit-code handling checked locally. End-to-end needs the secret below.

Additional Notes

Before merging, a repo admin must add the SLACK_ALERTS_WEBHOOK secret, an incoming webhook bound to #apm-serverless.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

🤖 Generated with Claude Code

cbeauchesne and others added 6 commits November 23, 2026 18:16
The weekly check-pin job failed on purpose whenever a new dd-trace v5
was published, which counted as a CI infra failure in Green CI. Outside
of pull requests, a stale pin now posts a reminder to #apm-serverless and
the job succeeds; it fails only when the check itself or the Slack post
fails.

check_dd_trace_v5_pin.sh exits 2 for a stale pin (still non-zero, so the
GitLab npm publish gate is unchanged) and reports both versions through
$GITHUB_OUTPUT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Store the script's exit status and branch on it in the steps' if
conditions: one Slack step for a stale pin, one for an unexpected check
failure, and a final step that fails the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without pipefail, an npm error (e.g. E503) was masked by the node
pipeline and its JSON error object became the "latest" version: the
check reported a stale pin and wrote a multiline value to
$GITHUB_OUTPUT, which Actions rejects, so no Slack alert was sent.
Keep npm's exit status and require a 5.x.y version, else exit 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cbeauchesne
cbeauchesne had a problem deploying to datadog-lambda-js-pin December 3, 2026 09:52 — with GitHub Actions Failure
@cbeauchesne
cbeauchesne marked this pull request as ready for review December 3, 2026 10:04
@cbeauchesne
cbeauchesne requested a review from a team as a code owner December 3, 2026 10:04

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 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.

Bits Code Review: PASS

More details

Mocked registry responses confirmed that stale pins return 2 and registry errors remain failures. Live Slack delivery was not exercised.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 0dee84a

This branch had an error being deployed

1 failed deployment
datadog-lambda-js-pin — 42893413 Deployed Dec 3, 2026 by zarirhamza via check-pin #59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants