Skip to content

[ML] Fix Slack notification in version bump pipeline#3023

Merged
edsavage merged 2 commits intoelastic:mainfrom
edsavage:fix/version-bump-slack-notification
Apr 13, 2026
Merged

[ML] Fix Slack notification in version bump pipeline#3023
edsavage merged 2 commits intoelastic:mainfrom
edsavage:fix/version-bump-slack-notification

Conversation

@edsavage
Copy link
Copy Markdown
Contributor

@edsavage edsavage commented Apr 12, 2026

Summary

The ml-cpp-version-bump pipeline never sent Slack notifications despite having a notify block configured.

Root cause

The version bump pipeline generator (job-version-bump.json.py) outputs a top-level notify block in its JSON. However, when this JSON is dynamically uploaded via buildkite-agent pipeline upload, the notify block doesn't fire reliably for build-level state changes.

All other ml-cpp pipelines use a different pattern that works: they add a step that uploads a notification shell script as a sub-pipeline, which has its own notify block.

Fix

Replace the top-level notify block with a step that uploads a dedicated send_version_bump_notification.sh as a sub-pipeline. This script includes two notify blocks:

  • build.state == "blocked" — notifies #machine-learn-build that the pipeline is waiting for approval (with version, branch, workflow details)
  • build.state != "blocked" — notifies on any terminal state (pass, fail, cancel)

Test results

Verified on builds #4 and #5:

  • "Waiting for approval" notification sent to #machine-learn-build when build reaches blocked state
  • "Finished" notification sent to #machine-learn-build when build is cancelled
  • Notification includes branch, version, workflow, and build URL

@prodsecmachine
Copy link
Copy Markdown

prodsecmachine commented Apr 12, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@edsavage edsavage force-pushed the fix/version-bump-slack-notification branch from 08375d3 to b7adce3 Compare April 12, 2026 21:59
The top-level notify block in dynamically uploaded pipelines doesn't
fire reliably for build-level state changes. Replace it with the
same two-stage sub-pipeline pattern used by the other ml-cpp pipelines.

Adds a dedicated send_version_bump_notification.sh that includes
notify blocks for both:
- build.state == "blocked" — tells the team the pipeline needs
  unblocking (the original purpose of the notification)
- build.state == "passed" || "failed" — standard completion notification

Made-with: Cursor
notify:
- slack:
channels:
- "#machine-learn-build"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please add #ml-core here?

Copy link
Copy Markdown
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

LGTM. You minor comment.

Copy link
Copy Markdown
Contributor

@ninalee12 ninalee12 left a comment

Choose a reason for hiding this comment

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

LGTM

interesting that notifications didn't fire for all triggered instances

For successes and blocks I only saw these message:

@edsavage
Copy link
Copy Markdown
Contributor Author

LGTM

interesting that notifications didn't fire for all triggered instances

For successes and blocks I only saw these message:

* https://elastic.slack.com/archives/C3C8CBW3D/p1775834525722959

* https://elastic.slack.com/archives/C3C8CBW3D/p1775834741525649

Yeah, it was weirdly unreliable. I don't know exactly what the problem was TBH

@edsavage edsavage merged commit 68b673f into elastic:main Apr 13, 2026
19 checks passed
@github-actions
Copy link
Copy Markdown

💔 All backports failed

Status Branch Result
9.5 The branch "9.5" does not exist

Manual backport

To create the backport manually run:

backport --pr 3023

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

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.

5 participants