Skip to content

Autopromote deployments using API#172

Merged
jordiori merged 3 commits into
mainfrom
deploy-autopromote-api
Jul 7, 2026
Merged

Autopromote deployments using API#172
jordiori merged 3 commits into
mainfrom
deploy-autopromote-api

Conversation

@jordiori

@jordiori jordiori commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Related to #111

Make the deployment auto-promote behaviour equivalent to the CLI.

Deployments now call the API with auto_promote=true instead of relying on polling and calling /set-live + DELETE previous. Adds --wait / --no-wait and --auto / --no-auto flags to tb deploy (both default true), matching the CLI.

@jordiori jordiori requested review from manumartinm and rmorehig July 2, 2026 11:28
@eclbg

eclbg commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Let's think about how this might affect users who've been using previous version. I see that SDK users keep 2 active deployments, with the latest one as live. And I wonder if when we merge this they'll get the "deployment already in progress" error.

@jordiori

jordiori commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Let's think about how this might affect users who've been using previous version. I see that SDK users keep 2 active deployments, with the latest one as live. And I wonder if when we merge this they'll get the "deployment already in progress" error.

I think that was the old behavior but it was changed here. This new PR just changes that it will be done by the backend directly when auto-promoting instead of relying on polling and deleting from the SDK.

For users that may still have 2 active deployments, we still have this check that auto-deletes any "stale" deployment before running a new one.

@eclbg eclbg self-requested a review July 7, 2026 10:18

@eclbg eclbg left a comment

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.

LGTM, Thanks Jordi

@jordiori jordiori merged commit 906bbbf into main Jul 7, 2026
2 checks passed
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