Skip to content

Serialize preview runs and surface branch delete errors - #186

Open
alexon1234 wants to merge 1 commit into
mainfrom
preview-concurrency
Open

alexon1234 wants to merge 1 commit into
mainfrom
preview-concurrency

Conversation

@alexon1234

Copy link
Copy Markdown

Problem

Overlapping tinybird preview runs on the same git branch all target the same tmp_ci_<branch> Tinybird branch, so they race on delete and create (seen as ANALYTICS-HAS: concurrent DELETE /v0/environments/<id>, one got a 422). Preview also swallows every delete error, so a failed delete shows up later as a confusing Failed to create preview branch 400.

Solution

  • tinybird init CI templates serialize previews per branch: GitHub gets a concurrency group with cancel-in-progress, GitLab gets a per-branch resource_group.
  • tinybird preview treats only a 404 from get/delete as "no existing branch". Other errors fail with Failed to delete existing preview branch: ….
  • Bump to 0.0.85 with a CHANGELOG entry. Existing projects must add the concurrency setting to their workflow by hand.

Server side: tinybird/analytics!28936 (single-flight branch DELETE).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant