Skip to content

fix(api): include connections in deploy request body#120

Merged
rmorehig merged 2 commits intotinybirdco:mainfrom
marcosleal-prd:fix/deploy-include-connections
Feb 26, 2026
Merged

fix(api): include connections in deploy request body#120
rmorehig merged 2 commits intotinybirdco:mainfrom
marcosleal-prd:fix/deploy-include-connections

Conversation

@marcosleal-prd
Copy link
Contributor

Description:

  • Problem: tinybird build correctly deploys Datasources, Pipes, and Connections to the local/branch workspace. tinybird deploy only sends Datasources and Pipes to the cloud; Connections are never added to the multipart form body for /v1/deploy, so they are not deployed to the main workspace.
  • Root cause: In src/api/deploy.ts, the FormData is only populated with datasources and pipes. The “Add connections” loop that exists in src/api/build.ts was missing in the deploy path.
  • Fix: Add the same “Add connections” loop in deploy.ts (after adding pipes, before the deployment cleanup step), so that resources.connections are appended to the form with data_project:// and ${conn.name}.connection filenames.
  • Testing: Tests were added in build.test.ts and deploy.test.ts to ensure that when resources include connections, both build and deploy include them in the request form data and report the correct connectionCount.

@rmorehig rmorehig merged commit 5ae32b4 into tinybirdco:main Feb 26, 2026
2 checks passed
@rmorehig
Copy link
Collaborator

Thanks for the PR! 🙏

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