tinybird 4.4.1.dev0__tar.gz → 4.4.2__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-4.4.1.dev0 → tinybird-4.4.2}/PKG-INFO +11 -1
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/config.py +6 -3
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/git_settings.py +1 -1
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/sql_template.py +4 -3
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/__cli__.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/config.py +6 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/branch.py +6 -6
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/build.py +38 -1
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/cli.py +26 -9
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/common.py +36 -14
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/connection.py +3 -3
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/connection_s3.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/build.py +4 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/build_datasource.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/playground.py +4 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datasource.py +16 -12
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/deprecations.py +12 -8
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/feedback_manager.py +52 -33
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/info.py +5 -5
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/local.py +8 -4
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/local_common.py +44 -25
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/login_common.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/open.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/preview.py +4 -4
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/workspace.py +10 -6
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/workspace_members.py +4 -4
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/auth.py +1 -1
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/branch.py +8 -8
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/cli.py +10 -10
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/common.py +11 -11
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/datasource.py +4 -4
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/workspace.py +2 -2
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/PKG-INFO +11 -1
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/setup.cfg +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/__cli__.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/check_pypi.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/client.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/context.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datafile/common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datafile/exceptions.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datafile/parse_connection.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datafile/parse_datasource.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datafile/parse_pipe.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/datatypes.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/feedback_manager.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/prompts.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/service_datasources.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/sql.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/sql_toolset.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/syncasync.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/check_pypi.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/cli.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/client.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/build_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/cicd.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/config.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/connection_kafka.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/create.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/format_connection.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/deployment.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/deployment_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/endpoint.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/fmt.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/infra.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/job.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/job_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/local_logs.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/login.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/logout.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/logs.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/project.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/project_commands.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/py_project.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/query_output.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/secret.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/secret_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/sink.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/table.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/test.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/test_common.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/token.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/ts_project.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird/tornado_template.py +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-4.4.1.dev0 → tinybird-4.4.2}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: tinybird
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.2
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/forward/commands
|
|
6
6
|
Author: Tinybird
|
|
@@ -52,6 +52,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
52
52
|
Changelog
|
|
53
53
|
----------
|
|
54
54
|
|
|
55
|
+
4.4.2
|
|
56
|
+
*******
|
|
57
|
+
|
|
58
|
+
- `Added` `tb build` and `tb dev` now display git branch, Tinybird branch name, and dashboard URL before building. In local mode, a separate workspace is created per git branch.
|
|
59
|
+
|
|
60
|
+
4.4.1
|
|
61
|
+
*******
|
|
62
|
+
|
|
63
|
+
- `Changed` CLI messages now show `uv run tinybird` for python-sdk projects and `npx tinybird` for ts-sdk projects instead of `tb`.
|
|
64
|
+
|
|
55
65
|
4.4.0
|
|
56
66
|
*******
|
|
57
67
|
|
|
@@ -30,7 +30,8 @@ LEGACY_HOSTS = {
|
|
|
30
30
|
"https://api.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
|
|
31
31
|
"https://api.eu-west-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-west-1",
|
|
32
32
|
"https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
|
|
33
|
-
"https://api.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
|
|
33
|
+
"https://api.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
|
|
34
|
+
"https://api.ap-east-1.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
|
|
34
35
|
"https://api.northamerica-northeast2.gcp.tinybird.co": "https://app.tinybird.co/gcp/northamerica-northeast2",
|
|
35
36
|
"https://api.wadus1.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus1",
|
|
36
37
|
"https://api.wadus2.gcp.tinybird.co": "https://app.wadus.tinybird.co/gcp/wadus2",
|
|
@@ -47,7 +48,8 @@ LEGACY_HOSTS = {
|
|
|
47
48
|
"https://ui.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/us-west-2",
|
|
48
49
|
"https://ui.eu-central-1.aws.tinybird.co": "https://app.tinybird.co/aws/eu-central-1",
|
|
49
50
|
"https://ui.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
|
|
50
|
-
"https://ui.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east",
|
|
51
|
+
"https://ui.ap-east.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
|
|
52
|
+
"https://ui.ap-east-1.aws.tinybird.co": "https://app.tinybird.co/aws/ap-east-1",
|
|
51
53
|
"https://ui.split.tinybird.co": "https://app.tinybird.co/aws/split-us-east",
|
|
52
54
|
"https://ui.split.us-west-2.aws.tinybird.co": "https://app.tinybird.co/aws/split-us-west-2",
|
|
53
55
|
"https://ui.northamerica-northeast2.gcp.tinybird.co": "https://app.tinybird.co/gcp/northamerica-northeast2",
|
|
@@ -74,7 +76,8 @@ CLOUD_HOSTS = {
|
|
|
74
76
|
"https://api.eu-west-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-west-1",
|
|
75
77
|
"https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
|
|
76
78
|
"https://api.northamerica-northeast2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/northamerica-northeast2",
|
|
77
|
-
"https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east",
|
|
79
|
+
"https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
|
|
80
|
+
"https://api.ap-east-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
|
|
78
81
|
"https://ui.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west3",
|
|
79
82
|
"https://ui.us-east.tinybird.co": "https://cloud.tinybird.co/gcp/us-east4",
|
|
80
83
|
"https://ui.us-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/us-east-1",
|
|
@@ -71,7 +71,7 @@ VERSION=0.0.0
|
|
|
71
71
|
# TB_SKIP_REGRESSION=0
|
|
72
72
|
|
|
73
73
|
# Use `OBFUSCATE_REGEX_PATTERN` and `OBFUSCATE_PATTERN_SEPARATOR` environment variables to define a regex pattern and a separator (in case of a single string with multiple regex) to obfuscate secrets in the CLI output.
|
|
74
|
-
# OBFUSCATE_REGEX_PATTERN="https://(www
|
|
74
|
+
# OBFUSCATE_REGEX_PATTERN="https://(www\\.)?[^/]+||^Follow these instructions =>"
|
|
75
75
|
# OBFUSCATE_PATTERN_SEPARATOR=||
|
|
76
76
|
##########
|
|
77
77
|
"""
|
|
@@ -20,6 +20,8 @@ from tinybird.context import (
|
|
|
20
20
|
from .datatypes import testers
|
|
21
21
|
from .tornado_template import VALID_CUSTOM_FUNCTION_NAMES, SecurityException, Template
|
|
22
22
|
|
|
23
|
+
VALID_ACTIVATE_FEATURES = frozenset(["analyzer", "parallel_replicas", "optimize_aggregation_in_order"])
|
|
24
|
+
|
|
23
25
|
TB_SECRET_IN_TEST_MODE = "tb_secret_dont_raise"
|
|
24
26
|
TB_SECRET_PREFIX = "tb_secret_"
|
|
25
27
|
CH_PARAM_PREFIX = "param_"
|
|
@@ -1463,10 +1465,9 @@ def generate(self, **kwargs) -> Tuple[str, TemplateExecutionResults]:
|
|
|
1463
1465
|
return Expression(f"-- cache_ttl {ttl_expression}\n")
|
|
1464
1466
|
|
|
1465
1467
|
def set_activate(feature):
|
|
1466
|
-
|
|
1467
|
-
if feature not in valid_features:
|
|
1468
|
+
if feature not in VALID_ACTIVATE_FEATURES:
|
|
1468
1469
|
raise SQLTemplateException(f"'{feature}' is not a valid 'activate' argument")
|
|
1469
|
-
template_execution_results
|
|
1470
|
+
template_execution_results.setdefault("activate", set()).add(feature)
|
|
1470
1471
|
return Expression(f"-- activate {feature}\n")
|
|
1471
1472
|
|
|
1472
1473
|
def set_disable_feature(feature):
|
|
@@ -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__ = '4.4.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '4.4.2'
|
|
8
|
+
__revision__ = '026901c'
|
|
@@ -30,7 +30,9 @@ CLOUD_HOSTS = {
|
|
|
30
30
|
"https://api.eu-central-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-central-1",
|
|
31
31
|
"https://api.eu-west-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/eu-west-1",
|
|
32
32
|
"https://api.europe-west2.gcp.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west2",
|
|
33
|
-
"https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east",
|
|
33
|
+
"https://api.ap-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
|
|
34
|
+
"https://api.ap-east-1.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-east-1",
|
|
35
|
+
"https://api.ap-southeast-2.aws.tinybird.co": "https://cloud.tinybird.co/aws/ap-southeast-2",
|
|
34
36
|
"https://ui.tinybird.co": "https://cloud.tinybird.co/gcp/europe-west3",
|
|
35
37
|
"https://ui.us-east.tinybird.co": "https://cloud.tinybird.co/gcp/us-east4",
|
|
36
38
|
"https://ui.us-east.aws.tinybird.co": "https://cloud.tinybird.co/aws/us-east-1",
|
|
@@ -47,7 +49,9 @@ CH_HOSTS = {
|
|
|
47
49
|
"https://api.eu-central-1.aws.tinybird.co": "https://clickhouse.eu-central-1.aws.tinybird.co",
|
|
48
50
|
"https://api.eu-west-1.aws.tinybird.co": "https://clickhouse.eu-west-1.aws.tinybird.co",
|
|
49
51
|
"https://api.europe-west2.gcp.tinybird.co": "https://clickhouse.europe-west2.gcp.tinybird.co",
|
|
50
|
-
"https://api.ap-east.aws.tinybird.co": "https://clickhouse.ap-east.aws.tinybird.co",
|
|
52
|
+
"https://api.ap-east.aws.tinybird.co": "https://clickhouse.ap-east-1.aws.tinybird.co",
|
|
53
|
+
"https://api.ap-east-1.aws.tinybird.co": "https://clickhouse.ap-east-1.aws.tinybird.co",
|
|
54
|
+
"https://api.ap-southeast-2.aws.tinybird.co": "https://clickhouse.ap-southeast-2.aws.tinybird.co",
|
|
51
55
|
"https://ui.tinybird.co": "https://clickhouse.tinybird.co",
|
|
52
56
|
"https://ui.us-east.tinybird.co": "https://clickhouse.us-east.tinybird.co",
|
|
53
57
|
"https://ui.us-east.aws.tinybird.co": "https://clickhouse.us-east.aws.tinybird.co",
|
|
@@ -21,7 +21,7 @@ from tinybird.tb.modules.common import (
|
|
|
21
21
|
)
|
|
22
22
|
from tinybird.tb.modules.config import CLIConfig
|
|
23
23
|
from tinybird.tb.modules.exceptions import CLIBranchException, CLIException
|
|
24
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
24
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@cli.group()
|
|
@@ -125,7 +125,7 @@ def delete_branch(branch_name_or_id: str, yes: bool) -> None:
|
|
|
125
125
|
raise CLIBranchException(FeedbackManager.error_exception(error=str(e)))
|
|
126
126
|
|
|
127
127
|
if not workspace_to_delete:
|
|
128
|
-
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id))
|
|
128
|
+
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id, cli=get_cli_name()))
|
|
129
129
|
|
|
130
130
|
if yes or click.confirm(FeedbackManager.warning_confirm_delete_branch(branch=workspace_to_delete["name"])):
|
|
131
131
|
need_to_switch_to_main = workspace_to_delete.get("main") and config["id"] == workspace_to_delete["id"]
|
|
@@ -148,7 +148,7 @@ def delete_branch(branch_name_or_id: str, yes: bool) -> None:
|
|
|
148
148
|
if workspace_main:
|
|
149
149
|
switch_to_workspace_by_user_workspace_data(config, workspace_main)
|
|
150
150
|
else:
|
|
151
|
-
raise CLIException(FeedbackManager.error_switching_to_main())
|
|
151
|
+
raise CLIException(FeedbackManager.error_switching_to_main(cli=get_cli_name()))
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
@branch.command(name="clear", short_help="Clear a branch by deleting and recreating it.")
|
|
@@ -208,10 +208,10 @@ def clear_branch(
|
|
|
208
208
|
(workspace for workspace in workspace_branches if workspace["id"] == config["id"]), None
|
|
209
209
|
)
|
|
210
210
|
if not workspace_to_clear:
|
|
211
|
-
raise CLIBranchException(FeedbackManager.error_not_a_branch())
|
|
211
|
+
raise CLIBranchException(FeedbackManager.error_not_a_branch(cli=get_cli_name()))
|
|
212
212
|
|
|
213
213
|
if not workspace_to_clear:
|
|
214
|
-
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id or ""))
|
|
214
|
+
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name_or_id or "", cli=get_cli_name()))
|
|
215
215
|
|
|
216
216
|
branch_name = workspace_to_clear["name"]
|
|
217
217
|
if yes or click.confirm(FeedbackManager.warning_confirm_clear_workspace()):
|
|
@@ -232,7 +232,7 @@ def clear_branch(
|
|
|
232
232
|
(workspace for workspace in recreated_branches if workspace.get("name") == branch_name), None
|
|
233
233
|
)
|
|
234
234
|
if not recreated_branch:
|
|
235
|
-
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name))
|
|
235
|
+
raise CLIBranchException(FeedbackManager.error_branch(branch=branch_name, cli=get_cli_name()))
|
|
236
236
|
|
|
237
237
|
click.echo(FeedbackManager.success(message=f"✓ Branch '{branch_name}' cleared"))
|
|
238
238
|
if was_current_branch:
|
|
@@ -12,8 +12,9 @@ from tinybird.datafile.exceptions import ParseException
|
|
|
12
12
|
from tinybird.datafile.parse_datasource import parse_datasource
|
|
13
13
|
from tinybird.datafile.parse_pipe import parse_pipe
|
|
14
14
|
from tinybird.tb.client import TinyB
|
|
15
|
+
from tinybird.tb.config import CLOUD_HOSTS
|
|
15
16
|
from tinybird.tb.modules.build_common import process
|
|
16
|
-
from tinybird.tb.modules.cli import cli
|
|
17
|
+
from tinybird.tb.modules.cli import cli, get_current_git_branch
|
|
17
18
|
from tinybird.tb.modules.config import CLIConfig
|
|
18
19
|
from tinybird.tb.modules.datafile.playground import folder_playground
|
|
19
20
|
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
@@ -22,6 +23,40 @@ from tinybird.tb.modules.query_output import print_table_formatted
|
|
|
22
23
|
from tinybird.tb.modules.watch import watch_files, watch_project
|
|
23
24
|
|
|
24
25
|
|
|
26
|
+
def _get_dashboard_url(config: Dict[str, Any], branch_name: str, is_local: bool) -> Optional[str]:
|
|
27
|
+
host = config.get("host", "")
|
|
28
|
+
cloud_base = CLOUD_HOSTS.get(host)
|
|
29
|
+
workspace_name = config.get("name", "")
|
|
30
|
+
if not cloud_base or not workspace_name:
|
|
31
|
+
return None
|
|
32
|
+
if is_local:
|
|
33
|
+
return f"{cloud_base}/{workspace_name}~local~{branch_name}"
|
|
34
|
+
return f"{cloud_base}/{workspace_name}~{branch_name}"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def echo_branch_info(obj: Dict[str, Any]) -> None:
|
|
38
|
+
local_branch = obj.get("local_branch")
|
|
39
|
+
cloud_branch = obj.get("branch")
|
|
40
|
+
if not local_branch and not cloud_branch:
|
|
41
|
+
return
|
|
42
|
+
git_branch = obj.get("git_branch") or get_current_git_branch()
|
|
43
|
+
branch_created = obj.get("branch_created", False)
|
|
44
|
+
status = "✓ created" if branch_created else "✓ exists"
|
|
45
|
+
config = obj.get("config", {})
|
|
46
|
+
if git_branch:
|
|
47
|
+
click.echo(FeedbackManager.highlight(message=f"» Git branch: {git_branch}"))
|
|
48
|
+
if local_branch:
|
|
49
|
+
click.echo(FeedbackManager.highlight(message=f"» Tinybird Local branch: {local_branch} {status}"))
|
|
50
|
+
dashboard_url = _get_dashboard_url(config, local_branch, is_local=True)
|
|
51
|
+
elif cloud_branch:
|
|
52
|
+
click.echo(FeedbackManager.highlight(message=f"» Tinybird Cloud branch: {cloud_branch} {status}"))
|
|
53
|
+
dashboard_url = _get_dashboard_url(config, cloud_branch, is_local=False)
|
|
54
|
+
else:
|
|
55
|
+
dashboard_url = None
|
|
56
|
+
if dashboard_url:
|
|
57
|
+
click.echo(FeedbackManager.gray(message=f" ↳ {dashboard_url}"))
|
|
58
|
+
|
|
59
|
+
|
|
25
60
|
@cli.command()
|
|
26
61
|
@click.option("--watch", is_flag=True, default=False, help="Watch for changes and rebuild automatically")
|
|
27
62
|
@click.option(
|
|
@@ -56,6 +91,7 @@ def build(ctx: click.Context, watch: bool, with_connections: bool) -> None:
|
|
|
56
91
|
)
|
|
57
92
|
)
|
|
58
93
|
|
|
94
|
+
echo_branch_info(obj)
|
|
59
95
|
click.echo(FeedbackManager.highlight_building_project())
|
|
60
96
|
process(
|
|
61
97
|
project=project,
|
|
@@ -104,6 +140,7 @@ def dev(ctx: click.Context, with_connections: Optional[bool]) -> None:
|
|
|
104
140
|
tb_client: TinyB = ctx.ensure_object(dict)["client"]
|
|
105
141
|
config: Dict[str, Any] = ctx.ensure_object(dict)["config"]
|
|
106
142
|
|
|
143
|
+
echo_branch_info(obj)
|
|
107
144
|
click.echo(FeedbackManager.highlight_building_project())
|
|
108
145
|
process(
|
|
109
146
|
project=project,
|
|
@@ -43,7 +43,7 @@ from tinybird.tb.modules.config import CURRENT_VERSION, CLIConfig
|
|
|
43
43
|
from tinybird.tb.modules.datafile.build import build_graph
|
|
44
44
|
from tinybird.tb.modules.datafile.pull import folder_pull
|
|
45
45
|
from tinybird.tb.modules.exceptions import CLIChException
|
|
46
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
46
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
47
47
|
from tinybird.tb.modules.local_common import TB_LOCAL_HOST, TB_LOCAL_PORT, get_tinybird_local_client
|
|
48
48
|
from tinybird.tb.modules.login_common import check_current_folder_in_sessions
|
|
49
49
|
from tinybird.tb.modules.project import Project
|
|
@@ -68,6 +68,8 @@ PROJECT_TYPE_TYPESCRIPT = "ts-sdk"
|
|
|
68
68
|
PROJECT_TYPE_PYTHON = "python-sdk"
|
|
69
69
|
PROJECT_TYPE_CLI = "cli"
|
|
70
70
|
PROJECT_TYPES = {PROJECT_TYPE_TYPESCRIPT, PROJECT_TYPE_PYTHON, PROJECT_TYPE_CLI}
|
|
71
|
+
|
|
72
|
+
|
|
71
73
|
CLI_PROJECT_MARKERS = (
|
|
72
74
|
"datasources",
|
|
73
75
|
"pipes",
|
|
@@ -415,7 +417,7 @@ def get_project_type_from_tinybird_config(start_dir: str) -> Optional[str]:
|
|
|
415
417
|
|
|
416
418
|
|
|
417
419
|
def _set_config_to_main_workspace(config: Dict[str, Any], staging: bool) -> None:
|
|
418
|
-
client = _get_tb_client(config.get("token", ""), config["host"], staging=staging)
|
|
420
|
+
client, _ = _get_tb_client(config.get("token", ""), config["host"], staging=staging)
|
|
419
421
|
response = client.user_workspaces_and_branches(version="v1")
|
|
420
422
|
workspaces = response.get("workspaces", [])
|
|
421
423
|
if not workspaces:
|
|
@@ -471,8 +473,8 @@ def resolve_dev_mode_target(
|
|
|
471
473
|
raise CLIException(
|
|
472
474
|
FeedbackManager.error(
|
|
473
475
|
message=(
|
|
474
|
-
"Cannot deploy to main workspace with '
|
|
475
|
-
"Use '
|
|
476
|
+
f"Cannot deploy to main workspace with '{get_cli_name()} build'. "
|
|
477
|
+
f"Use '{get_cli_name()} deploy' to deploy to production, or switch to a feature branch."
|
|
476
478
|
)
|
|
477
479
|
)
|
|
478
480
|
)
|
|
@@ -565,12 +567,13 @@ def cli(
|
|
|
565
567
|
click.echo(FeedbackManager.warning_development_cli())
|
|
566
568
|
|
|
567
569
|
if "x.y.z" not in CURRENT_VERSION and latest_version != CURRENT_VERSION:
|
|
570
|
+
cli = get_cli_name(get_project_type_from_tinybird_config(os.getcwd()))
|
|
568
571
|
click.echo(
|
|
569
572
|
FeedbackManager.warning(message=f"** New version available. {CURRENT_VERSION} -> {latest_version}")
|
|
570
573
|
)
|
|
571
574
|
click.echo(
|
|
572
575
|
FeedbackManager.warning(
|
|
573
|
-
message="** Run `
|
|
576
|
+
message=f"** Run `{cli} update` to update or `export TB_VERSION_WARNING=0` to skip the check.\n"
|
|
574
577
|
)
|
|
575
578
|
)
|
|
576
579
|
|
|
@@ -615,7 +618,7 @@ def cli(
|
|
|
615
618
|
config = get_config(host, token, user_token=user_token, config_file=config_temp._path)
|
|
616
619
|
project_type = get_project_type_from_tinybird_config(os.getcwd()) or PROJECT_TYPE_CLI
|
|
617
620
|
ctx.ensure_object(dict)["project_type"] = project_type
|
|
618
|
-
client = _get_tb_client(config.get("token", ""), config["host"], request_from=project_type)
|
|
621
|
+
client, _ = _get_tb_client(config.get("token", ""), config["host"], request_from=project_type)
|
|
619
622
|
|
|
620
623
|
tinybird_dev_mode = get_dev_mode_from_tinybird_config(os.getcwd())
|
|
621
624
|
if tinybird_dev_mode:
|
|
@@ -700,7 +703,9 @@ def cli(
|
|
|
700
703
|
if switched_datasource_create_to_cloud:
|
|
701
704
|
click.echo(
|
|
702
705
|
FeedbackManager.gray(
|
|
703
|
-
message=(
|
|
706
|
+
message=(
|
|
707
|
+
f"Tinybird Local is not running. Running `{get_cli_name()} datasource create` against Tinybird Cloud."
|
|
708
|
+
)
|
|
704
709
|
)
|
|
705
710
|
)
|
|
706
711
|
|
|
@@ -1062,7 +1067,7 @@ def create_ctx_client(
|
|
|
1062
1067
|
if method and show_warnings:
|
|
1063
1068
|
click.echo(FeedbackManager.gray(message=f"Authentication method: {method}"))
|
|
1064
1069
|
|
|
1065
|
-
|
|
1070
|
+
client, branch_created = _get_tb_client(
|
|
1066
1071
|
config.get("token", ""),
|
|
1067
1072
|
config["host"],
|
|
1068
1073
|
staging=staging,
|
|
@@ -1070,10 +1075,22 @@ def create_ctx_client(
|
|
|
1070
1075
|
create_branch_if_missing=create_branch_if_missing,
|
|
1071
1076
|
request_from=project_type,
|
|
1072
1077
|
)
|
|
1078
|
+
ctx.ensure_object(dict)["branch_created"] = branch_created
|
|
1079
|
+
return client
|
|
1073
1080
|
test = command in command_always_test
|
|
1074
1081
|
if show_warnings and command:
|
|
1075
1082
|
click.echo(FeedbackManager.gray(message="Running against Tinybird Local"))
|
|
1076
|
-
|
|
1083
|
+
local_branch = None
|
|
1084
|
+
if command in ("build", "dev") and not test:
|
|
1085
|
+
git_branch = get_current_git_branch()
|
|
1086
|
+
if git_branch and not is_main_git_branch(git_branch):
|
|
1087
|
+
local_branch = get_tinybird_branch_name_from_git_branch(git_branch)
|
|
1088
|
+
ctx.ensure_object(dict)["git_branch"] = git_branch
|
|
1089
|
+
client, workspace_created = get_tinybird_local_client(config, test=test, staging=staging, branch=local_branch)
|
|
1090
|
+
if local_branch:
|
|
1091
|
+
ctx.ensure_object(dict)["local_branch"] = local_branch
|
|
1092
|
+
ctx.ensure_object(dict)["branch_created"] = workspace_created
|
|
1093
|
+
return client
|
|
1077
1094
|
|
|
1078
1095
|
|
|
1079
1096
|
def get_target_env(cloud: bool, branch: Optional[str]) -> str:
|
|
@@ -265,7 +265,9 @@ line experience. To opt-out, set TB_CLI_TELEMETRY_OPTOUT to '1' or 'true'."""
|
|
|
265
265
|
try:
|
|
266
266
|
self.main(*args, **kwargs)
|
|
267
267
|
except AuthNoTokenException:
|
|
268
|
-
|
|
268
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
269
|
+
|
|
270
|
+
error_msg = FeedbackManager.error_notoken(cli=get_cli_name())
|
|
269
271
|
error_event = "auth_error"
|
|
270
272
|
exit_code = 1
|
|
271
273
|
except AuthException as ex:
|
|
@@ -361,7 +363,8 @@ def _get_tb_client(
|
|
|
361
363
|
branch: Optional[str] = None,
|
|
362
364
|
create_branch_if_missing: bool = False,
|
|
363
365
|
request_from: Optional[str] = None,
|
|
364
|
-
) -> TinyB:
|
|
366
|
+
) -> Tuple[TinyB, bool]:
|
|
367
|
+
"""Returns a tuple of (client, branch_created)."""
|
|
365
368
|
resolved_request_from = request_from
|
|
366
369
|
disable_ssl: bool = getenv_bool("TB_DISABLE_SSL_CHECKS", False)
|
|
367
370
|
cloud_client = TinyB(
|
|
@@ -375,8 +378,9 @@ def _get_tb_client(
|
|
|
375
378
|
)
|
|
376
379
|
|
|
377
380
|
if not branch:
|
|
378
|
-
return cloud_client
|
|
381
|
+
return cloud_client, False
|
|
379
382
|
|
|
383
|
+
branch_created = False
|
|
380
384
|
workspaces = cloud_client.user_workspaces_and_branches(version="v1")
|
|
381
385
|
workspace = next((w for w in workspaces.get("workspaces", []) if w.get("name") == branch), None)
|
|
382
386
|
if not workspace and create_branch_if_missing:
|
|
@@ -394,6 +398,7 @@ def _get_tb_client(
|
|
|
394
398
|
|
|
395
399
|
workspaces = cloud_client.user_workspaces_and_branches(version="v1")
|
|
396
400
|
workspace = next((w for w in workspaces.get("workspaces", []) if w.get("name") == branch), None)
|
|
401
|
+
branch_created = True
|
|
397
402
|
|
|
398
403
|
if not workspace:
|
|
399
404
|
raise CLIException(FeedbackManager.error_exception(error=f"Branch {branch} not found"))
|
|
@@ -406,7 +411,7 @@ def _get_tb_client(
|
|
|
406
411
|
send_telemetry=True,
|
|
407
412
|
staging=staging,
|
|
408
413
|
request_from=resolved_request_from,
|
|
409
|
-
)
|
|
414
|
+
), branch_created
|
|
410
415
|
|
|
411
416
|
|
|
412
417
|
def create_tb_client(ctx: Context) -> TinyB:
|
|
@@ -414,7 +419,8 @@ def create_tb_client(ctx: Context) -> TinyB:
|
|
|
414
419
|
token = obj["config"].get("token", "")
|
|
415
420
|
host = obj["config"].get("host", DEFAULT_API_HOST)
|
|
416
421
|
request_from = obj.get("project_type")
|
|
417
|
-
|
|
422
|
+
client, _ = _get_tb_client(token, host, request_from=request_from)
|
|
423
|
+
return client
|
|
418
424
|
|
|
419
425
|
|
|
420
426
|
def _analyze(filename: str, client: TinyB, format: str):
|
|
@@ -1136,7 +1142,11 @@ def validate_string_connector_param(param, s):
|
|
|
1136
1142
|
|
|
1137
1143
|
def validate_connection_name(client, connection_name, service):
|
|
1138
1144
|
if client.get_connector(connection_name, service) is not None:
|
|
1139
|
-
|
|
1145
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1146
|
+
|
|
1147
|
+
raise CLIConnectionException(
|
|
1148
|
+
FeedbackManager.error_connection_already_exists(name=connection_name, cli=get_cli_name())
|
|
1149
|
+
)
|
|
1140
1150
|
|
|
1141
1151
|
|
|
1142
1152
|
def _get_setting_value(connection, setting, sensitive_settings):
|
|
@@ -1176,7 +1186,9 @@ def switch_workspace(config: CLIConfig, workspace_name_or_id: str, only_environm
|
|
|
1176
1186
|
)
|
|
1177
1187
|
|
|
1178
1188
|
if not workspace:
|
|
1179
|
-
|
|
1189
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1190
|
+
|
|
1191
|
+
raise CLIException(FeedbackManager.error_workspace(workspace=workspace_name_or_id, cli=get_cli_name()))
|
|
1180
1192
|
|
|
1181
1193
|
config.set_token(workspace["token"])
|
|
1182
1194
|
config.set_token_for_host(workspace["token"], config.get_host())
|
|
@@ -1317,17 +1329,23 @@ def get_host_from_region(
|
|
|
1317
1329
|
try:
|
|
1318
1330
|
host = regions[index - 1]["api_host"]
|
|
1319
1331
|
except Exception:
|
|
1320
|
-
|
|
1332
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1333
|
+
|
|
1334
|
+
raise CLIException(FeedbackManager.error_getting_region_by_index(cli=get_cli_name()))
|
|
1321
1335
|
except ValueError:
|
|
1322
1336
|
region_name = region_name_or_host_or_id.lower()
|
|
1323
1337
|
try:
|
|
1324
1338
|
region = get_region_from_host(region_name, regions)
|
|
1325
1339
|
host = region["api_host"] if region else None
|
|
1326
1340
|
except Exception:
|
|
1327
|
-
|
|
1341
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1342
|
+
|
|
1343
|
+
raise CLIException(FeedbackManager.error_getting_region_by_name_or_url(cli=get_cli_name()))
|
|
1328
1344
|
|
|
1329
1345
|
if not host:
|
|
1330
|
-
|
|
1346
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1347
|
+
|
|
1348
|
+
raise CLIException(FeedbackManager.error_getting_region_by_name_or_url(cli=get_cli_name()))
|
|
1331
1349
|
|
|
1332
1350
|
return regions, host
|
|
1333
1351
|
|
|
@@ -1468,7 +1486,9 @@ def try_authenticate(
|
|
|
1468
1486
|
break
|
|
1469
1487
|
|
|
1470
1488
|
if not authenticated:
|
|
1471
|
-
|
|
1489
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
1490
|
+
|
|
1491
|
+
raise CLIAuthException(FeedbackManager.error_invalid_token(cli=get_cli_name()))
|
|
1472
1492
|
|
|
1473
1493
|
config.persist_to_file()
|
|
1474
1494
|
|
|
@@ -1663,7 +1683,7 @@ def run_aws_iamrole_connection_flow(
|
|
|
1663
1683
|
|
|
1664
1684
|
if use_local:
|
|
1665
1685
|
try:
|
|
1666
|
-
local_client = get_tinybird_local_client(config)
|
|
1686
|
+
local_client, _ = get_tinybird_local_client(config)
|
|
1667
1687
|
except Exception as e:
|
|
1668
1688
|
click.echo(FeedbackManager.warning(message=f"Failed to initialize local client: {e}"))
|
|
1669
1689
|
click.echo(FeedbackManager.warning(message="Continuing without local environment."))
|
|
@@ -2381,12 +2401,14 @@ def create_workspace_branch(
|
|
|
2381
2401
|
try:
|
|
2382
2402
|
workspace = get_current_workspace(config)
|
|
2383
2403
|
if not workspace:
|
|
2384
|
-
|
|
2404
|
+
from tinybird.tb.modules.feedback_manager import get_cli_name
|
|
2405
|
+
|
|
2406
|
+
raise CLIWorkspaceException(FeedbackManager.error_workspace(cli=get_cli_name()))
|
|
2385
2407
|
|
|
2386
2408
|
if not branch_name:
|
|
2387
2409
|
click.echo(FeedbackManager.info_workspace_branch_create_greeting())
|
|
2388
2410
|
default_name = f"{workspace['name']}_{uuid.uuid4().hex[0:4]}"
|
|
2389
|
-
branch_name = click.prompt("\
|
|
2411
|
+
branch_name = click.prompt("\nBranch name", default=default_name, err=True, type=str)
|
|
2390
2412
|
assert isinstance(branch_name, str)
|
|
2391
2413
|
|
|
2392
2414
|
response = config.get_client().create_workspace_branch(
|
|
@@ -36,7 +36,7 @@ from tinybird.tb.modules.create import (
|
|
|
36
36
|
generate_gcs_connection_file_with_secrets,
|
|
37
37
|
)
|
|
38
38
|
from tinybird.tb.modules.exceptions import CLIConnectionException
|
|
39
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
39
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
40
40
|
from tinybird.tb.modules.project import Project
|
|
41
41
|
from tinybird.tb.modules.secret import save_secret_to_env_file
|
|
42
42
|
|
|
@@ -311,7 +311,7 @@ def connection_create_kafka_cmd(
|
|
|
311
311
|
click.echo(FeedbackManager.info(message=error))
|
|
312
312
|
click.echo(
|
|
313
313
|
FeedbackManager.error(
|
|
314
|
-
message="✗ Build failed. Please fix the errors and run `
|
|
314
|
+
message=f"✗ Build failed. Please fix the errors and run `{get_cli_name()} connection data` to preview this connection."
|
|
315
315
|
)
|
|
316
316
|
)
|
|
317
317
|
return
|
|
@@ -360,7 +360,7 @@ def connection_data_cmd(
|
|
|
360
360
|
if not all_connections:
|
|
361
361
|
raise CLIConnectionException(
|
|
362
362
|
FeedbackManager.error(
|
|
363
|
-
message="No connections found. Create a connection first with `
|
|
363
|
+
message=f"No connections found. Create a connection first with `{get_cli_name()} connection create`."
|
|
364
364
|
)
|
|
365
365
|
)
|
|
366
366
|
|
|
@@ -18,7 +18,7 @@ from tinybird.tb.modules.common import (
|
|
|
18
18
|
)
|
|
19
19
|
from tinybird.tb.modules.create import generate_aws_iamrole_connection_file_with_secret
|
|
20
20
|
from tinybird.tb.modules.exceptions import CLIConnectionException
|
|
21
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
21
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
22
22
|
from tinybird.tb.modules.project import Project
|
|
23
23
|
from tinybird.tb.modules.secret import save_secret_to_env_file
|
|
24
24
|
|
|
@@ -320,7 +320,7 @@ def connection_create_s3(
|
|
|
320
320
|
if env == "local" and not client.check_aws_credentials():
|
|
321
321
|
click.echo(
|
|
322
322
|
FeedbackManager.warning(
|
|
323
|
-
message="No AWS credentials found. Please run `
|
|
323
|
+
message=f"No AWS credentials found. Please run `{get_cli_name()} local restart --use-aws-creds` to pass your credentials. "
|
|
324
324
|
"Read more about this in https://www.tinybird.co/docs/forward/get-data-in/connectors/s3#local-environment"
|
|
325
325
|
)
|
|
326
326
|
)
|
|
@@ -41,7 +41,7 @@ from tinybird.tb.modules.datafile.build_pipe import (
|
|
|
41
41
|
is_endpoint_with_no_dependencies,
|
|
42
42
|
is_materialized,
|
|
43
43
|
)
|
|
44
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
44
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
45
45
|
from tinybird.tb.modules.project import Project
|
|
46
46
|
|
|
47
47
|
|
|
@@ -839,7 +839,9 @@ def process_file(
|
|
|
839
839
|
]
|
|
840
840
|
|
|
841
841
|
if not all(required_params):
|
|
842
|
-
raise click.ClickException(
|
|
842
|
+
raise click.ClickException(
|
|
843
|
+
FeedbackManager.error_unknown_kafka_connection(datasource=name, cli=get_cli_name())
|
|
844
|
+
)
|
|
843
845
|
|
|
844
846
|
connector = tb_client.connection_create_kafka(**connector_params)
|
|
845
847
|
except Exception as e:
|
|
@@ -7,7 +7,7 @@ import click
|
|
|
7
7
|
|
|
8
8
|
from tinybird.datafile.common import PREVIEW_CONNECTOR_SERVICES, ImportReplacements
|
|
9
9
|
from tinybird.tb.client import DoesNotExistException, TinyB
|
|
10
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
10
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def new_ds(
|
|
@@ -324,7 +324,7 @@ def new_ds(
|
|
|
324
324
|
FeedbackManager.error_promoting_datasource(datasource=ds_name, error=promote_error_message)
|
|
325
325
|
)
|
|
326
326
|
else:
|
|
327
|
-
click.echo(FeedbackManager.warning_datasource_already_exists(datasource=ds_name))
|
|
327
|
+
click.echo(FeedbackManager.warning_datasource_already_exists(datasource=ds_name, cli=get_cli_name()))
|
|
328
328
|
|
|
329
329
|
|
|
330
330
|
def share_and_unshare_datasource(
|
|
@@ -43,7 +43,7 @@ from tinybird.tb.modules.datafile.build_pipe import (
|
|
|
43
43
|
is_materialized,
|
|
44
44
|
new_pipe,
|
|
45
45
|
)
|
|
46
|
-
from tinybird.tb.modules.feedback_manager import FeedbackManager
|
|
46
|
+
from tinybird.tb.modules.feedback_manager import FeedbackManager, get_cli_name
|
|
47
47
|
from tinybird.tb.modules.project import Project
|
|
48
48
|
|
|
49
49
|
|
|
@@ -998,7 +998,9 @@ def process_file(
|
|
|
998
998
|
]
|
|
999
999
|
|
|
1000
1000
|
if not all(required_params):
|
|
1001
|
-
raise click.ClickException(
|
|
1001
|
+
raise click.ClickException(
|
|
1002
|
+
FeedbackManager.error_unknown_kafka_connection(datasource=name, cli=get_cli_name())
|
|
1003
|
+
)
|
|
1002
1004
|
|
|
1003
1005
|
connector = tb_client.connection_create_kafka(**connector_params)
|
|
1004
1006
|
except Exception as e:
|