Conversation
Replaces branch-based Git commit endpoints with the new DB-direct sync
endpoints introduced in platform PR #3460.
Changes:
- /api/v3/locations → /api/v3/runners (runner list fallback)
- commit_slx / deploy_registry_codebundle: replace single POST to
/api/v3/workspaces/{ws}/branches/{branch}/slxs/{name} with a
multi-step sync flow:
1. POST /api/v1/workspaces/{ws}/slxs/sync (returns resource_id)
2. POST /api/v1/workspaces/{ws}/runbooks/sync (slx_id injected)
3. POST /api/v1/workspaces/{ws}/slis/sync (slx_id injected)
- delete_slx: replace branch DELETE with
DELETE /api/v1/workspaces/{ws}/slxs/{ws}--{name} (soft-delete)
New helpers: _build_slx_payload, _build_runbook_payload,
_build_sli_payload, _sync_slx_resources
The branch/commit_message params on commit_slx/delete_slx are kept
for backward compat but are no longer used by the branchless sync API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
/api/v3/locations→/api/v3/runners(runner list fallback in_get_authorized_locations)commit_slx/deploy_registry_codebundle: replaces singlePOST /api/v3/workspaces/{ws}/branches/{branch}/slxs/{name}with a 3-step sync flow via/api/v1/workspaces/{ws}/*s/syncdelete_slx: replaces branch-based DELETE withDELETE /api/v1/workspaces/{ws}/slxs/{ws}--{name}(soft-delete)What changed
New endpoints used
GET /api/v3/locationsGET /api/v3/runnersPOST /api/v3/workspaces/{ws}/branches/{branch}/slxs/{name}POST /api/v1/workspaces/{ws}/slxs/sync+ runbooks/sync + slis/syncDELETE /api/v3/workspaces/{ws}/branches/{branch}/slxs/{name}DELETE /api/v1/workspaces/{ws}/slxs/{ws}--{name}New sync flow
The new
_sync_slx_resources()helper does the multi-step upsert:resource_idslx_id = resource_idinto runbook/SLI payloadsNew payload builders:
_build_slx_payload,_build_runbook_payload,_build_sli_payload.Backward compat
The
branchandcommit_messageparameters oncommit_slxanddelete_slxare retained but ignored — the sync API is branchless.Test plan
commit_slxcreates SLX + runbook in workspacecommit_slxwithsli_scriptcreates SLX + runbook + SLIcommit_slxwithcron_schedulecreates SLX + runbook + cron SLIcommit_slxwithtask_type="sli"creates SLX + SLI onlydeploy_registry_codebundledeploys runbook and/or SLI from registrydelete_slxsoft-deletes an existing SLXget_workspace_locationsfalls back to/api/v3/runnerscorrectly🤖 Generated with Claude Code