Skip to content

Notify SDKs when the API specification is published - #224

Closed
Stephen Belanger (Qard) wants to merge 8 commits into
mainfrom
dispatch-sdk-spec-updates
Closed

Stephen Belanger (Qard) wants to merge 8 commits into
mainfrom
dispatch-sdk-spec-updates

Conversation

@Qard

@Qard Stephen Belanger (Qard) commented Oct 30, 2026 •

Copy link
Copy Markdown

Notifies SDK repos whenever a commit lands on main. Each SDK handles its own spec update and PR. Initially only Rust is listed; no SDK releases or merges are automated.

Dispatcher setup

  • Create a dedicated organization-owned GitHub App with repository Contents read/write permission and webhooks disabled. Do not reuse backend credentials.
  • Install it only on participating SDK repos.
  • In braintrust-openapi Actions settings, set the repository variable SDK_DISPATCH_APP_ID to its numeric ID and the repository secret SDK_DISPATCH_APP_PRIVATE_KEY to its PEM private key. Recipient repos need neither credential.

Adding an SDK

  • Merge a receiver workflow onto its default branch listening for repository_dispatch type braintrust-openapi-updated. No payload is supplied.
  • Have it fetch the latest published spec, perform the SDK's updates, and reuse one PR branch. Serialize runs and skip unchanged content.
  • It can create PRs using its own GITHUB_TOKEN with Contents and Pull requests write permissions. Enable Actions-created PRs in repository settings; reviewers can approve CI manually.
  • Add the SDK to the app's selected repositories and the dispatch workflow's matrix. Run the dispatcher manually on main to verify delivery.

Initial receiver: braintrustdata/braintrust-sdk-rust#160; merge it before activation.

Workflow lint passes. Dedicated credentials are not provisioned, and live dispatch has not been tested. Existing spec validation is unchanged.

@AbhiPrasad

Copy link
Copy Markdown
Member

I would rather this is just pull from the repos. I set up a Python SDK weekly sync job for example.

Copy link
Copy Markdown
Author

Why? Seems to me like a reactive update allows updates to get out faster.

Copy link
Copy Markdown
Author

I'll just close this and do that. We can re-evaluate later. It's a tiny bit annoying anyway as we need some shared credentials for cross-repo workflow dispatch.

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