tinybird-cli 3.13.1.dev1__tar.gz → 4.0.1.dev0__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-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/PKG-INFO +14 -1
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/__cli__.py +2 -2
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/datafile.py +8 -79
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/feedback_manager.py +22 -19
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/branch.py +7 -1
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/cicd.py +2 -9
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/cli.py +60 -63
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/common.py +5 -15
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/pipe.py +0 -1
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/PKG-INFO +14 -1
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/setup.cfg +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/client.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/config.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/connectors.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/context.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/datatypes.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/git_settings.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/sql.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/sql_template.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/syncasync.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/token.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.1.dev0
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,19 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
4.0.0
|
|
22
|
+
************
|
|
23
|
+
|
|
24
|
+
This is a major release, please read the commands affected below and consider updating your scripts and workflow before upgrading to these version.
|
|
25
|
+
|
|
26
|
+
- `Deprecated` `--semver` flag and `tb release` commands are now deprecated. You can keep using `tb deploy` to integrate and deploy from git. Changes are deployed to the main Workspace instead of to a Release.
|
|
27
|
+
- `Removed` `--cicd` flag and CI/CD templates generation from `tb init`. You can still use the git integration, just create your own pipelines. You can use the ones in this repo as an exmple https://github.com/tinybirdco/ci
|
|
28
|
+
- `Removed` `tb env` command is removed, use `tb branch` instead.
|
|
29
|
+
- `Deprecated` .datasource files with `ENGINE "Join"` are deprecated, use `Engine "MergeeTree"` instead.
|
|
30
|
+
- `Deprecated` `tb materialize`
|
|
31
|
+
- `Removed` Drop the `--timeout` flag from `tb push` which made the populate job to timeout. You can use now `--wait` to wait for the job to finish or nothing to just create the job and return.
|
|
32
|
+
- `Removed` Support for `KEY` directive is removed. The `KEY` was used to create a Data Source with Join engine by the given `KEY` column name. Join engines are also deprecated, you can use a regular `MergeTree` Data Source instead and adapt the pipes SQL accordingly.
|
|
33
|
+
|
|
21
34
|
3.12.0
|
|
22
35
|
************
|
|
23
36
|
|
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/cli/introduction.html'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '4.0.1.dev0'
|
|
8
|
+
__revision__ = '2edda96'
|
|
@@ -706,7 +706,6 @@ class Datafile:
|
|
|
706
706
|
self.sources: List[str] = []
|
|
707
707
|
self.nodes: List[Dict[str, Any]] = []
|
|
708
708
|
self.tokens: List[Dict[str, Any]] = []
|
|
709
|
-
self.keys: List[Dict[str, Any]] = []
|
|
710
709
|
self.version: Optional[int] = None
|
|
711
710
|
self.description: Optional[str] = None
|
|
712
711
|
self.raw: Optional[List[str]] = None
|
|
@@ -967,11 +966,6 @@ def parse(
|
|
|
967
966
|
raise ParseException('TOKEN gets two params, token name and permissions e.g TOKEN "read api token" READ')
|
|
968
967
|
doc.tokens.append({"token_name": _unquote(args[0]), "permissions": args[1]})
|
|
969
968
|
|
|
970
|
-
def add_key(*args: str, **kwargs: Any) -> None: # token_name, permissions):
|
|
971
|
-
if len(args) < 1:
|
|
972
|
-
raise ParseException("KEY gets one params")
|
|
973
|
-
doc.keys.append({"column": _unquote(args[0])})
|
|
974
|
-
|
|
975
969
|
def test(*args: str, **kwargs: Any) -> None:
|
|
976
970
|
print("test", args, kwargs)
|
|
977
971
|
|
|
@@ -1083,7 +1077,6 @@ def parse(
|
|
|
1083
1077
|
"resource": assign_node_var("resource"),
|
|
1084
1078
|
"filter": assign_node_var("filter"),
|
|
1085
1079
|
"token": add_token,
|
|
1086
|
-
"key": add_key,
|
|
1087
1080
|
"test": test,
|
|
1088
1081
|
"include": include,
|
|
1089
1082
|
"sql": sql("sql"),
|
|
@@ -1194,46 +1187,6 @@ def parse(
|
|
|
1194
1187
|
return doc
|
|
1195
1188
|
|
|
1196
1189
|
|
|
1197
|
-
def generate_resource_for_key(key: str, name: str, schema: str, version: str, res_name: str) -> List[Dict[str, Any]]:
|
|
1198
|
-
resources: List[Dict[str, Any]] = []
|
|
1199
|
-
# datasource
|
|
1200
|
-
ds_name = f"{name}_join_by_{key}{version}"
|
|
1201
|
-
params = {
|
|
1202
|
-
"name": ds_name,
|
|
1203
|
-
"schema": schema,
|
|
1204
|
-
"engine": "Join",
|
|
1205
|
-
"engine_join_strictness": "ANY",
|
|
1206
|
-
"engine_join_type": "LEFT",
|
|
1207
|
-
"engine_key_columns": key,
|
|
1208
|
-
}
|
|
1209
|
-
resources.append(
|
|
1210
|
-
{
|
|
1211
|
-
"resource_name": f"{name}_join_by_{key}",
|
|
1212
|
-
"resource": "datasources",
|
|
1213
|
-
"params": params,
|
|
1214
|
-
"filename": f"{params['name']}.datasource",
|
|
1215
|
-
}
|
|
1216
|
-
)
|
|
1217
|
-
resources.append(
|
|
1218
|
-
{
|
|
1219
|
-
"resource_name": f"{name}_join_by_{key}_pipe",
|
|
1220
|
-
"resource": "pipes",
|
|
1221
|
-
"filename": f"{params['name']}.pipe",
|
|
1222
|
-
"name": f"{name}_join_by_{key}_pipe{version}",
|
|
1223
|
-
"schema": schema,
|
|
1224
|
-
"nodes": [
|
|
1225
|
-
{
|
|
1226
|
-
"sql": f"select * from {name}{version}",
|
|
1227
|
-
"params": {"name": f"{name}_join_by_{key}_view", "type": "materialized", "datasource": ds_name},
|
|
1228
|
-
}
|
|
1229
|
-
],
|
|
1230
|
-
"deps": [res_name], # [ds_name],
|
|
1231
|
-
"tokens": [],
|
|
1232
|
-
}
|
|
1233
|
-
)
|
|
1234
|
-
return resources
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
1190
|
async def process_file(
|
|
1238
1191
|
filename: str,
|
|
1239
1192
|
tb_client: TinyB,
|
|
@@ -1394,7 +1347,6 @@ async def process_file(
|
|
|
1394
1347
|
# the path was not relative, not inside workspace
|
|
1395
1348
|
pass
|
|
1396
1349
|
|
|
1397
|
-
res_name = name
|
|
1398
1350
|
version = f"__v{doc.version}" if doc.version is not None else ""
|
|
1399
1351
|
|
|
1400
1352
|
def append_version_to_name(name: str, version: str) -> str:
|
|
@@ -1505,21 +1457,12 @@ async def process_file(
|
|
|
1505
1457
|
"version": doc.version,
|
|
1506
1458
|
"params": params,
|
|
1507
1459
|
"filename": filename,
|
|
1508
|
-
"keys": doc.keys,
|
|
1509
1460
|
"deps": deps,
|
|
1510
1461
|
"tokens": doc.tokens,
|
|
1511
1462
|
"shared_with": doc.shared_with,
|
|
1512
1463
|
}
|
|
1513
1464
|
)
|
|
1514
1465
|
|
|
1515
|
-
# generate extra resources in case of the key
|
|
1516
|
-
if doc.keys:
|
|
1517
|
-
for k in doc.keys:
|
|
1518
|
-
resources += generate_resource_for_key(k["column"], name, params["schema"], version, res_name)
|
|
1519
|
-
# set derived resources version the same the parent
|
|
1520
|
-
for x in resources:
|
|
1521
|
-
x["version"] = doc.version
|
|
1522
|
-
|
|
1523
1466
|
return resources
|
|
1524
1467
|
|
|
1525
1468
|
elif DataFileExtensions.PIPE in filename:
|
|
@@ -1722,7 +1665,7 @@ def find_file_by_name(
|
|
|
1722
1665
|
if not is_raw:
|
|
1723
1666
|
f, raw = find_file_by_name(
|
|
1724
1667
|
folder,
|
|
1725
|
-
|
|
1668
|
+
name,
|
|
1726
1669
|
verbose=verbose,
|
|
1727
1670
|
is_raw=True,
|
|
1728
1671
|
workspace_lib_paths=workspace_lib_paths,
|
|
@@ -2610,7 +2553,6 @@ async def new_pipe(
|
|
|
2610
2553
|
skip_tokens: bool = False,
|
|
2611
2554
|
ignore_sql_errors: bool = False,
|
|
2612
2555
|
only_response_times: bool = False,
|
|
2613
|
-
timeout=None,
|
|
2614
2556
|
run_tests: bool = False,
|
|
2615
2557
|
as_standard: bool = False,
|
|
2616
2558
|
tests_to_run: int = 0,
|
|
@@ -2771,7 +2713,7 @@ async def new_pipe(
|
|
|
2771
2713
|
click.echo(FeedbackManager.info_populate_job_url(url=job_url))
|
|
2772
2714
|
|
|
2773
2715
|
if wait_populate:
|
|
2774
|
-
result = await wait_job(tb_client, job_id, job_url, "Populating"
|
|
2716
|
+
result = await wait_job(tb_client, job_id, job_url, "Populating")
|
|
2775
2717
|
click.echo(FeedbackManager.info_populate_job_result(result=result))
|
|
2776
2718
|
else:
|
|
2777
2719
|
if data.get("type") == "default" and not skip_tokens and not as_standard and not copy_node and not sink_node:
|
|
@@ -2969,6 +2911,12 @@ async def new_ds(
|
|
|
2969
2911
|
except DoesNotExistException:
|
|
2970
2912
|
datasource_exists = False
|
|
2971
2913
|
|
|
2914
|
+
if ds["params"].get("engine", "").lower() == "join":
|
|
2915
|
+
deprecation_notice = FeedbackManager.warning_deprecated(
|
|
2916
|
+
warning="Data Sources with Join engine are deprecated and will be removed in the next major release of tinybird-cli. Use MergeTree instead."
|
|
2917
|
+
)
|
|
2918
|
+
click.echo(deprecation_notice)
|
|
2919
|
+
|
|
2972
2920
|
if not datasource_exists or fork_downstream or fork:
|
|
2973
2921
|
params = ds["params"]
|
|
2974
2922
|
params["branch_mode"] = "fork" if fork_downstream or fork else "None"
|
|
@@ -3255,7 +3203,6 @@ async def exec_file(
|
|
|
3255
3203
|
ignore_sql_errors: bool = False,
|
|
3256
3204
|
skip_confirmation: bool = False,
|
|
3257
3205
|
only_response_times: bool = False,
|
|
3258
|
-
timeout=None,
|
|
3259
3206
|
run_tests=False,
|
|
3260
3207
|
as_standard=False,
|
|
3261
3208
|
tests_to_run: int = 0,
|
|
@@ -3285,7 +3232,6 @@ async def exec_file(
|
|
|
3285
3232
|
wait_populate,
|
|
3286
3233
|
ignore_sql_errors=ignore_sql_errors,
|
|
3287
3234
|
only_response_times=only_response_times,
|
|
3288
|
-
timeout=timeout,
|
|
3289
3235
|
run_tests=run_tests,
|
|
3290
3236
|
as_standard=as_standard,
|
|
3291
3237
|
tests_to_run=tests_to_run,
|
|
@@ -3417,21 +3363,6 @@ def get_remote_resource_name_without_version(remote_resource_name: str) -> str:
|
|
|
3417
3363
|
return parts["name"]
|
|
3418
3364
|
|
|
3419
3365
|
|
|
3420
|
-
def get_dep_from_raw_tables(x: str) -> str:
|
|
3421
|
-
"""
|
|
3422
|
-
datasources KEY command generates tables, this transform the used table with the source file
|
|
3423
|
-
>>> get_dep_from_raw_tables('test')
|
|
3424
|
-
'test'
|
|
3425
|
-
>>> get_dep_from_raw_tables('test_join_by_column')
|
|
3426
|
-
'test'
|
|
3427
|
-
"""
|
|
3428
|
-
|
|
3429
|
-
try:
|
|
3430
|
-
return x[: x.index("_join_by_")]
|
|
3431
|
-
except ValueError:
|
|
3432
|
-
return x
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
3366
|
def create_downstream_dependency_graph(dependency_graph: Dict[str, Set[str]], all_resources: Dict[str, Dict[str, Any]]):
|
|
3436
3367
|
"""
|
|
3437
3368
|
This function reverses the dependency graph obtained from build_graph so you have downstream dependencies for each node in the graph.
|
|
@@ -3869,7 +3800,6 @@ async def folder_push(
|
|
|
3869
3800
|
workspace_map=None,
|
|
3870
3801
|
workspace_lib_paths=None,
|
|
3871
3802
|
no_versions: bool = False,
|
|
3872
|
-
timeout=None,
|
|
3873
3803
|
run_tests: bool = False,
|
|
3874
3804
|
as_standard: bool = False,
|
|
3875
3805
|
raise_on_exists: bool = False,
|
|
@@ -4058,7 +3988,6 @@ async def folder_push(
|
|
|
4058
3988
|
ignore_sql_errors,
|
|
4059
3989
|
skip_confirmation,
|
|
4060
3990
|
only_response_times,
|
|
4061
|
-
timeout,
|
|
4062
3991
|
run_tests,
|
|
4063
3992
|
as_standard,
|
|
4064
3993
|
tests_to_run,
|
|
@@ -293,15 +293,15 @@ class FeedbackManager:
|
|
|
293
293
|
error_head_outdated = error_message(
|
|
294
294
|
"Current HEAD commit '{commit}' is outdated.\n\n 💡Hint: consider to rebase your Git branch with base branch."
|
|
295
295
|
)
|
|
296
|
-
error_head_already_released = error_message("Current HEAD commit '{commit}' is already
|
|
296
|
+
error_head_already_released = error_message("Current HEAD commit '{commit}' is already deployed")
|
|
297
297
|
error_in_git_ancestor_commits = error_message(
|
|
298
298
|
"Error checking relationship between HEAD '{head_commit}' and Workspace commit '{workspace_commit}'.\n\n Current Workspace commit needs to be an ancestor of the commit being deployed.\n\n 💡 Hint: consider to rebase your Git branch. If the problem persists, double check the Workspace commit exists in the git log, if it does not exist you can override the Workspace commit to an ancestor of the commit being deployed using `tb init --override-commit <commit>`"
|
|
299
299
|
)
|
|
300
300
|
error_init_release = error_message(
|
|
301
|
-
"No release on Workspace '{workspace}'. Hint: use 'tb init --git' to start working with git
|
|
301
|
+
"No release on Workspace '{workspace}'. Hint: use 'tb init --git' to start working with git"
|
|
302
302
|
)
|
|
303
303
|
error_branch_init_release = error_message(
|
|
304
|
-
"Branch '{workspace}' not ready for deploy. Hint: use 'tb init --git' to start working with git
|
|
304
|
+
"Branch '{workspace}' not ready for deploy. Hint: use 'tb init --git' to start working with git and assure Branch is completely created using '--wait' on 'tb branch create'"
|
|
305
305
|
)
|
|
306
306
|
error_commit_changes_to_init_release = error_message(
|
|
307
307
|
"Data project has changes: 'git status -s {path}'\n\n{git_output} \n\n You need to commit your changes in the data project, then re-run 'tb init --git' to finish git initialization."
|
|
@@ -318,7 +318,7 @@ class FeedbackManager:
|
|
|
318
318
|
)
|
|
319
319
|
error_token_does_not_exist = error_message("Token '{token_id}' does not exist")
|
|
320
320
|
error_no_correct_token_for_init = error_message(
|
|
321
|
-
"No access to git
|
|
321
|
+
"No access to git. Use a Workspace admin token. See https://www.tinybird.co/docs/production/working-with-version-control.html"
|
|
322
322
|
)
|
|
323
323
|
error_diff_resources_for_git_init = error_message(
|
|
324
324
|
"Error initializing Git, there are diffs between local Data Project and Workspace '{workspace}'.\nHint: Execute '{pull_command}' to download Datafiles"
|
|
@@ -326,7 +326,7 @@ class FeedbackManager:
|
|
|
326
326
|
error_remove_oldest_rollback = error_message(
|
|
327
327
|
"Removal of oldest rollback Release failed with error: {error}. Release {semver} is in preview status and has not been promoted, remove the rollback Release and promote to finish the deployment."
|
|
328
328
|
)
|
|
329
|
-
error_release_already_set = error_message("Can't init '{workspace}', it has already a
|
|
329
|
+
error_release_already_set = error_message("Can't init '{workspace}', it has already a commit '{commit}'")
|
|
330
330
|
error_release_rm_param = error_message("One of --semver <semver> or --oldest-rollback are required.")
|
|
331
331
|
error_release_rollback_live_not_found = error_message("Live Release not found. Rollback can't be applied")
|
|
332
332
|
error_git_provider_index = error_message(
|
|
@@ -341,11 +341,11 @@ class FeedbackManager:
|
|
|
341
341
|
"Materialized view {pipe} has the datasource definition in the same file as the SQL transformation. This is no longer supported while using Versions. Please, split the datasource definition into a separate file."
|
|
342
342
|
)
|
|
343
343
|
error_check_backfill_required = error_message(
|
|
344
|
-
"Not safe to deploy to live resource '{resource_name}', backfill might be required. Consider deploying to preview bumping SemVer to major or disabling 'TB_AUTO_PROMOTE'. In case you want to disable this check use 'TB_CHECK_BACKFILL_REQUIRED=0'. For more information about the deployment process, please visit https://www.tinybird.co/docs/
|
|
344
|
+
"Not safe to deploy to live resource '{resource_name}', backfill might be required. Consider deploying to preview bumping SemVer to major or disabling 'TB_AUTO_PROMOTE'. In case you want to disable this check use 'TB_CHECK_BACKFILL_REQUIRED=0'. For more information about the deployment process, please visit https://www.tinybird.co/docs/production/deployment-strategies"
|
|
345
345
|
)
|
|
346
346
|
|
|
347
347
|
error_connector_require_post_release = error_message(
|
|
348
|
-
"{connector} Data sources require a post-release deployment. Increment the post-release number of the semver (for example: 0.0.1 -> 0.0.1-1) to do so. You can read more about post-releases at https://www.tinybird.co/docs/
|
|
348
|
+
"{connector} Data sources require a post-release deployment. Increment the post-release number of the semver (for example: 0.0.1 -> 0.0.1-1) to do so. You can read more about post-releases at https://www.tinybird.co/docs/production/deployment-strategies"
|
|
349
349
|
)
|
|
350
350
|
|
|
351
351
|
info_incl_relative_path = info_message("** Relative path {path} does not exist, skipping.")
|
|
@@ -419,7 +419,7 @@ Ready? """
|
|
|
419
419
|
)
|
|
420
420
|
prompt_init_cicd = prompt_message("\n Do you want to generate CI/CD config files?")
|
|
421
421
|
prompt_init_git_release_force = prompt_message(
|
|
422
|
-
"You are going to manually update workspace
|
|
422
|
+
"You are going to manually update workspace commit reference manually, this is just for special occasions. Do you want to update current commit reference '{current_commit}' to '{new_commit}'?"
|
|
423
423
|
)
|
|
424
424
|
|
|
425
425
|
warning_no_test_results = warning_message("Warning: No test results to show")
|
|
@@ -462,6 +462,9 @@ Ready? """
|
|
|
462
462
|
"Auth found for {connector} connector but it's not properly installed. Please run `pip install tinybird-cli[{connector}]` to use it"
|
|
463
463
|
)
|
|
464
464
|
warning_deprecated = warning_message("** 🚨🚨🚨 [DEPRECATED]: {warning}")
|
|
465
|
+
warning_deprecated_releases = warning_message(
|
|
466
|
+
"** 🚨🚨🚨 [DEPRECATED]: --semver and Releases are deprecated. You can keep using `tb deploy` to deploy the changed resources from a git commit to the main Workspace and any other command without the --semver flag."
|
|
467
|
+
)
|
|
465
468
|
warning_token_pipe = warning_message("** There's no read token for pipe {pipe}")
|
|
466
469
|
warning_file_not_found_inside = warning_message(
|
|
467
470
|
"** Warning: {name} not found inside: \n - {folder}\n - {folder}/datasources\n - {folder}/endpoints"
|
|
@@ -657,7 +660,7 @@ Ready? """
|
|
|
657
660
|
info_ask_for_datasource_confirmation = info_message("** Please type the Data Source name to be replaced")
|
|
658
661
|
info_datasource_doesnt_match = info_message("** The description or schema of '{datasource}' has changed.")
|
|
659
662
|
info_custom_deployment = info_message(
|
|
660
|
-
"** 🚨 Warning 🚨: The changes in the branch require the `--yes` flag to the `tb deploy` command to overwrite resources. Run `tb release generate --semver <semver> to generate a custom deployment and include the `--yes` flag. Read more about custom deployments => https://www.tinybird.co/docs/
|
|
663
|
+
"** 🚨 Warning 🚨: The changes in the branch require the `--yes` flag to the `tb deploy` command to overwrite resources. Run `tb release generate --semver <semver> to generate a custom deployment and include the `--yes` flag. Read more about custom deployments => https://www.tinybird.co/docs/production/deployment-strategies.html#customizing-deployments"
|
|
661
664
|
)
|
|
662
665
|
info_ask_for_alter_confirmation = info_message("** Please confirm you want to apply the changes above y/N")
|
|
663
666
|
info_available_regions = info_message("** List of available regions:")
|
|
@@ -681,20 +684,20 @@ Ready? """
|
|
|
681
684
|
info_workspace_branch_create_greeting = info_message(
|
|
682
685
|
"Please enter the name for your new Branch. Remember the name you choose must be unique, you can add a suffix in case of collision.\nYou can bypass this step by supplying a value for the --name option."
|
|
683
686
|
)
|
|
684
|
-
info_no_git_release_yet = info_message("\n** Initializing
|
|
687
|
+
info_no_git_release_yet = info_message("\n** Initializing based on git for Workspace '{workspace}'")
|
|
685
688
|
info_diff_resources_for_git_init = info_message(
|
|
686
689
|
"** Checking diffs between remote Workspace and local. Hint: use 'tb diff' to check if your Data Project and Workspace synced"
|
|
687
690
|
)
|
|
688
691
|
info_cicd_file_generated = info_message("** File {file_path} generated for CI/CD")
|
|
689
692
|
info_available_git_providers = info_message("** List of available providers:")
|
|
690
693
|
info_git_release_init_without_diffs = info_message("** No diffs detected for '{workspace}'")
|
|
691
|
-
info_deployment_detecting_changes_header = info_message("\n** Detecting changes from last
|
|
692
|
-
info_deployment_preparing_release_header = info_message("\n** Preparing
|
|
693
|
-
info_deployment_deploying_release_dry_run_header = info_message("\n** [DRY RUN] Deploying
|
|
694
|
-
info_deployment_deploying_release_header = info_message("\n** Deploying
|
|
694
|
+
info_deployment_detecting_changes_header = info_message("\n** Detecting changes from last commit ...")
|
|
695
|
+
info_deployment_preparing_release_header = info_message("\n** Preparing commit ...")
|
|
696
|
+
info_deployment_deploying_release_dry_run_header = info_message("\n** [DRY RUN] Deploying commit ...")
|
|
697
|
+
info_deployment_deploying_release_header = info_message("\n** Deploying commit ...")
|
|
695
698
|
info_deployment_deploy_deps = info_message("** Deploying downstream dependent pipes ...")
|
|
696
699
|
info_git_release_diffs = info_message(
|
|
697
|
-
"** Diffs from current
|
|
700
|
+
"** Diffs from current commit '{current_release_commit}' and new '{new_release_commit}':"
|
|
698
701
|
)
|
|
699
702
|
info_git_release_diff = info_message("\t{change_type}:\t{datafile_changed}")
|
|
700
703
|
info_git_release_no_diffs = info_message("\tno diffs detected")
|
|
@@ -713,7 +716,7 @@ Ready? """
|
|
|
713
716
|
"** Skipping `SHARED_WITH` entry as the flag --user_token was not used"
|
|
714
717
|
)
|
|
715
718
|
info_generate_cicd_config = info_message(
|
|
716
|
-
"** {provider} CI/CD config files generated. Read this guide to learn how to run CI/CD pipelines: https://www.tinybird.co/docs/
|
|
719
|
+
"** {provider} CI/CD config files generated. Read this guide to learn how to run CI/CD pipelines: https://www.tinybird.co/docs/production/continuous-integration.html"
|
|
717
720
|
)
|
|
718
721
|
info_release_no_rollback = info_message("** No action")
|
|
719
722
|
info_no_release_deleted = info_message(" ** No Release deleted")
|
|
@@ -886,10 +889,10 @@ Ready? """
|
|
|
886
889
|
|
|
887
890
|
success_test_added = success_message("** Test added successfully")
|
|
888
891
|
success_remember_api_host = success_message("** Remember to use {api_host} in all your API calls.")
|
|
889
|
-
success_git_release = success_message("** New
|
|
890
|
-
success_dry_git_release = success_message("** [DRY RUN] New
|
|
892
|
+
success_git_release = success_message("** New commit deployed: '{release_commit}'")
|
|
893
|
+
success_dry_git_release = success_message("** [DRY RUN] New commit deployed: '{release_commit}'")
|
|
891
894
|
success_init_git_release = success_message(
|
|
892
|
-
"** Workspace '{workspace_name}'
|
|
895
|
+
"** Workspace '{workspace_name}' initialized to commit '{release_commit}'.\n Now start working with git, pushing changes to pull requests and let the CI/CD work for you. More details in this guide: https://www.tinybird.co/docs/production/working-with-version-control.html."
|
|
893
896
|
)
|
|
894
897
|
success_release_update = success_message("** Live Release {semver} updated to {new_semver}")
|
|
895
898
|
success_dry_release_update = success_message("** [DRY RUN] Live Release {semver} updated to {new_semver}")
|
|
@@ -47,7 +47,7 @@ def release() -> None:
|
|
|
47
47
|
@coro
|
|
48
48
|
async def release_ls() -> None:
|
|
49
49
|
"""List current available Releases in the Workspace"""
|
|
50
|
-
|
|
50
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
51
51
|
config = CLIConfig.get_project_config()
|
|
52
52
|
_ = await try_update_config_with_remote(config, only_if_needed=True)
|
|
53
53
|
|
|
@@ -78,6 +78,7 @@ async def print_releases(config: CLIConfig):
|
|
|
78
78
|
)
|
|
79
79
|
@coro
|
|
80
80
|
async def release_generate(semver: str) -> None:
|
|
81
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
81
82
|
if os.path.exists(".tinyenv"):
|
|
82
83
|
with open(".tinyenv", "r") as env_file:
|
|
83
84
|
lines = env_file.readlines()
|
|
@@ -137,6 +138,7 @@ set -euxo pipefail
|
|
|
137
138
|
)
|
|
138
139
|
@coro
|
|
139
140
|
async def release_create(semver: str) -> None:
|
|
141
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
140
142
|
config = CLIConfig.get_project_config()
|
|
141
143
|
_ = await try_update_config_with_remote(config, only_if_needed=True)
|
|
142
144
|
|
|
@@ -154,6 +156,7 @@ async def release_promote(semver: str) -> None:
|
|
|
154
156
|
"""
|
|
155
157
|
The oldest rollback Release will be automatically removed if no usage, otherwise export TB_FORCE_REMOVE_OLDEST_ROLLBACK="1" to force deletion
|
|
156
158
|
"""
|
|
159
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
157
160
|
config = CLIConfig.get_project_config()
|
|
158
161
|
_ = await try_update_config_with_remote(config, only_if_needed=True)
|
|
159
162
|
|
|
@@ -179,6 +182,7 @@ async def release_promote(semver: str) -> None:
|
|
|
179
182
|
)
|
|
180
183
|
@coro
|
|
181
184
|
async def release_preview(semver: str) -> None:
|
|
185
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
182
186
|
config = CLIConfig.get_project_config()
|
|
183
187
|
_ = await try_update_config_with_remote(config, only_if_needed=True)
|
|
184
188
|
|
|
@@ -195,6 +199,7 @@ async def release_preview(semver: str) -> None:
|
|
|
195
199
|
@click.option("--yes", is_flag=True, default=False, help="Do not ask for confirmation")
|
|
196
200
|
@coro
|
|
197
201
|
async def release_rollback(yes: bool) -> None:
|
|
202
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
198
203
|
config = CLIConfig.get_project_config()
|
|
199
204
|
_ = await try_update_config_with_remote(config, only_if_needed=False)
|
|
200
205
|
|
|
@@ -238,6 +243,7 @@ async def release_rollback(yes: bool) -> None:
|
|
|
238
243
|
)
|
|
239
244
|
@coro
|
|
240
245
|
async def release_rm(semver: str, oldest_rollback: bool, force: bool, yes: bool, dry_run: bool) -> None:
|
|
246
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
241
247
|
if (not semver and not oldest_rollback) or (semver and oldest_rollback):
|
|
242
248
|
raise CLIException(FeedbackManager.error_release_rm_param())
|
|
243
249
|
|
|
@@ -209,15 +209,10 @@ EXEC_TEST_SH = """
|
|
|
209
209
|
set -euxo pipefail
|
|
210
210
|
|
|
211
211
|
export TB_VERSION_WARNING=0
|
|
212
|
-
export VERSION=$1
|
|
213
212
|
|
|
214
213
|
run_test() {
|
|
215
214
|
t=$1
|
|
216
215
|
echo "** Running $t **"
|
|
217
|
-
# Check if VERSION is provided
|
|
218
|
-
if [[ -n $VERSION ]]; then
|
|
219
|
-
sed -i "s/tb/tb --semver $VERSION/" $t
|
|
220
|
-
fi
|
|
221
216
|
echo "** $(cat $t)"
|
|
222
217
|
tmpfile=$(mktemp)
|
|
223
218
|
retries=0
|
|
@@ -262,7 +257,7 @@ run_test() {
|
|
|
262
257
|
export -f run_test
|
|
263
258
|
|
|
264
259
|
fail=0
|
|
265
|
-
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {}
|
|
260
|
+
find ./tests -name "*.test" -print0 | xargs -0 -I {} -P 4 bash -c 'run_test "$@"' _ {} || fail=1
|
|
266
261
|
|
|
267
262
|
if [ $fail == 1 ]; then
|
|
268
263
|
exit -1;
|
|
@@ -273,8 +268,6 @@ APPEND_FIXTURES_SH = """
|
|
|
273
268
|
#!/usr/bin/env bash
|
|
274
269
|
set -euxo pipefail
|
|
275
270
|
|
|
276
|
-
VERSION=$1
|
|
277
|
-
|
|
278
271
|
directory="datasources/fixtures"
|
|
279
272
|
extensions=("csv" "ndjson")
|
|
280
273
|
|
|
@@ -287,7 +280,7 @@ for extension in "${extensions[@]}"; do
|
|
|
287
280
|
file_name=$(basename "$file_path")
|
|
288
281
|
file_name_without_extension="${file_name%.*}"
|
|
289
282
|
|
|
290
|
-
command="tb
|
|
283
|
+
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
|
|
291
284
|
echo $command
|
|
292
285
|
$command
|
|
293
286
|
done
|
|
@@ -90,7 +90,7 @@ DEFAULT_PATTERNS: List[Tuple[str, Union[str, Callable[[str], str]]]] = [
|
|
|
90
90
|
)
|
|
91
91
|
@click.option("--token", help="Use auth token, defaults to TB_TOKEN envvar, then to the .tinyb file")
|
|
92
92
|
@click.option("--host", help="Use custom host, defaults to TB_HOST envvar, then to https://api.tinybird.co")
|
|
93
|
-
@click.option("--semver", help="Semver of a Release to run the command. Example: 1.0.0")
|
|
93
|
+
@click.option("--semver", help="Semver of a Release to run the command. Example: 1.0.0", hidden=True)
|
|
94
94
|
@click.option("--gcp-project-id", help="The Google Cloud project ID", hidden=True)
|
|
95
95
|
@click.option(
|
|
96
96
|
"--gcs-bucket", help="The Google Cloud Storage bucket to write temp files when using the connectors", hidden=True
|
|
@@ -296,10 +296,7 @@ async def cli(
|
|
|
296
296
|
help="Use this option to manually override the reference commit of your workspace. This is useful if a commit is not recognized in your git log, such as after a force push (git push -f).",
|
|
297
297
|
)
|
|
298
298
|
@click.option(
|
|
299
|
-
"--cicd",
|
|
300
|
-
is_flag=True,
|
|
301
|
-
default=False,
|
|
302
|
-
help="Generates only CI/CD files for your git provider",
|
|
299
|
+
"--cicd", is_flag=True, default=False, help="Generates only CI/CD files for your git provider", hidden=True
|
|
303
300
|
)
|
|
304
301
|
@click.pass_context
|
|
305
302
|
@coro
|
|
@@ -437,7 +434,7 @@ async def init(
|
|
|
437
434
|
else:
|
|
438
435
|
click.echo(FeedbackManager.info_cicd_already_exists(provider=cicd_provider.name))
|
|
439
436
|
else:
|
|
440
|
-
if cicd
|
|
437
|
+
if cicd:
|
|
441
438
|
data_project_dir = os.path.relpath(folder, cli_git_release.working_dir())
|
|
442
439
|
await init_cicd(
|
|
443
440
|
client, current_ws, config, path=cli_git_release.working_dir(), data_project_dir=data_project_dir
|
|
@@ -567,7 +564,6 @@ def check(filenames: List[str], debug: bool) -> None:
|
|
|
567
564
|
default=False,
|
|
568
565
|
help="when set, resource dependency versions are not used, it pushes the dependencies as-is",
|
|
569
566
|
)
|
|
570
|
-
@click.option("--timeout", type=float, default=None, help="timeout you want to use for the job populate")
|
|
571
567
|
@click.option(
|
|
572
568
|
"-l", "--limit", type=click.IntRange(0, 100), default=0, required=False, help="Number of requests to validate"
|
|
573
569
|
)
|
|
@@ -634,7 +630,6 @@ async def push(
|
|
|
634
630
|
workspace_map,
|
|
635
631
|
workspace,
|
|
636
632
|
no_versions: bool,
|
|
637
|
-
timeout: Optional[float],
|
|
638
633
|
limit: int,
|
|
639
634
|
sample_by_params: int,
|
|
640
635
|
failfast: bool,
|
|
@@ -673,7 +668,6 @@ async def push(
|
|
|
673
668
|
workspace_map=dict(workspace_map),
|
|
674
669
|
workspace_lib_paths=workspace,
|
|
675
670
|
no_versions=no_versions,
|
|
676
|
-
timeout=timeout,
|
|
677
671
|
run_tests=False,
|
|
678
672
|
tests_to_run=limit,
|
|
679
673
|
tests_sample_by_params=sample_by_params,
|
|
@@ -1068,13 +1062,10 @@ async def materialize(
|
|
|
1068
1062
|
override_datasource: bool,
|
|
1069
1063
|
target_datasource: Optional[str] = None,
|
|
1070
1064
|
) -> None:
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
Syntax: tb materialize path/to/pipe.pipe
|
|
1076
|
-
"""
|
|
1077
|
-
|
|
1065
|
+
deprecation_notice = FeedbackManager.warning_deprecated(
|
|
1066
|
+
warning="'tb materialize' is deprecated. To create a Materialized View in a guided way you can use the UI: `Create Pipe` and use the `Create Materialized View` wizard. Finally download the resulting `.pipe` and `.datasource` files."
|
|
1067
|
+
)
|
|
1068
|
+
click.echo(deprecation_notice)
|
|
1078
1069
|
cl = create_tb_client(ctx)
|
|
1079
1070
|
|
|
1080
1071
|
async def _try_push_pipe_to_analyze(pipe_name):
|
|
@@ -1402,7 +1393,6 @@ async def prompt(_ctx: Context) -> None:
|
|
|
1402
1393
|
multiple=True,
|
|
1403
1394
|
help="add a workspace path to the list of external workspaces, usage: --workspace name path/to/folder",
|
|
1404
1395
|
)
|
|
1405
|
-
@click.option("--timeout", type=float, default=None, help="timeout you want to use for the job populate")
|
|
1406
1396
|
@click.option(
|
|
1407
1397
|
"--folder",
|
|
1408
1398
|
default=".",
|
|
@@ -1454,28 +1444,15 @@ async def deploy(
|
|
|
1454
1444
|
yes: bool,
|
|
1455
1445
|
workspace_map,
|
|
1456
1446
|
workspace,
|
|
1457
|
-
timeout: Optional[float],
|
|
1458
1447
|
folder: str,
|
|
1459
1448
|
user_token: Optional[str],
|
|
1460
1449
|
fork_downstream: bool,
|
|
1461
1450
|
fork: bool,
|
|
1462
1451
|
use_main: bool,
|
|
1463
1452
|
) -> None:
|
|
1464
|
-
"""Deploy in Tinybird pushing resources changed from
|
|
1465
|
-
|
|
1466
|
-
Usage: tb --semver <semver> deploy
|
|
1467
|
-
|
|
1468
|
-
Semantic versioning logic is as follows:
|
|
1469
|
-
|
|
1470
|
-
--semver <semver> format is major.minor.patch-post where major, minor, patch and post are integer numbers
|
|
1453
|
+
"""Deploy in Tinybird pushing resources changed from last git commit deployed.
|
|
1471
1454
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
- bump patch or minor to deploy a new Release and auto-promote it to live. Add TB_AUTO_PROMOTE=0 to create the Release in preview status
|
|
1475
|
-
|
|
1476
|
-
- bump major to deploy a new Release in preview status
|
|
1477
|
-
|
|
1478
|
-
When auto-promote the oldest rollback Release will be automatically removed if no usage, otherwise export TB_FORCE_REMOVE_OLDEST_ROLLBACK="1" to force deletion
|
|
1455
|
+
Usage: tb deploy
|
|
1479
1456
|
"""
|
|
1480
1457
|
try:
|
|
1481
1458
|
ignore_sql_errors = FeatureFlags.ignore_sql_errors()
|
|
@@ -1504,51 +1481,70 @@ async def deploy(
|
|
|
1504
1481
|
release_created = False
|
|
1505
1482
|
new_release = False
|
|
1506
1483
|
check_backfill_required = False
|
|
1484
|
+
|
|
1485
|
+
# semver is now optional, if not sent force the bump
|
|
1486
|
+
if not semver:
|
|
1487
|
+
semver = current_semver
|
|
1488
|
+
else:
|
|
1489
|
+
click.echo(FeedbackManager.warning_deprecated_releases())
|
|
1490
|
+
|
|
1507
1491
|
if semver and current_semver:
|
|
1508
1492
|
new_version = version.parse(semver.split("-snapshot")[0])
|
|
1509
1493
|
current_version = version.parse(current_semver.split("-snapshot")[0])
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
FeedbackManager.info_dry_releases_detected(current_semver=current_version, semver=new_version)
|
|
1513
|
-
)
|
|
1514
|
-
else:
|
|
1515
|
-
click.echo(FeedbackManager.info_releases_detected(current_semver=current_version, semver=new_version))
|
|
1516
|
-
if new_version <= current_version:
|
|
1517
|
-
click.echo(FeedbackManager.error_bump_release(command="deploy [OPTIONS]"))
|
|
1518
|
-
sys.exit(1)
|
|
1519
|
-
|
|
1520
|
-
if is_post_semver(new_version, current_version):
|
|
1494
|
+
show_feedback = new_version != current_version
|
|
1495
|
+
if show_feedback:
|
|
1521
1496
|
if dry_run:
|
|
1522
|
-
click.echo(
|
|
1497
|
+
click.echo(
|
|
1498
|
+
FeedbackManager.info_dry_releases_detected(current_semver=current_version, semver=new_version)
|
|
1499
|
+
)
|
|
1500
|
+
else:
|
|
1501
|
+
click.echo(
|
|
1502
|
+
FeedbackManager.info_releases_detected(current_semver=current_version, semver=new_version)
|
|
1503
|
+
)
|
|
1504
|
+
|
|
1505
|
+
if new_version == current_version:
|
|
1506
|
+
if current_version.post is None:
|
|
1507
|
+
semver = str(current_version) + "-1"
|
|
1508
|
+
new_version = version.Version(semver)
|
|
1523
1509
|
else:
|
|
1524
|
-
|
|
1510
|
+
semver = f"{current_version.major}.{current_version.minor}.{current_version.micro}-{current_version.post + 1}"
|
|
1511
|
+
new_version = version.Version(semver)
|
|
1512
|
+
|
|
1513
|
+
if is_post_semver(new_version, current_version):
|
|
1514
|
+
if show_feedback:
|
|
1515
|
+
if dry_run:
|
|
1516
|
+
click.echo(FeedbackManager.info_dry_local_release(version=new_version))
|
|
1517
|
+
else:
|
|
1518
|
+
click.echo(FeedbackManager.info_local_release(version=new_version))
|
|
1525
1519
|
yes = True
|
|
1526
1520
|
auto_promote = False
|
|
1527
1521
|
new_release = False
|
|
1528
1522
|
elif is_major_semver(new_version, current_version):
|
|
1529
|
-
if
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1523
|
+
if show_feedback:
|
|
1524
|
+
if dry_run:
|
|
1525
|
+
click.echo(FeedbackManager.info_dry_major_release(version=new_version))
|
|
1526
|
+
else:
|
|
1527
|
+
click.echo(FeedbackManager.info_major_release(version=new_version))
|
|
1533
1528
|
auto_promote = False
|
|
1534
1529
|
new_release = True
|
|
1535
1530
|
else:
|
|
1536
1531
|
# allows TB_AUTO_PROMOTE=0 so release is left in preview
|
|
1537
1532
|
auto_promote = getenv_bool("TB_AUTO_PROMOTE", True)
|
|
1538
1533
|
if auto_promote:
|
|
1539
|
-
if
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1534
|
+
if show_feedback:
|
|
1535
|
+
if dry_run:
|
|
1536
|
+
click.echo(
|
|
1537
|
+
FeedbackManager.info_dry_minor_patch_release_with_autopromote(version=new_version)
|
|
1538
|
+
)
|
|
1539
|
+
else:
|
|
1540
|
+
click.echo(FeedbackManager.info_minor_patch_release_with_autopromote(version=new_version))
|
|
1543
1541
|
else:
|
|
1544
|
-
if
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1542
|
+
if show_feedback:
|
|
1543
|
+
if dry_run:
|
|
1544
|
+
click.echo(FeedbackManager.info_dry_minor_patch_release_no_autopromote(version=new_version))
|
|
1545
|
+
else:
|
|
1546
|
+
click.echo(FeedbackManager.info_minor_patch_release_no_autopromote(version=new_version))
|
|
1548
1547
|
new_release = True
|
|
1549
|
-
else:
|
|
1550
|
-
click.echo(FeedbackManager.error_bump_release(command="deploy [OPTIONS]"))
|
|
1551
|
-
sys.exit(1)
|
|
1552
1548
|
|
|
1553
1549
|
if new_release:
|
|
1554
1550
|
if not dry_run:
|
|
@@ -1584,7 +1580,6 @@ async def deploy(
|
|
|
1584
1580
|
skip_confirmation=yes,
|
|
1585
1581
|
workspace_map=dict(workspace_map),
|
|
1586
1582
|
workspace_lib_paths=workspace,
|
|
1587
|
-
timeout=timeout,
|
|
1588
1583
|
run_tests=False,
|
|
1589
1584
|
folder=folder,
|
|
1590
1585
|
config=ctx.ensure_object(dict)["config"],
|
|
@@ -1636,10 +1631,12 @@ async def deploy(
|
|
|
1636
1631
|
|
|
1637
1632
|
if not new_release:
|
|
1638
1633
|
if dry_run:
|
|
1639
|
-
|
|
1634
|
+
if show_feedback:
|
|
1635
|
+
click.echo(FeedbackManager.success_dry_release_update(semver=current_semver, new_semver=semver))
|
|
1640
1636
|
else:
|
|
1641
1637
|
client.semver = None
|
|
1642
1638
|
await client.update_release_semver(config["id"], current_semver, semver)
|
|
1643
|
-
|
|
1639
|
+
if show_feedback:
|
|
1640
|
+
click.echo(FeedbackManager.success_release_update(semver=current_semver, new_semver=semver))
|
|
1644
1641
|
except Exception as e:
|
|
1645
1642
|
raise CLIException(str(e))
|
|
@@ -233,14 +233,6 @@ class AliasedGroup(click.Group):
|
|
|
233
233
|
if cm is not None:
|
|
234
234
|
return cm
|
|
235
235
|
|
|
236
|
-
if cmd_name == "env":
|
|
237
|
-
deprecation_notice = FeedbackManager.warning_deprecated(
|
|
238
|
-
warning="'tb env' is deprecated, use 'tb branch' instead. 'tb env' will be removed in the next 3.0.0 release, please update your scripts."
|
|
239
|
-
)
|
|
240
|
-
click.echo(deprecation_notice)
|
|
241
|
-
|
|
242
|
-
return click.Group.get_command(self, ctx, "branch")
|
|
243
|
-
|
|
244
236
|
def resolve_command(self, ctx, args):
|
|
245
237
|
# always return the command's name, not the alias
|
|
246
238
|
_, cmd, args = super().resolve_command(ctx, args)
|
|
@@ -431,7 +423,7 @@ async def folder_init(
|
|
|
431
423
|
t_file.write(
|
|
432
424
|
"""
|
|
433
425
|
##############################################################################################################################
|
|
434
|
-
### Visit https://www.tinybird.co/docs/
|
|
426
|
+
### Visit https://www.tinybird.co/docs/production/implementing-test-strategies.html#data-quality-tests ###
|
|
435
427
|
### for more details on Data Quality tests ###
|
|
436
428
|
##############################################################################################################################
|
|
437
429
|
|
|
@@ -467,7 +459,7 @@ async def folder_init(
|
|
|
467
459
|
t_file.write(
|
|
468
460
|
"""
|
|
469
461
|
############################################################################################################################
|
|
470
|
-
### Visit https://www.tinybird.co/docs/
|
|
462
|
+
### Visit https://www.tinybird.co/docs/production/implementing-test-strategies.html#regression-tests ###
|
|
471
463
|
### for more details on Regression tests ###
|
|
472
464
|
############################################################################################################################
|
|
473
465
|
|
|
@@ -1171,7 +1163,7 @@ async def print_branch_regression_tests_summary(client, job_id, host, response=N
|
|
|
1171
1163
|
click.echo(f"❌ FAILED {failure['name']}\n")
|
|
1172
1164
|
if failed:
|
|
1173
1165
|
raise CLIException(
|
|
1174
|
-
"Check Failures Detail above for more information. If the results are expected, skip asserts or increase thresholds, see 💡 Hints above (note skip asserts flags are applied to all regression tests, so use them when it makes sense).\n\nIf you are using the CI template for GitHub or GitLab you can add skip asserts flags as labels to the MR and they are automatically applied. Find available flags to skip asserts and thresholds here => https://www.tinybird.co/docs/
|
|
1166
|
+
"Check Failures Detail above for more information. If the results are expected, skip asserts or increase thresholds, see 💡 Hints above (note skip asserts flags are applied to all regression tests, so use them when it makes sense).\n\nIf you are using the CI template for GitHub or GitLab you can add skip asserts flags as labels to the MR and they are automatically applied. Find available flags to skip asserts and thresholds here => https://www.tinybird.co/docs/production/implementing-test-strategies.html#fixture-tests"
|
|
1175
1167
|
)
|
|
1176
1168
|
|
|
1177
1169
|
|
|
@@ -1902,7 +1894,6 @@ async def wait_job(
|
|
|
1902
1894
|
job_id: str,
|
|
1903
1895
|
job_url: str,
|
|
1904
1896
|
label: str,
|
|
1905
|
-
timeout: Optional[int] = None,
|
|
1906
1897
|
wait_observer: Optional[Callable[[Dict[str, Any], ProgressBar], None]] = None,
|
|
1907
1898
|
) -> Dict[str, Any]:
|
|
1908
1899
|
progress_bar: ProgressBar
|
|
@@ -1926,7 +1917,7 @@ async def wait_job(
|
|
|
1926
1917
|
|
|
1927
1918
|
try:
|
|
1928
1919
|
# TODO: Simplify this as it's not needed to use two functions for
|
|
1929
|
-
result = await wait_job_no_ui(tb_client, job_id,
|
|
1920
|
+
result = await wait_job_no_ui(tb_client, job_id, progressbar_cb)
|
|
1930
1921
|
if result["status"] != "done":
|
|
1931
1922
|
raise CLIException(FeedbackManager.error_while_running_job(error=result["error"]))
|
|
1932
1923
|
return result
|
|
@@ -1941,11 +1932,10 @@ async def wait_job(
|
|
|
1941
1932
|
async def wait_job_no_ui(
|
|
1942
1933
|
tb_client: TinyB,
|
|
1943
1934
|
job_id: str,
|
|
1944
|
-
timeout: Optional[int] = None,
|
|
1945
1935
|
status_callback: Optional[Callable[[Dict[str, Any]], None]] = None,
|
|
1946
1936
|
) -> Dict[str, Any]:
|
|
1947
1937
|
try:
|
|
1948
|
-
result = await asyncio.wait_for(tb_client.wait_for_job(job_id, status_callback=status_callback),
|
|
1938
|
+
result = await asyncio.wait_for(tb_client.wait_for_job(job_id, status_callback=status_callback), None)
|
|
1949
1939
|
if result["status"] != "done":
|
|
1950
1940
|
raise JobException(result.get("error"))
|
|
1951
1941
|
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.1.dev0
|
|
4
4
|
Summary: Tinybird Command Line Tool
|
|
5
5
|
Home-page: https://www.tinybird.co/docs/cli/introduction.html
|
|
6
6
|
Author: Tinybird
|
|
@@ -18,6 +18,19 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
4.0.0
|
|
22
|
+
************
|
|
23
|
+
|
|
24
|
+
This is a major release, please read the commands affected below and consider updating your scripts and workflow before upgrading to these version.
|
|
25
|
+
|
|
26
|
+
- `Deprecated` `--semver` flag and `tb release` commands are now deprecated. You can keep using `tb deploy` to integrate and deploy from git. Changes are deployed to the main Workspace instead of to a Release.
|
|
27
|
+
- `Removed` `--cicd` flag and CI/CD templates generation from `tb init`. You can still use the git integration, just create your own pipelines. You can use the ones in this repo as an exmple https://github.com/tinybirdco/ci
|
|
28
|
+
- `Removed` `tb env` command is removed, use `tb branch` instead.
|
|
29
|
+
- `Deprecated` .datasource files with `ENGINE "Join"` are deprecated, use `Engine "MergeeTree"` instead.
|
|
30
|
+
- `Deprecated` `tb materialize`
|
|
31
|
+
- `Removed` Drop the `--timeout` flag from `tb push` which made the populate job to timeout. You can use now `--wait` to wait for the job to finish or nothing to just create the job and return.
|
|
32
|
+
- `Removed` Support for `KEY` directive is removed. The `KEY` was used to create a Data Source with Join engine by the given `KEY` column name. Join engines are also deprecated, you can use a regular `MergeTree` Data Source instead and adapt the pipes SQL accordingly.
|
|
33
|
+
|
|
21
34
|
3.12.0
|
|
22
35
|
************
|
|
23
36
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-3.13.1.dev1 → tinybird-cli-4.0.1.dev0}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|