tinybird 0.0.1.dev310__tar.gz → 0.0.1.dev312__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/service_datasources.py +8 -8
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/deployment.py +2 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/deployment_common.py +16 -2
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/local.py +72 -18
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/local_common.py +275 -153
- tinybird-0.0.1.dev312/tinybird/tb/modules/local_logs.py +196 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/SOURCES.txt +1 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/setup.cfg +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/client.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datafile/common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/prompts.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/client.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/config.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/__init__.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/animations.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/banner.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/command_agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/compactor.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/explore_agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/file_agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/memory.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/mock_agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/models.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/prompts.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/testing_agent.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/__init__.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/analyze.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/append.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/build.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/datafile.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/deploy.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/deploy_check.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/diff_resource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/execute_query.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/file.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/get_endpoint_stats.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/get_openapi_definition.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/mock.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/plan.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/request_endpoint.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/run_command.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/secret.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/tools/test.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/agent/utils.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/cli.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/config.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/connection.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/playground.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/deprecations.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/dev_server.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/environment.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/feedback_manager.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/info.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/login_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/mock_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/open.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev310 → tinybird-0.0.1.dev312}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -516,14 +516,14 @@ def get_tinybird_service_datasources() -> List[Dict[str, Any]]:
|
|
|
516
516
|
{
|
|
517
517
|
"name": "tinybird.vcpu_time",
|
|
518
518
|
"description": "vCPU time metrics from your workspace.",
|
|
519
|
-
"dateColumn": "
|
|
519
|
+
"dateColumn": "second_slot",
|
|
520
520
|
"engine": {
|
|
521
521
|
"engine": "AggregatingMergeTree",
|
|
522
|
-
"sorting_key": "organization_id,
|
|
523
|
-
"partition_key": "toStartOfDay(
|
|
522
|
+
"sorting_key": "organization_id, second_slot",
|
|
523
|
+
"partition_key": "toStartOfDay(second_slot)",
|
|
524
524
|
},
|
|
525
525
|
"columns": [
|
|
526
|
-
{"name": "
|
|
526
|
+
{"name": "second_slot", "type": "DateTime"},
|
|
527
527
|
{"name": "organization_id", "type": "String"},
|
|
528
528
|
{"name": "vcpu_time", "type": "Float64"},
|
|
529
529
|
],
|
|
@@ -1042,14 +1042,14 @@ def get_organization_service_datasources() -> List[Dict[str, Any]]:
|
|
|
1042
1042
|
{
|
|
1043
1043
|
"name": "organization.vcpu_time",
|
|
1044
1044
|
"description": "vCPU time metrics from your workspace.",
|
|
1045
|
-
"dateColumn": "
|
|
1045
|
+
"dateColumn": "second_slot",
|
|
1046
1046
|
"engine": {
|
|
1047
1047
|
"engine": "AggregatingMergeTree",
|
|
1048
|
-
"sorting_key": "organization_id,
|
|
1049
|
-
"partition_key": "toStartOfDay(
|
|
1048
|
+
"sorting_key": "organization_id, second_slot",
|
|
1049
|
+
"partition_key": "toStartOfDay(second_slot)",
|
|
1050
1050
|
},
|
|
1051
1051
|
"columns": [
|
|
1052
|
-
{"name": "
|
|
1052
|
+
{"name": "second_slot", "type": "DateTime"},
|
|
1053
1053
|
{"name": "organization_id", "type": "String"},
|
|
1054
1054
|
{"name": "workspace_id", "type": "String"},
|
|
1055
1055
|
{"name": "vcpu_time", "type": "Float64"},
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev312'
|
|
8
|
+
__revision__ = '2324ba4'
|
|
@@ -382,6 +382,7 @@ def create_deployment_cmd(
|
|
|
382
382
|
template: Optional[str] = None,
|
|
383
383
|
verbose: bool = False,
|
|
384
384
|
) -> None:
|
|
385
|
+
output = ctx.ensure_object(dict)["output"]
|
|
385
386
|
project: Project = ctx.ensure_object(dict)["project"]
|
|
386
387
|
if template:
|
|
387
388
|
if project.get_project_files():
|
|
@@ -416,6 +417,7 @@ def create_deployment_cmd(
|
|
|
416
417
|
check,
|
|
417
418
|
allow_destructive_operations,
|
|
418
419
|
ingest_hint=not is_web_analytics_starter_kit,
|
|
420
|
+
output=output,
|
|
419
421
|
)
|
|
420
422
|
show_web_analytics_starter_kit_hints(client, is_web_analytics_starter_kit)
|
|
421
423
|
|
|
@@ -10,6 +10,7 @@ import requests
|
|
|
10
10
|
|
|
11
11
|
from tinybird.tb.client import TinyB
|
|
12
12
|
from tinybird.tb.modules.common import (
|
|
13
|
+
echo_json,
|
|
13
14
|
echo_safe_humanfriendly_tables_format_smart_table,
|
|
14
15
|
get_display_cloud_host,
|
|
15
16
|
sys_exit,
|
|
@@ -223,6 +224,7 @@ def create_deployment(
|
|
|
223
224
|
check: Optional[bool] = None,
|
|
224
225
|
allow_destructive_operations: Optional[bool] = None,
|
|
225
226
|
ingest_hint: Optional[bool] = True,
|
|
227
|
+
output: Optional[str] = "human",
|
|
226
228
|
) -> None:
|
|
227
229
|
# TODO: This code is duplicated in build_server.py
|
|
228
230
|
# Should be refactored to be shared
|
|
@@ -274,7 +276,10 @@ def create_deployment(
|
|
|
274
276
|
|
|
275
277
|
result = api_post(TINYBIRD_API_URL, headers=HEADERS, files=files, params=params)
|
|
276
278
|
|
|
277
|
-
print_changes(result, project)
|
|
279
|
+
print_changes(result, project, output)
|
|
280
|
+
|
|
281
|
+
if output == "json" and check:
|
|
282
|
+
echo_json(result.get("deployment", {}), 8)
|
|
278
283
|
|
|
279
284
|
deployment = result.get("deployment", {})
|
|
280
285
|
feedback = deployment.get("feedback", [])
|
|
@@ -386,6 +391,15 @@ def create_deployment(
|
|
|
386
391
|
|
|
387
392
|
if auto:
|
|
388
393
|
promote_deployment(client.host, HEADERS, wait=wait, ingest_hint=ingest_hint)
|
|
394
|
+
# Fetch the final deployment state after promotion for JSON output
|
|
395
|
+
if output == "json":
|
|
396
|
+
url = f"{client.host}/v1/deployments/{deployment.get('id')}"
|
|
397
|
+
res = api_fetch(url, HEADERS)
|
|
398
|
+
deployment = res.get("deployment")
|
|
399
|
+
|
|
400
|
+
# Output JSON at the appropriate time based on the execution path
|
|
401
|
+
if output == "json" and deployment:
|
|
402
|
+
echo_json(deployment, 8)
|
|
389
403
|
|
|
390
404
|
|
|
391
405
|
def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> str:
|
|
@@ -397,7 +411,7 @@ def _build_data_movement_message(kind: str, source_mv_name: Optional[str]) -> st
|
|
|
397
411
|
return ""
|
|
398
412
|
|
|
399
413
|
|
|
400
|
-
def print_changes(result: dict, project: Project) -> None:
|
|
414
|
+
def print_changes(result: dict, project: Project, output: Optional[str] = "human") -> None:
|
|
401
415
|
deployment = result.get("deployment", {})
|
|
402
416
|
resources_columns = ["status", "name", "type", "path"]
|
|
403
417
|
resources: list[list[Union[str, None]]] = []
|
|
@@ -10,7 +10,9 @@ from docker.client import DockerClient
|
|
|
10
10
|
|
|
11
11
|
from tinybird.tb.modules.cli import cli
|
|
12
12
|
from tinybird.tb.modules.common import echo_json, update_cli
|
|
13
|
+
from tinybird.tb.modules.exceptions import CLILocalException
|
|
13
14
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
15
|
+
from tinybird.tb.modules.info import get_local_info
|
|
14
16
|
from tinybird.tb.modules.local_common import (
|
|
15
17
|
TB_CONTAINER_NAME,
|
|
16
18
|
TB_LOCAL_ADDRESS,
|
|
@@ -18,6 +20,19 @@ from tinybird.tb.modules.local_common import (
|
|
|
18
20
|
get_existing_container_with_matching_env,
|
|
19
21
|
start_tinybird_local,
|
|
20
22
|
)
|
|
23
|
+
from tinybird.tb.modules.local_logs import (
|
|
24
|
+
check_memory_sufficient,
|
|
25
|
+
clickhouse_is_ready,
|
|
26
|
+
container_is_ready,
|
|
27
|
+
container_is_starting,
|
|
28
|
+
container_is_stopping,
|
|
29
|
+
container_is_unhealthy,
|
|
30
|
+
container_stats,
|
|
31
|
+
events_is_ready,
|
|
32
|
+
local_authentication_is_ready,
|
|
33
|
+
redis_is_ready,
|
|
34
|
+
server_is_ready,
|
|
35
|
+
)
|
|
21
36
|
|
|
22
37
|
|
|
23
38
|
def stop_tinybird_local(docker_client: DockerClient) -> None:
|
|
@@ -76,30 +91,69 @@ def stop() -> None:
|
|
|
76
91
|
@click.pass_context
|
|
77
92
|
def status(ctx: click.Context) -> None:
|
|
78
93
|
"""Check status of Tinybird Local"""
|
|
94
|
+
|
|
95
|
+
click.echo(FeedbackManager.highlight(message="» Checking status..."))
|
|
79
96
|
docker_client = get_docker_client()
|
|
80
97
|
container = get_existing_container_with_matching_env(docker_client, TB_CONTAINER_NAME, {})
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
try:
|
|
100
|
+
if container:
|
|
101
|
+
if container_is_ready(container):
|
|
102
|
+
stats = container_stats(container, docker_client)
|
|
103
|
+
click.echo(FeedbackManager.info(message=f"✓ Tinybird Local container ({stats})"))
|
|
104
|
+
|
|
105
|
+
# Check memory sufficiency
|
|
106
|
+
is_sufficient, warning_msg = check_memory_sufficient(container, docker_client)
|
|
107
|
+
if not is_sufficient and warning_msg:
|
|
108
|
+
click.echo(FeedbackManager.warning(message=f"△ {warning_msg}"))
|
|
109
|
+
|
|
110
|
+
if not clickhouse_is_ready(container):
|
|
111
|
+
raise Exception("Clickhouse is not ready.")
|
|
112
|
+
click.echo(FeedbackManager.info(message="✓ Clickhouse"))
|
|
113
|
+
|
|
114
|
+
if not redis_is_ready(container):
|
|
115
|
+
raise Exception("Redis is not ready.")
|
|
116
|
+
click.echo(FeedbackManager.info(message="✓ Redis"))
|
|
117
|
+
|
|
118
|
+
if not server_is_ready(container):
|
|
119
|
+
raise Exception("Server is not ready.")
|
|
120
|
+
click.echo(FeedbackManager.info(message="✓ Server"))
|
|
121
|
+
|
|
122
|
+
if not events_is_ready(container):
|
|
123
|
+
raise Exception("Events is not ready.")
|
|
124
|
+
click.echo(FeedbackManager.info(message="✓ Events"))
|
|
125
|
+
|
|
126
|
+
if not local_authentication_is_ready(container):
|
|
127
|
+
raise Exception("Tinybird Local authentication is not ready.")
|
|
128
|
+
click.echo(FeedbackManager.info(message="✓ Tinybird Local authentication"))
|
|
129
|
+
|
|
130
|
+
click.echo(FeedbackManager.success(message="✓ Tinybird Local is ready!"))
|
|
131
|
+
click.echo(FeedbackManager.highlight(message="\n» Tinybird Local:"))
|
|
132
|
+
config = ctx.ensure_object(dict).get("config", {})
|
|
133
|
+
get_local_info(config)
|
|
134
|
+
elif container_is_starting(container):
|
|
135
|
+
click.echo(FeedbackManager.highlight(message="* Tinybird Local is starting..."))
|
|
136
|
+
elif container_is_stopping(container):
|
|
137
|
+
click.echo(FeedbackManager.highlight(message="* Tinybird Local is stopping..."))
|
|
138
|
+
elif container_is_unhealthy(container):
|
|
139
|
+
is_sufficient, warning_msg = check_memory_sufficient(container, docker_client)
|
|
140
|
+
if not is_sufficient and warning_msg:
|
|
141
|
+
click.echo(FeedbackManager.warning(message=f"△ {warning_msg}"))
|
|
142
|
+
click.echo(
|
|
143
|
+
FeedbackManager.error(
|
|
144
|
+
message="* Tinybird Local is unhealthy. Try running `tb local restart` in a few seconds."
|
|
145
|
+
)
|
|
146
|
+
)
|
|
147
|
+
else:
|
|
148
|
+
click.echo(
|
|
149
|
+
FeedbackManager.error(message="✗ Tinybird Local is not running. Run 'tb local start' to start it")
|
|
150
|
+
)
|
|
97
151
|
else:
|
|
98
152
|
click.echo(
|
|
99
|
-
FeedbackManager.
|
|
153
|
+
FeedbackManager.error(message="✗ Tinybird Local is not running. Run 'tb local start' to start it")
|
|
100
154
|
)
|
|
101
|
-
|
|
102
|
-
|
|
155
|
+
except Exception as e:
|
|
156
|
+
raise CLILocalException(FeedbackManager.error(message=f"Tinybird Local is not ready. Reason: {e}"))
|
|
103
157
|
|
|
104
158
|
|
|
105
159
|
@local.command()
|