tinybird 0.0.1.dev71__tar.gz → 0.0.1.dev72__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.
Potentially problematic release.
This version of tinybird might be problematic. Click here for more details.
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/PKG-INFO +1 -1
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/client.py +4 -4
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/feedback_manager.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/prompts.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/__cli__.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/cicd.py +1 -1
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/cli.py +6 -6
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/common.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/config.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/deployment.py +10 -1
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/endpoint.py +9 -5
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/feedback_manager.py +2 -2
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/local_common.py +3 -3
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/PKG-INFO +1 -1
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/setup.cfg +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/__cli__.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/ch_utils/constants.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/ch_utils/engine.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/check_pypi.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/config.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/connectors.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/context.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/datafile.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/datatypes.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/git_settings.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/sql.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/sql_template.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/sql_template_fmt.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/sql_toolset.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/syncasync.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/cli.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/auth.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/build.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/copy.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/create.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/build.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/build_common.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/common.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/diff.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/exceptions.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/fixture.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/format_common.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/pull.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datasource.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/fmt.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/job.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/llm.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/llm_utils.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/local.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/login.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/materialization.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/mock.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/pipe.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/project.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/regions.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/shell.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/table.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/tag.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/test.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/token.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/watch.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/workspace.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/auth.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/branch.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/cicd.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/cli.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/common.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/config.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/connection.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/datasource.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/exceptions.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/fmt.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/job.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/pipe.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/regions.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/tag.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/telemetry.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/test.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/workspace.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/workspace_members.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tornado_template.py +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/SOURCES.txt +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/dependency_links.txt +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/entry_points.txt +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/requires.txt +0 -0
- {tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird.egg-info/top_level.txt +0 -0
|
@@ -93,7 +93,7 @@ class TinyB:
|
|
|
93
93
|
send_telemetry: bool = False,
|
|
94
94
|
semver: Optional[str] = None,
|
|
95
95
|
env: Optional[str] = "production",
|
|
96
|
-
|
|
96
|
+
staging: bool = False,
|
|
97
97
|
):
|
|
98
98
|
ctx = ssl.create_default_context()
|
|
99
99
|
ctx.check_hostname = False
|
|
@@ -106,7 +106,7 @@ class TinyB:
|
|
|
106
106
|
self.send_telemetry = send_telemetry
|
|
107
107
|
self.semver = semver
|
|
108
108
|
self.env = env
|
|
109
|
-
self.
|
|
109
|
+
self.staging = staging
|
|
110
110
|
|
|
111
111
|
async def _req_raw(
|
|
112
112
|
self,
|
|
@@ -127,8 +127,8 @@ class TinyB:
|
|
|
127
127
|
url += ("&" if "?" in url else "?") + "cli_version=" + quote(self.version)
|
|
128
128
|
if self.semver:
|
|
129
129
|
url += ("&" if "?" in url else "?") + "__tb__semver=" + self.semver
|
|
130
|
-
if self.
|
|
131
|
-
url += ("&" if "?" in url else "?") + "__tb__deployment=
|
|
130
|
+
if self.staging:
|
|
131
|
+
url += ("&" if "?" in url else "?") + "__tb__deployment=staging"
|
|
132
132
|
|
|
133
133
|
verify_ssl = not self.disable_ssl_checks
|
|
134
134
|
try:
|
|
@@ -458,7 +458,7 @@ class FeedbackManager:
|
|
|
458
458
|
info_releases_detected = info_message("** Live Release: {current_semver} => New Release: {semver}")
|
|
459
459
|
info_dry_releases_detected = info_message("** [DRY RUN] Live Release: {current_semver} => New Release: {semver}")
|
|
460
460
|
info_pre_prompt_auth_login_user_token = info_message(
|
|
461
|
-
"ℹ️ In order to log into Tinybird, you need your user token. Please, go to {host}/tokens/ and paste your User Token here."
|
|
461
|
+
"ℹ️ In order to log into Tinybird, you need your user token. Please, go to {host}/tokens/ and paste your User Token here." # noqa: RUF001
|
|
462
462
|
)
|
|
463
463
|
prompt_auth_login_user_token = prompt_message("❓ User token:")
|
|
464
464
|
|
|
@@ -609,7 +609,7 @@ Ready? """
|
|
|
609
609
|
)
|
|
610
610
|
warning_datasource_sync = warning_message("** Warning: Do you want to sync the Data Source {datasource}?")
|
|
611
611
|
warning_datasource_sync_bucket = warning_message(
|
|
612
|
-
"** Warning: Do you want to ingest all the selected files (new and previous) from the {datasource} bucket? Be aware that data might be duplicated if
|
|
612
|
+
"** Warning: Do you want to ingest all the selected files (new and previous) from the {datasource} bucket? Be aware that data might be duplicated if you have previously ingested those files.\n"
|
|
613
613
|
)
|
|
614
614
|
warning_users_dont_exist = warning_message(
|
|
615
615
|
"** Warning: The following users do not exist in the workspace {workspace}: {users}"
|
|
@@ -790,10 +790,10 @@ When you need to work with resources or data in cloud, add always the --cloud fl
|
|
|
790
790
|
├── materializations
|
|
791
791
|
├── pipes
|
|
792
792
|
└── tests
|
|
793
|
-
- The local development server will be available at http://localhost:
|
|
793
|
+
- The local development server will be available at http://localhost:7181. Even if some response uses another base url, use always http://localhost:7181.
|
|
794
794
|
- After every change in your .datasource, .pipe or .ndjson files, run `{base_command} build` to build the project locally.
|
|
795
795
|
- When you need to ingest data locally in a datasource, create a .ndjson file with the same name of the datasource and the data you want and run `{base_command} build` so the data is ingested.
|
|
796
|
-
- The format of the generated api endpoint urls is: http://localhost:
|
|
796
|
+
- The format of the generated api endpoint urls is: http://localhost:7181/v0/pipe/<pipe_name>.json?token=<token>
|
|
797
797
|
- Before running the tests, remember to have the project built with `{base_command} build` with the latest changes.
|
|
798
798
|
</development_instructions>
|
|
799
799
|
When asking for ingesting data, adding data or appending data do the following depending on the environment you want to work with:
|
|
@@ -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__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev72'
|
|
8
|
+
__revision__ = 'f2d1d8b'
|
|
@@ -57,7 +57,7 @@ VERSION = f"{__cli__.__version__} (rev {__cli__.__revision__})"
|
|
|
57
57
|
@click.option("--show-tokens", is_flag=True, default=False, help="Enable the output of tokens")
|
|
58
58
|
@click.option("--cloud/--local", is_flag=True, default=False, help="Run against cloud or local")
|
|
59
59
|
@click.option("--build", is_flag=True, default=False, help="Run against build mode")
|
|
60
|
-
@click.option("--
|
|
60
|
+
@click.option("--staging", is_flag=True, default=False, help="Run against a staging deployment.")
|
|
61
61
|
@click.version_option(version=VERSION)
|
|
62
62
|
@click.pass_context
|
|
63
63
|
@coro
|
|
@@ -69,7 +69,7 @@ async def cli(
|
|
|
69
69
|
show_tokens: bool,
|
|
70
70
|
cloud: bool,
|
|
71
71
|
build: bool,
|
|
72
|
-
|
|
72
|
+
staging: bool,
|
|
73
73
|
) -> None:
|
|
74
74
|
"""
|
|
75
75
|
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.
|
|
@@ -123,7 +123,7 @@ async def cli(
|
|
|
123
123
|
|
|
124
124
|
logging.debug("debug enabled")
|
|
125
125
|
|
|
126
|
-
client = await create_ctx_client(ctx, config, cloud, build,
|
|
126
|
+
client = await create_ctx_client(ctx, config, cloud, build, staging)
|
|
127
127
|
|
|
128
128
|
if client:
|
|
129
129
|
ctx.ensure_object(dict)["client"] = client
|
|
@@ -388,7 +388,7 @@ def __unpatch_click_output():
|
|
|
388
388
|
click.secho = __old_click_secho
|
|
389
389
|
|
|
390
390
|
|
|
391
|
-
async def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, build: bool,
|
|
391
|
+
async def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, build: bool, staging: bool):
|
|
392
392
|
commands_without_ctx_client = ["auth", "check", "login", "local", "upgrade"]
|
|
393
393
|
command = ctx.invoked_subcommand
|
|
394
394
|
if command in commands_without_ctx_client:
|
|
@@ -405,11 +405,11 @@ async def create_ctx_client(ctx: Context, config: Dict[str, Any], cloud: bool, b
|
|
|
405
405
|
click.echo(
|
|
406
406
|
FeedbackManager.gray(message=f"Running against Tinybird Cloud: Workspace {config.get('name', 'default')}")
|
|
407
407
|
)
|
|
408
|
-
return _get_tb_client(config.get("token", None), config["host"],
|
|
408
|
+
return _get_tb_client(config.get("token", None), config["host"], staging=staging)
|
|
409
409
|
build = command in commands_always_build or build
|
|
410
410
|
if not build and command not in commands_always_local and command not in commands_always_build:
|
|
411
411
|
click.echo(FeedbackManager.gray(message="Running against Tinybird Local\n"))
|
|
412
|
-
return await get_tinybird_local_client(config, build=build,
|
|
412
|
+
return await get_tinybird_local_client(config, build=build, staging=staging)
|
|
413
413
|
|
|
414
414
|
|
|
415
415
|
def get_target_env(cloud: bool, build: bool) -> str:
|
|
@@ -375,9 +375,9 @@ def getenv_bool(key: str, default: bool) -> bool:
|
|
|
375
375
|
return v.lower() == "true" or v == "1"
|
|
376
376
|
|
|
377
377
|
|
|
378
|
-
def _get_tb_client(token: str, host: str,
|
|
378
|
+
def _get_tb_client(token: str, host: str, staging: bool = False) -> TinyB:
|
|
379
379
|
disable_ssl: bool = getenv_bool("TB_DISABLE_SSL_CHECKS", False)
|
|
380
|
-
return TinyB(token, host, version=VERSION, disable_ssl_checks=disable_ssl, send_telemetry=True,
|
|
380
|
+
return TinyB(token, host, version=VERSION, disable_ssl_checks=disable_ssl, send_telemetry=True, staging=staging)
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
def create_tb_client(ctx: Context) -> TinyB:
|
|
@@ -219,7 +219,7 @@ class CLIConfig:
|
|
|
219
219
|
return CLIConfig.DEFAULTS["host"]
|
|
220
220
|
return None
|
|
221
221
|
|
|
222
|
-
def get_client(self, token: Optional[str] = None, host: Optional[str] = None,
|
|
222
|
+
def get_client(self, token: Optional[str] = None, host: Optional[str] = None, staging: bool = False) -> tbc.TinyB:
|
|
223
223
|
"""Returns a new TinyB client configured with:
|
|
224
224
|
|
|
225
225
|
- token:
|
|
@@ -242,7 +242,7 @@ class CLIConfig:
|
|
|
242
242
|
version=CURRENT_VERSION,
|
|
243
243
|
disable_ssl_checks=FeatureFlags.ignore_ssl_errors(),
|
|
244
244
|
send_telemetry=FeatureFlags.send_telemetry(),
|
|
245
|
-
|
|
245
|
+
staging=staging,
|
|
246
246
|
)
|
|
247
247
|
|
|
248
248
|
def get_user_client(self, host: Optional[str] = None) -> tbc.TinyB:
|
|
@@ -352,7 +352,16 @@ def create_deployment(
|
|
|
352
352
|
click.echo(FeedbackManager.success(message="\n✓ Deployment is valid"))
|
|
353
353
|
else:
|
|
354
354
|
click.echo(FeedbackManager.error(message="\n✗ Deployment is not valid"))
|
|
355
|
-
|
|
355
|
+
deploy_errors = result.get("errors")
|
|
356
|
+
for deploy_error in deploy_errors:
|
|
357
|
+
if deploy_error.get("filename", None):
|
|
358
|
+
click.echo(
|
|
359
|
+
FeedbackManager.error(
|
|
360
|
+
message=f"{deploy_error.get('filename')}\n\n{deploy_error.get('error')}"
|
|
361
|
+
)
|
|
362
|
+
)
|
|
363
|
+
else:
|
|
364
|
+
click.echo(FeedbackManager.error(message=f"{deploy_error.get('error')}"))
|
|
356
365
|
return
|
|
357
366
|
|
|
358
367
|
deploy_result = result.get("result")
|
|
@@ -56,7 +56,7 @@ async def endpoint_ls(ctx: Context, match: str, format_: str):
|
|
|
56
56
|
if pattern and not pattern.search(tk["name"]):
|
|
57
57
|
continue
|
|
58
58
|
token = get_endpoint_token(tokens, tk["name"]) or client.token
|
|
59
|
-
endpoint_url = build_endpoint_url(client, tk["name"], token)
|
|
59
|
+
endpoint_url = build_endpoint_url(client, tk["name"], token, client.staging)
|
|
60
60
|
table_human_readable.append((tk["name"], t["updated_at"][:-7], len(t["nodes"]), endpoint_url))
|
|
61
61
|
table_machine_readable.append(
|
|
62
62
|
{
|
|
@@ -166,7 +166,7 @@ async def endpoint_url(ctx: Context, pipe: str, language: str):
|
|
|
166
166
|
client: TinyB = ctx.ensure_object(dict)["client"]
|
|
167
167
|
tokens = await client.tokens()
|
|
168
168
|
token = get_endpoint_token(tokens, pipe) or client.token
|
|
169
|
-
click.echo(build_endpoint_snippet(client, pipe, token, language))
|
|
169
|
+
click.echo(build_endpoint_snippet(client, pipe, token, language, client.staging))
|
|
170
170
|
if language != "http":
|
|
171
171
|
click.echo(FeedbackManager.success(message="\n✓ Code snippet copied to clipboard!\n"))
|
|
172
172
|
|
|
@@ -269,8 +269,10 @@ async def endpoint_stats(ctx: click.Context, pipes: Tuple[str, ...], format_: st
|
|
|
269
269
|
echo_safe_humanfriendly_tables_format_smart_table(table_human_readable, column_names=columns)
|
|
270
270
|
|
|
271
271
|
|
|
272
|
-
def build_endpoint_snippet(
|
|
273
|
-
|
|
272
|
+
def build_endpoint_snippet(
|
|
273
|
+
tb_client: TinyB, pipe_name: str, token: str, language: str, staging: bool = False
|
|
274
|
+
) -> Optional[str]:
|
|
275
|
+
endpoint_url = build_endpoint_url(tb_client, pipe_name, token, staging)
|
|
274
276
|
if language == "http":
|
|
275
277
|
return endpoint_url
|
|
276
278
|
|
|
@@ -293,13 +295,15 @@ def build_endpoint_snippet(tb_client: TinyB, pipe_name: str, token: str, languag
|
|
|
293
295
|
return snippet
|
|
294
296
|
|
|
295
297
|
|
|
296
|
-
def build_endpoint_url(tb_client: TinyB, pipe_name: str, token: str) -> str:
|
|
298
|
+
def build_endpoint_url(tb_client: TinyB, pipe_name: str, token: str, staging: bool = False) -> str:
|
|
297
299
|
example_params = {
|
|
298
300
|
"format": "json",
|
|
299
301
|
"pipe": pipe_name,
|
|
300
302
|
"q": "",
|
|
301
303
|
"token": token,
|
|
302
304
|
}
|
|
305
|
+
if staging:
|
|
306
|
+
example_params["__tb__deployment"] = "staging"
|
|
303
307
|
response = requests.get(f"{tb_client.host}/examples/query.http?{urlencode(example_params)}")
|
|
304
308
|
return response.text.replace("http://localhost:8001", tb_client.host)
|
|
305
309
|
|
|
@@ -466,7 +466,7 @@ class FeedbackManager:
|
|
|
466
466
|
info_releases_detected = info_message("** Live Release: {current_semver} => New Release: {semver}")
|
|
467
467
|
info_dry_releases_detected = info_message("** [DRY RUN] Live Release: {current_semver} => New Release: {semver}")
|
|
468
468
|
info_pre_prompt_auth_login_user_token = info_message(
|
|
469
|
-
"ℹ️ In order to log into Tinybird, you need your user token. Please, go to {host}/tokens/ and paste your User Token here."
|
|
469
|
+
"ℹ️ In order to log into Tinybird, you need your user token. Please, go to {host}/tokens/ and paste your User Token here." # noqa: RUF001
|
|
470
470
|
)
|
|
471
471
|
prompt_auth_login_user_token = prompt_message("❓ User token:")
|
|
472
472
|
|
|
@@ -617,7 +617,7 @@ Ready? """
|
|
|
617
617
|
)
|
|
618
618
|
warning_datasource_sync = warning_message("** Warning: Do you want to sync the Data Source {datasource}?")
|
|
619
619
|
warning_datasource_sync_bucket = warning_message(
|
|
620
|
-
"** Warning: Do you want to ingest all the selected files (new and previous) from the {datasource} bucket? Be aware that data might be duplicated if
|
|
620
|
+
"** Warning: Do you want to ingest all the selected files (new and previous) from the {datasource} bucket? Be aware that data might be duplicated if you have previously ingested those files.\n"
|
|
621
621
|
)
|
|
622
622
|
warning_users_dont_exist = warning_message(
|
|
623
623
|
"** Warning: The following users do not exist in the workspace {workspace}: {users}"
|
|
@@ -11,14 +11,14 @@ from tinybird.tb.modules.exceptions import CLIException
|
|
|
11
11
|
|
|
12
12
|
TB_IMAGE_NAME = "tinybirdco/tinybird-local:beta"
|
|
13
13
|
TB_CONTAINER_NAME = "tinybird-local"
|
|
14
|
-
TB_LOCAL_PORT = int(os.getenv("TB_LOCAL_PORT",
|
|
14
|
+
TB_LOCAL_PORT = int(os.getenv("TB_LOCAL_PORT", 7181))
|
|
15
15
|
TB_LOCAL_HOST = f"http://localhost:{TB_LOCAL_PORT}"
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
async def get_tinybird_local_client(config_obj: Dict[str, Any], build: bool = False,
|
|
18
|
+
async def get_tinybird_local_client(config_obj: Dict[str, Any], build: bool = False, staging: bool = False) -> TinyB:
|
|
19
19
|
"""Get a Tinybird client connected to the local environment."""
|
|
20
20
|
config = await get_tinybird_local_config(config_obj, build=build)
|
|
21
|
-
return config.get_client(host=TB_LOCAL_HOST,
|
|
21
|
+
return config.get_client(host=TB_LOCAL_HOST, staging=staging)
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
async def get_tinybird_local_config(config_obj: Dict[str, Any], build: bool = False) -> CLIConfig:
|
|
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-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/build_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/format_datasource.py
RENAMED
|
File without changes
|
|
File without changes
|
{tinybird-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb/modules/datafile/parse_datasource.py
RENAMED
|
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
|
|
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-0.0.1.dev71 → tinybird-0.0.1.dev72}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py
RENAMED
|
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
|