Skip to content

Wire native build/deploy/dev commands to CLI entry point - #25

Open
sandshoes wants to merge 2 commits into
mainfrom
tommy/protm-2256-wire-native-build-deploy-dev
Open

sandshoes wants to merge 2 commits into
mainfrom
tommy/protm-2256-wire-native-build-deploy-dev

Conversation

@sandshoes

Copy link
Copy Markdown
Contributor

Summary

  • tinybird build, tinybird deploy, and tinybird dev previously delegated unconditionally to the upstream Forward tb package. They now run the SDK's own native implementations (run_build, run_deploy, run_dev in cli/commands/), matching tb build/tb deploy/tb dev behavior.
  • build: --dry-run, --local, --branch (mutually exclusive with --local).
  • deploy: --check, --allow-destructive-operations.
  • dev: --local, --branch; runs the existing watch loop (already implemented in run_dev) which rebuilds on file changes.
  • All three flags/behaviors match what's already documented in README.md (### tinybird build/deploy/dev), so no README changes were needed.
  • Updated CHANGELOG.md under a new [Unreleased] section.

Closes PROTM-2256: https://linear.app/tinybird/issue/PROTM-2256/python-sdk-wire-native-builddeploydev-commands-to-cli-entry-point

Test plan

  • Added 9 new tests in tests/test_cli_entrypoint.py covering: build success (with branch info + dashboard URL output), build --dry-run/--local flag passthrough, build failure, deploy success/failure with flag passthrough, dev success/failure with flag passthrough, and that --local/--branch are mutually exclusive.
  • Updated the existing "delegates non-SDK commands" test to use pull instead of build as its example, since build is no longer delegated.
  • make lint / make typecheck / make test all pass (141 tests). make check's secrets target fails locally due to a sandboxed-network SSL error fetching the gitleaks pre-commit environment — unrelated to this change.

Checklist

  • CI is green (lint, typecheck, test, secrets — secrets target blocked locally by sandbox network, not by this change)
  • pre-commit run --all-files passes locally (blocked by sandbox network for the secrets hook; see above)
  • Tests were added or updated when behavior changed
  • Public API / typing changes were reviewed
  • Documentation was updated (README.md / CONTRIBUTING.md) if needed (none needed — behavior matches existing docs)
  • Breaking changes are clearly documented (none — command dispatch is additive; flags match documented usage)
  • CHANGELOG.md was updated when user-facing behavior changed

`tinybird build`, `tinybird deploy`, and `tinybird dev` previously
delegated to the upstream Forward `tb` package. Wire them to the
existing native implementations (run_build/run_deploy/run_dev) so the
SDK's CLI works standalone, matching `tb build --local/--branch/--dry-run`,
`tb deploy --check/--allow-destructive-operations`, and `tb dev`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ed Tinybird CLI

build/deploy/dev already work correctly via the real tb CLI delegation
path (main's SDK_OWNED_COMMANDS policy). Reimplementing them against
the raw /v1/build and /v1/deploy endpoints duplicates logic the
installed CLI already owns and can drift from its actual behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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