ci: notify data-plane-infrastructure when a release is published - #53
Open
duanshiqiang wants to merge 1 commit into
Open
duanshiqiang wants to merge 1 commit into
duanshiqiang wants to merge 1 commit into
Conversation
Sends a repository_dispatch so data-plane-infrastructure can open its BYOC onboarding wrapper bump PR straight away. That PR is what carries an onboarding change into the dev test accounts: the dev terragrunt units source their wrapper from the working tree, so bumping the wrapper's ?ref= changes what they resolve to, Atlantis plans them on the PR, and applying it deploys. The consuming workflow already polls on a weekday-morning schedule, so this is purely a latency improvement — a release is picked up within a minute rather than the next morning. Nothing depends on it succeeding; the release has already been published by auto-release.yaml by the time this runs. Triggered on release published rather than added as a job to auto-release.yaml, so hand-cut releases notify too. The README notes those are still supported for releases needing curated notes, and they should reach dev the same way. NOT YET FUNCTIONAL: WORKFLOW_AUTH_APP_ID and WORKFLOW_AUTH_PRIVATE_KEY are organization secrets that this repository cannot currently read, so the job will fail at the token step until someone with organization admin grants access. The consuming schedule is unaffected either way. The token action is pinned to a SHA rather than a tag, unlike the other actions here, because it mints a credential with write access to another repository. It is scoped to data-plane-infrastructure with permission-contents write, which is what the dispatch API requires and nothing more.
duanshiqiang
marked this pull request as ready for review
September 21, 2026 08:51
bojand
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
data-plane-infrastructurenow has a workflow that opens a PR bumping the BYOC onboarding wrapper modules to the newest release here (data-plane-infrastructure#25693). That PR is what carries an onboarding change into the dev test accounts: the dev terragrunt units source their wrapper from the working tree, so bumping the wrapper's?ref=changes what they resolve to, Atlantis plans them on the PR, and applying it deploys.It declares a
repository_dispatchtrigger but nothing sends it.auto-release.yamlonly cuts the release, and its built-inGITHUB_TOKENcannot dispatch across repositories. This adds the missing producer.What
notify-onboarding-release.yaml, triggered onrelease: published, which mints a scoped app token and postsbyoc-onboarding-releasedtodata-plane-infrastructure.It fires for hand-cut releases as well as automated ones, which is deliberate — the README notes manual tagging is still supported for releases needing curated notes, and those should reach dev the same way. Adding a job to
auto-release.yamlinstead would have missed them.This is purely a latency improvement. The consuming workflow also polls on a weekday-morning schedule, so without this a release is picked up the next morning rather than within a minute. Nothing depends on this job succeeding; the release has already been published by the time it runs.
Not yet functional
WORKFLOW_AUTH_APP_IDandWORKFLOW_AUTH_PRIVATE_KEYare organization secrets that this repository cannot currently read — the org secrets available here are theCLICKHOUSE_CI_*,INTEGRATIONS_TEAM_*,ROBOT_CLICKHOUSE_*,COVERITY_TOKENandDOCKER_ROBOT_PASSWORDset, and neitherWORKFLOW_AUTHsecret is among them.So someone with organization admin needs to grant this repository access to those two secrets before the workflow does anything. Until then the job fails at the token step on each release. The consuming schedule keeps working regardless, so nothing regresses in the meantime — this just stays inert.
ROBOT_CLICKHOUSE_COMMIT_TOKENis visible here and would probably work, but a broad robot PAT is a worse credential for this than an installation token scoped to one repository and one permission. Worth saying explicitly in case someone suggests it as a shortcut.Notes on the implementation
The token is scoped to
data-plane-infrastructurewithpermission-contents: write, which is what the repository dispatch API requires and nothing more.The token action is pinned to a SHA rather than a tag, unlike the other actions in this repository. It mints a credential with write access to another repository, so it seemed worth not tracking a mutable tag. It's the same pin
data-plane-infrastructurealready uses.The tag and release URL are passed through
envrather than interpolated into therunblock, since${{ }}is substituted before the shell sees it and a release tag is user-supplied.Verification
The YAML parses, the
runblock is shellcheck-clean, and theevent_typethis sends matches thetypes:the consumer listens for:End to end it cannot be tested until the secrets are granted.