Skip to content

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

Closed
cbeauchesne wants to merge 6 commits into
DataDog:mainfrom
cbeauchesne:cbeauchesne/dd-trace-v5-pin-slack
Closed

cbeauchesne wants to merge 6 commits into
DataDog:mainfrom
cbeauchesne:cbeauchesne/dd-trace-v5-pin-slack

Conversation

@cbeauchesne

@cbeauchesne cbeauchesne commented Nov 23, 2026 •

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 3 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>
@cbeauchesne
cbeauchesne marked this pull request as ready for review November 24, 2026 09:30
@cbeauchesne
cbeauchesne requested a review from a team as a code owner November 24, 2026 09:30

@datadog-official datadog-official 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: FAIL

An npm registry error can corrupt the new GitHub Actions output file and suppress the promised Slack failure alert. The malformed output was reproduced locally with a mocked E503 response.

Open Bits AI session

🤖 Bits Code Review · Commit f9a23f6

Comment thread scripts/check_dd_trace_v5_pin.sh Resolved
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>

@datadog-official datadog-official 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

The PR makes stale dd-trace v5 pins post Slack reminders without failing main, while check errors alert and fail and pull requests retain failure gating. Preserving npm failures and validating versions fixes the earlier output-corruption finding; no findings remain open, though Slack delivery is unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 07343e2

…nment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cbeauchesne
cbeauchesne had a problem deploying to datadog-lambda-js-pin December 1, 2026 16:56 — with GitHub Actions Failure
@cbeauchesne
cbeauchesne had a problem deploying to datadog-lambda-js-pin December 1, 2026 16:57 — with GitHub Actions Failure
@cbeauchesne
cbeauchesne had a problem deploying to datadog-lambda-js-pin December 3, 2026 09:52 — with GitHub Actions Failure
@cbeauchesne

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #877

@cbeauchesne cbeauchesne closed this Dec 3, 2026

This branch had an error being deployed

1 failed deployment
datadog-lambda-js-pin — 0dee84ac Deployed Dec 3, 2026 by cbeauchesne via check-pin #58
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.

2 participants