tinybird-cli 5.8.2.dev3__tar.gz → 5.8.2.dev5__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-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/PKG-INFO +11 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/__cli__.py +2 -2
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/datafile.py +3 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/feedback_manager.py +3 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/auth.py +6 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/cli.py +7 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/common.py +11 -3
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/datasource.py +26 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/pipe.py +17 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/token.py +15 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/PKG-INFO +11 -1
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/setup.cfg +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/check_pypi.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/client.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/config.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/connectors.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/context.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/datatypes.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/git_settings.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/sql.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/sql_template.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/sql_toolset.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/syncasync.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tornado_template.py +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/SOURCES.txt +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/dependency_links.txt +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/entry_points.txt +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/requires.txt +0 -0
- {tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/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: 5.8.2.
|
|
3
|
+
Version: 5.8.2.dev5
|
|
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,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.8.2.dev5
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Fixed` error messages when performing operations without being authenticated or using a token.
|
|
25
|
+
|
|
26
|
+
5.8.2.dev4
|
|
27
|
+
***********
|
|
28
|
+
|
|
29
|
+
- `Fixed` `tb auth` uses explicitly the `--host` if provided.
|
|
30
|
+
|
|
21
31
|
5.8.2.dev3
|
|
22
32
|
***********
|
|
23
33
|
|
|
@@ -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__ = '5.8.2.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '5.8.2.dev5'
|
|
8
|
+
__revision__ = '1914dcc'
|
|
@@ -65,7 +65,7 @@ from tinybird.tb_cli_modules.config import CLIConfig
|
|
|
65
65
|
from tinybird.tb_cli_modules.exceptions import CLIGitReleaseException, CLIPipeException
|
|
66
66
|
|
|
67
67
|
from .ch_utils.engine import ENABLED_ENGINES
|
|
68
|
-
from .client import AuthException, CanNotBeDeletedException, DoesNotExistException, TinyB
|
|
68
|
+
from .client import AuthException, AuthNoTokenException, CanNotBeDeletedException, DoesNotExistException, TinyB
|
|
69
69
|
from .feedback_manager import FeedbackManager
|
|
70
70
|
from .sql import parse_indexes_structure, parse_table_structure, schema_to_sql_columns
|
|
71
71
|
from .sql_template import get_template_and_variables, get_used_tables_in_template, render_sql_template
|
|
@@ -5245,6 +5245,8 @@ async def folder_pull(
|
|
|
5245
5245
|
|
|
5246
5246
|
return
|
|
5247
5247
|
|
|
5248
|
+
except AuthNoTokenException:
|
|
5249
|
+
raise
|
|
5248
5250
|
except Exception as e:
|
|
5249
5251
|
raise click.ClickException(FeedbackManager.error_pull(error=str(e)))
|
|
5250
5252
|
|
|
@@ -95,6 +95,9 @@ class FeedbackManager:
|
|
|
95
95
|
error_processing_data = error_message("{error} - FAIL")
|
|
96
96
|
error_file_already_exists = error_message("{file} already exists, use --force to override")
|
|
97
97
|
error_invalid_token_for_host = error_message("Invalid token for {host}")
|
|
98
|
+
error_invalid_host = error_message(
|
|
99
|
+
"Cannot parse response from host {host}. Please make sure you are using the API host URL."
|
|
100
|
+
)
|
|
98
101
|
error_invalid_release_for_workspace = error_message(
|
|
99
102
|
"There's no Release with semver {semver} for Workspace {workspace}"
|
|
100
103
|
)
|
|
@@ -32,7 +32,9 @@ from tinybird.tb_cli_modules.regions import Region
|
|
|
32
32
|
"--host",
|
|
33
33
|
help="Set custom host if it's different than https://api.tinybird.co. Check https://www.tinybird.co/docs/api-reference/overview#regions-and-endpoints for the available list of regions",
|
|
34
34
|
)
|
|
35
|
-
@click.option(
|
|
35
|
+
@click.option(
|
|
36
|
+
"--region", envvar="TB_REGION", help="Set region. Run 'tb auth ls' to show available regions. Overrides host."
|
|
37
|
+
)
|
|
36
38
|
@click.option(
|
|
37
39
|
"--connector",
|
|
38
40
|
type=click.Choice(["bigquery", "snowflake"], case_sensitive=True),
|
|
@@ -79,6 +81,9 @@ async def auth(ctx: click.Context, token: str, host: str, region: str, connector
|
|
|
79
81
|
regions: Optional[List[Region]] = None
|
|
80
82
|
try_all_regions = True
|
|
81
83
|
|
|
84
|
+
if host:
|
|
85
|
+
try_all_regions = False
|
|
86
|
+
|
|
82
87
|
if region:
|
|
83
88
|
regions, host = await get_host_from_region(config, region, config.get_host())
|
|
84
89
|
config.set_host(host)
|
|
@@ -897,6 +897,9 @@ async def sql(
|
|
|
897
897
|
res = await client.query(
|
|
898
898
|
f"SELECT * FROM ({query}) LIMIT {rows_limit} FORMAT {req_format}", pipeline=pipeline
|
|
899
899
|
)
|
|
900
|
+
|
|
901
|
+
except AuthNoTokenException:
|
|
902
|
+
raise
|
|
900
903
|
except Exception as e:
|
|
901
904
|
raise CLIException(FeedbackManager.error_exception(error=str(e)))
|
|
902
905
|
|
|
@@ -1205,6 +1208,8 @@ async def materialize(
|
|
|
1205
1208
|
await _try_push_pipe(f_pipe)
|
|
1206
1209
|
await _populate(pipe, node_name, f_pipe)
|
|
1207
1210
|
click.echo(FeedbackManager.success_created_matview(name=datasource_name))
|
|
1211
|
+
except AuthNoTokenException:
|
|
1212
|
+
raise
|
|
1208
1213
|
except Exception as e:
|
|
1209
1214
|
raise CLIException(FeedbackManager.error_exception(error=str(e)))
|
|
1210
1215
|
|
|
@@ -1560,5 +1565,7 @@ async def deploy(
|
|
|
1560
1565
|
await client.update_release_semver(config["id"], current_semver, semver)
|
|
1561
1566
|
if show_feedback:
|
|
1562
1567
|
click.echo(FeedbackManager.success_release_update(semver=current_semver, new_semver=semver))
|
|
1568
|
+
except AuthNoTokenException:
|
|
1569
|
+
raise
|
|
1563
1570
|
except Exception as e:
|
|
1564
1571
|
raise CLIException(str(e))
|
|
@@ -1154,6 +1154,8 @@ async def push_data(
|
|
|
1154
1154
|
tasks = [process_url(datasource_name, url, mode, sql_condition, replace_options) for url in urls]
|
|
1155
1155
|
output = await gather_with_concurrency(concurrency, *tasks)
|
|
1156
1156
|
parser, total_rows, appended_rows = list(output)[-1]
|
|
1157
|
+
except AuthNoTokenException:
|
|
1158
|
+
raise
|
|
1157
1159
|
except OperationCanNotBePerformed as e:
|
|
1158
1160
|
raise CLIException(FeedbackManager.error_operation_can_not_be_performed(error=e))
|
|
1159
1161
|
except Exception as e:
|
|
@@ -1334,8 +1336,10 @@ async def switch_workspace(config: CLIConfig, workspace_name_or_id: str, only_en
|
|
|
1334
1336
|
config.persist_to_file()
|
|
1335
1337
|
|
|
1336
1338
|
click.echo(FeedbackManager.success_now_using_config(name=config["name"], id=config["id"]))
|
|
1337
|
-
except
|
|
1338
|
-
raise
|
|
1339
|
+
except AuthNoTokenException:
|
|
1340
|
+
raise
|
|
1341
|
+
except CLIException:
|
|
1342
|
+
raise
|
|
1339
1343
|
except Exception as e:
|
|
1340
1344
|
raise CLIException(FeedbackManager.error_exception(error=str(e)))
|
|
1341
1345
|
|
|
@@ -1562,7 +1566,11 @@ async def try_update_config_with_remote(
|
|
|
1562
1566
|
return False
|
|
1563
1567
|
except Exception as ex:
|
|
1564
1568
|
if raise_on_errors:
|
|
1565
|
-
|
|
1569
|
+
ex_message = str(ex)
|
|
1570
|
+
if "cannot parse" in ex_message.lower():
|
|
1571
|
+
raise CLIAuthException(FeedbackManager.error_invalid_host(host=config.get_host()))
|
|
1572
|
+
|
|
1573
|
+
raise CLIAuthException(FeedbackManager.error_exception(error=ex_message))
|
|
1566
1574
|
return False
|
|
1567
1575
|
|
|
1568
1576
|
for k in ("id", "name", "user_email", "user_id", "scope"):
|
|
@@ -13,7 +13,7 @@ import click
|
|
|
13
13
|
import humanfriendly
|
|
14
14
|
from click import Context
|
|
15
15
|
|
|
16
|
-
from tinybird.client import CanNotBeDeletedException, DoesNotExistException, TinyB
|
|
16
|
+
from tinybird.client import AuthNoTokenException, CanNotBeDeletedException, DoesNotExistException, TinyB
|
|
17
17
|
from tinybird.config import get_display_host
|
|
18
18
|
from tinybird.tb_cli_modules.config import CLIConfig
|
|
19
19
|
|
|
@@ -232,6 +232,9 @@ async def datasource_replace(
|
|
|
232
232
|
- Replace from connector `tb datasource replace [datasource_name] --connector [connector_name] --sql [the_sql_to_extract_from] --sql-condition "country='ES'"`
|
|
233
233
|
"""
|
|
234
234
|
|
|
235
|
+
if not url and not connector:
|
|
236
|
+
raise CLIDatasourceException(FeedbackManager.error_missing_url_or_connector(datasource=datasource_name))
|
|
237
|
+
|
|
235
238
|
replace_options = set()
|
|
236
239
|
if skip_incompatible_partition_key:
|
|
237
240
|
replace_options.add("skip_incompatible_partition_key")
|
|
@@ -319,6 +322,8 @@ async def datasource_delete(ctx: Context, datasource_name: str, yes: bool):
|
|
|
319
322
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
320
323
|
try:
|
|
321
324
|
datasource = await client.get_datasource(datasource_name)
|
|
325
|
+
except AuthNoTokenException:
|
|
326
|
+
raise
|
|
322
327
|
except DoesNotExistException:
|
|
323
328
|
raise CLIDatasourceException(FeedbackManager.error_datasource_does_not_exist(datasource=datasource_name))
|
|
324
329
|
except Exception as e:
|
|
@@ -384,6 +389,8 @@ async def datasource_truncate(ctx, datasource_name, yes, cascade):
|
|
|
384
389
|
if yes or click.confirm(FeedbackManager.warning_confirm_truncate_datasource(datasource=datasource_name)):
|
|
385
390
|
try:
|
|
386
391
|
await client.datasource_truncate(datasource_name)
|
|
392
|
+
except AuthNoTokenException:
|
|
393
|
+
raise
|
|
387
394
|
except DoesNotExistException:
|
|
388
395
|
raise CLIDatasourceException(FeedbackManager.error_datasource_does_not_exist(datasource=datasource_name))
|
|
389
396
|
except Exception as e:
|
|
@@ -491,6 +498,8 @@ async def datasource_delete_rows(ctx, datasource_name, sql_condition, yes, wait,
|
|
|
491
498
|
i += 1
|
|
492
499
|
progress_line(i)
|
|
493
500
|
|
|
501
|
+
except AuthNoTokenException:
|
|
502
|
+
raise
|
|
494
503
|
except DoesNotExistException:
|
|
495
504
|
raise CLIDatasourceException(FeedbackManager.error_datasource_does_not_exist(datasource=datasource_name))
|
|
496
505
|
except Exception as e:
|
|
@@ -611,6 +620,8 @@ async def datasource_share(ctx: Context, datasource_name: str, workspace_name_or
|
|
|
611
620
|
_datasource: Dict[str, Any] = {}
|
|
612
621
|
try:
|
|
613
622
|
_datasource = await client.get_datasource(datasource_name)
|
|
623
|
+
except AuthNoTokenException:
|
|
624
|
+
raise
|
|
614
625
|
except DoesNotExistException:
|
|
615
626
|
raise CLIDatasourceException(FeedbackManager.error_datasource_does_not_exist(datasource=datasource_name))
|
|
616
627
|
except Exception as e:
|
|
@@ -679,6 +690,8 @@ async def datasource_unshare(ctx: Context, datasource_name: str, workspace_name_
|
|
|
679
690
|
_datasource: Dict[str, Any] = {}
|
|
680
691
|
try:
|
|
681
692
|
_datasource = await client.get_datasource(datasource_name)
|
|
693
|
+
except AuthNoTokenException:
|
|
694
|
+
raise
|
|
682
695
|
except DoesNotExistException:
|
|
683
696
|
raise CLIDatasourceException(FeedbackManager.error_datasource_does_not_exist(datasource=datasource_name))
|
|
684
697
|
except Exception as e:
|
|
@@ -739,6 +752,8 @@ async def datasource_sync(ctx, datasource_name: str, yes: bool):
|
|
|
739
752
|
|
|
740
753
|
try:
|
|
741
754
|
await sync_data(ctx, datasource_name, yes)
|
|
755
|
+
except AuthNoTokenException:
|
|
756
|
+
raise
|
|
742
757
|
except Exception as e:
|
|
743
758
|
raise CLIDatasourceException(FeedbackManager.error_syncing_datasource(datasource=datasource_name, error=str(e)))
|
|
744
759
|
|
|
@@ -826,8 +841,12 @@ async def datasource_scheduling_state(ctx: Context, datasource_name: str) -> Non
|
|
|
826
841
|
"""Get the scheduling state of a Data Source."""
|
|
827
842
|
client: TinyB = ctx.obj["client"]
|
|
828
843
|
try:
|
|
844
|
+
await client.get_datasource(datasource_name) # Check if datasource exists
|
|
829
845
|
state = await client.datasource_scheduling_state(datasource_name)
|
|
830
846
|
click.echo(FeedbackManager.info_datasource_scheduling_state(datasource=datasource_name, state=state))
|
|
847
|
+
|
|
848
|
+
except AuthNoTokenException:
|
|
849
|
+
raise
|
|
831
850
|
except Exception as e:
|
|
832
851
|
raise CLIDatasourceException(
|
|
833
852
|
FeedbackManager.error_datasource_scheduling_state(datasource=datasource_name, error=e)
|
|
@@ -845,9 +864,12 @@ async def datasource_scheduling_pause(ctx: Context, datasource_name: str) -> Non
|
|
|
845
864
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
846
865
|
|
|
847
866
|
try:
|
|
867
|
+
await client.get_datasource(datasource_name) # Check if datasource exists
|
|
848
868
|
await client.datasource_scheduling_pause(datasource_name)
|
|
849
869
|
click.echo(FeedbackManager.success_datasource_scheduling_paused(datasource=datasource_name))
|
|
850
870
|
|
|
871
|
+
except AuthNoTokenException:
|
|
872
|
+
raise
|
|
851
873
|
except Exception as e:
|
|
852
874
|
raise CLIDatasourceException(
|
|
853
875
|
FeedbackManager.error_pausing_datasource_scheduling(datasource=datasource_name, error=e)
|
|
@@ -865,9 +887,12 @@ async def datasource_scheduling_resume(ctx: Context, datasource_name: str) -> No
|
|
|
865
887
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
866
888
|
|
|
867
889
|
try:
|
|
890
|
+
await client.get_datasource(datasource_name) # Check if datasource exists
|
|
868
891
|
await client.datasource_scheduling_resume(datasource_name)
|
|
869
892
|
click.echo(FeedbackManager.success_datasource_scheduling_resumed(datasource=datasource_name))
|
|
870
893
|
|
|
894
|
+
except AuthNoTokenException:
|
|
895
|
+
raise
|
|
871
896
|
except Exception as e:
|
|
872
897
|
raise CLIDatasourceException(
|
|
873
898
|
FeedbackManager.error_resuming_datasource_scheduling(datasource=datasource_name, error=e)
|
|
@@ -14,7 +14,7 @@ import humanfriendly
|
|
|
14
14
|
from click import Context
|
|
15
15
|
|
|
16
16
|
import tinybird.context as context
|
|
17
|
-
from tinybird.client import DoesNotExistException, TinyB
|
|
17
|
+
from tinybird.client import AuthNoTokenException, DoesNotExistException, TinyB
|
|
18
18
|
from tinybird.config import DEFAULT_API_HOST, FeatureFlags
|
|
19
19
|
from tinybird.datafile import PipeNodeTypes, PipeTypes, folder_push, get_name_version, process_file, wait_job
|
|
20
20
|
from tinybird.feedback_manager import FeedbackManager
|
|
@@ -358,6 +358,8 @@ async def pipe_unlink_output_node(
|
|
|
358
358
|
await client.pipe_remove_stream(pipe["name"], node_uid)
|
|
359
359
|
click.echo(FeedbackManager.success_pipe_unlinked(pipe=pipe["name"]))
|
|
360
360
|
|
|
361
|
+
except AuthNoTokenException:
|
|
362
|
+
raise
|
|
361
363
|
except Exception as e:
|
|
362
364
|
raise CLIPipeException(FeedbackManager.error_exception(error=e))
|
|
363
365
|
|
|
@@ -401,6 +403,8 @@ async def common_pipe_publish_node(ctx: click.Context, pipe_name_or_id: str, nod
|
|
|
401
403
|
|
|
402
404
|
await client.pipe_set_endpoint(pipe_name_or_id, node)
|
|
403
405
|
click.echo(FeedbackManager.success_node_published(pipe=pipe_name_or_id, host=host))
|
|
406
|
+
except AuthNoTokenException:
|
|
407
|
+
raise
|
|
404
408
|
except DoesNotExistException:
|
|
405
409
|
raise CLIPipeException(FeedbackManager.error_pipe_does_not_exist(pipe=pipe_name_or_id))
|
|
406
410
|
except Exception as e:
|
|
@@ -450,6 +454,8 @@ async def pipe_unpublish_node(
|
|
|
450
454
|
|
|
451
455
|
await client.pipe_remove_endpoint(pipe_name_or_id, node)
|
|
452
456
|
click.echo(FeedbackManager.success_node_unpublished(pipe=pipe_name_or_id, host=host))
|
|
457
|
+
except AuthNoTokenException:
|
|
458
|
+
raise
|
|
453
459
|
except DoesNotExistException:
|
|
454
460
|
raise CLIPipeException(FeedbackManager.error_pipe_does_not_exist(pipe=pipe_name_or_id))
|
|
455
461
|
except Exception as e:
|
|
@@ -550,6 +556,8 @@ async def print_pipe(ctx: Context, pipe: str, query: str, format_: str):
|
|
|
550
556
|
req_format = "json" if not format_ else format_.lower()
|
|
551
557
|
try:
|
|
552
558
|
res = await client.pipe_data(pipe, format=req_format, sql=query, params=params)
|
|
559
|
+
except AuthNoTokenException:
|
|
560
|
+
raise
|
|
553
561
|
except Exception as e:
|
|
554
562
|
raise CLIPipeException(FeedbackManager.error_exception(error=str(e)))
|
|
555
563
|
|
|
@@ -740,6 +748,8 @@ async def pipe_copy_run(
|
|
|
740
748
|
await wait_job(client, job_id, job_url, "** Copying data")
|
|
741
749
|
click.echo(FeedbackManager.success_data_copied_to_ds(target_datasource=target_datasource_name))
|
|
742
750
|
|
|
751
|
+
except AuthNoTokenException:
|
|
752
|
+
raise
|
|
743
753
|
except Exception as e:
|
|
744
754
|
raise CLIPipeException(FeedbackManager.error_creating_copy_job(error=e))
|
|
745
755
|
|
|
@@ -758,6 +768,8 @@ async def pipe_copy_resume(ctx: click.Context, pipe_name_or_id: str):
|
|
|
758
768
|
await client.pipe_resume_copy(pipe_name_or_id)
|
|
759
769
|
click.echo(FeedbackManager.success_copy_pipe_resumed(pipe=pipe_name_or_id))
|
|
760
770
|
|
|
771
|
+
except AuthNoTokenException:
|
|
772
|
+
raise
|
|
761
773
|
except Exception as e:
|
|
762
774
|
raise CLIPipeException(FeedbackManager.error_resuming_copy_pipe(error=e))
|
|
763
775
|
|
|
@@ -776,6 +788,8 @@ async def pipe_copy_pause(ctx: click.Context, pipe_name_or_id: str):
|
|
|
776
788
|
await client.pipe_pause_copy(pipe_name_or_id)
|
|
777
789
|
click.echo(FeedbackManager.success_copy_pipe_paused(pipe=pipe_name_or_id))
|
|
778
790
|
|
|
791
|
+
except AuthNoTokenException:
|
|
792
|
+
raise
|
|
779
793
|
except Exception as e:
|
|
780
794
|
raise CLIPipeException(FeedbackManager.error_pausing_copy_pipe(error=e))
|
|
781
795
|
|
|
@@ -838,5 +852,7 @@ async def pipe_sink_run(
|
|
|
838
852
|
await wait_job(client, job_id, job_url, "** Sinking data")
|
|
839
853
|
click.echo(FeedbackManager.success_sink_job_finished(bucket_path=bucket_path))
|
|
840
854
|
|
|
855
|
+
except AuthNoTokenException:
|
|
856
|
+
raise
|
|
841
857
|
except Exception as e:
|
|
842
858
|
raise CLIPipeException(FeedbackManager.error_creating_sink_job(error=str(e)))
|
|
@@ -6,7 +6,7 @@ import pyperclip
|
|
|
6
6
|
from click import Context
|
|
7
7
|
from humanfriendly import parse_timespan
|
|
8
8
|
|
|
9
|
-
from tinybird.client import TinyB
|
|
9
|
+
from tinybird.client import AuthNoTokenException, TinyB
|
|
10
10
|
from tinybird.feedback_manager import FeedbackManager
|
|
11
11
|
from tinybird.tb_cli_modules.cli import cli
|
|
12
12
|
from tinybird.tb_cli_modules.common import (
|
|
@@ -44,6 +44,8 @@ async def token_ls(
|
|
|
44
44
|
click.echo(FeedbackManager.info_tokens())
|
|
45
45
|
echo_safe_humanfriendly_tables_format_smart_table(table, column_names=columns)
|
|
46
46
|
click.echo("\n")
|
|
47
|
+
except AuthNoTokenException:
|
|
48
|
+
raise
|
|
47
49
|
except Exception as e:
|
|
48
50
|
raise CLITokenException(FeedbackManager.error_exception(error=e))
|
|
49
51
|
|
|
@@ -61,6 +63,8 @@ async def token_rm(ctx: Context, token_id: str, yes: bool) -> None:
|
|
|
61
63
|
if yes or click.confirm(FeedbackManager.warning_confirm_delete_token(token=token_id)):
|
|
62
64
|
try:
|
|
63
65
|
await client.token_delete(token_id)
|
|
66
|
+
except AuthNoTokenException:
|
|
67
|
+
raise
|
|
64
68
|
except DoesNotExistException:
|
|
65
69
|
raise CLITokenException(FeedbackManager.error_token_does_not_exist(token_id=token_id))
|
|
66
70
|
except Exception as e:
|
|
@@ -81,6 +85,8 @@ async def token_refresh(ctx: Context, token_id: str, yes: bool) -> None:
|
|
|
81
85
|
if yes or click.confirm(FeedbackManager.warning_confirm_refresh_token(token=token_id)):
|
|
82
86
|
try:
|
|
83
87
|
await client.token_refresh(token_id)
|
|
88
|
+
except AuthNoTokenException:
|
|
89
|
+
raise
|
|
84
90
|
except DoesNotExistException:
|
|
85
91
|
raise CLITokenException(FeedbackManager.error_token_does_not_exist(token_id=token_id))
|
|
86
92
|
except Exception as e:
|
|
@@ -105,6 +111,8 @@ async def token_scopes(ctx: Context, token_id: str) -> None:
|
|
|
105
111
|
click.echo(FeedbackManager.info_token_scopes(token=token_id))
|
|
106
112
|
echo_safe_humanfriendly_tables_format_smart_table(table, column_names=columns)
|
|
107
113
|
click.echo("\n")
|
|
114
|
+
except AuthNoTokenException:
|
|
115
|
+
raise
|
|
108
116
|
except Exception as e:
|
|
109
117
|
raise CLITokenException(FeedbackManager.error_exception(error=e))
|
|
110
118
|
|
|
@@ -122,6 +130,8 @@ async def token_copy(ctx: Context, token_id: str) -> None:
|
|
|
122
130
|
try:
|
|
123
131
|
token = await client.token_get(token_id)
|
|
124
132
|
pyperclip.copy(token["token"].strip())
|
|
133
|
+
except AuthNoTokenException:
|
|
134
|
+
raise
|
|
125
135
|
except DoesNotExistException:
|
|
126
136
|
raise CLITokenException(FeedbackManager.error_token_does_not_exist(token_id=token_id))
|
|
127
137
|
except Exception as e:
|
|
@@ -224,6 +234,8 @@ async def create_jwt_token(ctx: Context, name: str, ttl: timedelta, scope, resou
|
|
|
224
234
|
|
|
225
235
|
try:
|
|
226
236
|
response = await client.create_jwt_token(name, expiration_time, scopes)
|
|
237
|
+
except AuthNoTokenException:
|
|
238
|
+
raise
|
|
227
239
|
except Exception as e:
|
|
228
240
|
raise CLITokenException(FeedbackManager.error_exception(error=e))
|
|
229
241
|
|
|
@@ -329,6 +341,8 @@ async def create_static_token(ctx, name: str):
|
|
|
329
341
|
|
|
330
342
|
try:
|
|
331
343
|
await client.create_token(name, scoped_parsed, origin_code=None)
|
|
344
|
+
except AuthNoTokenException:
|
|
345
|
+
raise
|
|
332
346
|
except Exception as e:
|
|
333
347
|
raise CLITokenException(FeedbackManager.error_exception(error=e))
|
|
334
348
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinybird-cli
|
|
3
|
-
Version: 5.8.2.
|
|
3
|
+
Version: 5.8.2.dev5
|
|
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,16 @@ The Tinybird command-line tool allows you to use all the Tinybird functionality
|
|
|
18
18
|
Changelog
|
|
19
19
|
----------
|
|
20
20
|
|
|
21
|
+
5.8.2.dev5
|
|
22
|
+
***********
|
|
23
|
+
|
|
24
|
+
- `Fixed` error messages when performing operations without being authenticated or using a token.
|
|
25
|
+
|
|
26
|
+
5.8.2.dev4
|
|
27
|
+
***********
|
|
28
|
+
|
|
29
|
+
- `Fixed` `tb auth` uses explicitly the `--host` if provided.
|
|
30
|
+
|
|
21
31
|
5.8.2.dev3
|
|
22
32
|
***********
|
|
23
33
|
|
|
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
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/tinyunit/tinyunit.py
RENAMED
|
File without changes
|
{tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird/tb_cli_modules/workspace_members.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-cli-5.8.2.dev3 → tinybird-cli-5.8.2.dev5}/tinybird_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|