tinybird 0.0.1.dev79__tar.gz → 0.0.1.dev81__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.

Files changed (103) hide show
  1. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/PKG-INFO +1 -1
  2. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/client.py +2 -1
  3. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/__cli__.py +2 -2
  4. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/cli.py +1 -1
  5. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/config.py +1 -4
  6. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/create.py +19 -10
  7. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/deployment.py +26 -10
  8. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/connection.py +9 -2
  9. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/PKG-INFO +1 -1
  10. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/setup.cfg +0 -0
  11. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/__cli__.py +0 -0
  12. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/ch_utils/constants.py +0 -0
  13. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/ch_utils/engine.py +0 -0
  14. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/check_pypi.py +0 -0
  15. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/config.py +0 -0
  16. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/connectors.py +0 -0
  17. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/context.py +0 -0
  18. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/datafile.py +0 -0
  19. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/datatypes.py +0 -0
  20. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/feedback_manager.py +0 -0
  21. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/git_settings.py +0 -0
  22. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/prompts.py +0 -0
  23. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/sql.py +0 -0
  24. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/sql_template.py +0 -0
  25. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/sql_template_fmt.py +0 -0
  26. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/sql_toolset.py +0 -0
  27. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/syncasync.py +0 -0
  28. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/cli.py +0 -0
  29. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/auth.py +0 -0
  30. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/build.py +0 -0
  31. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/cicd.py +0 -0
  32. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/common.py +0 -0
  33. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/copy.py +0 -0
  34. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/build.py +0 -0
  35. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/build_common.py +0 -0
  36. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/build_datasource.py +0 -0
  37. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/build_pipe.py +0 -0
  38. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/common.py +0 -0
  39. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/diff.py +0 -0
  40. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/exceptions.py +0 -0
  41. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/fixture.py +0 -0
  42. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/format_common.py +0 -0
  43. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/format_datasource.py +0 -0
  44. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/format_pipe.py +0 -0
  45. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/parse_datasource.py +0 -0
  46. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/parse_pipe.py +0 -0
  47. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/pipe_checker.py +0 -0
  48. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/playground.py +0 -0
  49. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datafile/pull.py +0 -0
  50. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/datasource.py +0 -0
  51. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/endpoint.py +0 -0
  52. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/exceptions.py +0 -0
  53. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/feedback_manager.py +0 -0
  54. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/fmt.py +0 -0
  55. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/job.py +0 -0
  56. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/llm.py +0 -0
  57. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/llm_utils.py +0 -0
  58. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/local.py +0 -0
  59. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/local_common.py +0 -0
  60. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/login.py +0 -0
  61. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/materialization.py +0 -0
  62. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/mock.py +0 -0
  63. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/pipe.py +0 -0
  64. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/playground.py +0 -0
  65. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/project.py +0 -0
  66. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/regions.py +0 -0
  67. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/shell.py +0 -0
  68. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/table.py +0 -0
  69. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/tag.py +0 -0
  70. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/telemetry.py +0 -0
  71. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/test.py +0 -0
  72. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/tinyunit/tinyunit.py +0 -0
  73. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/tinyunit/tinyunit_lib.py +0 -0
  74. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/token.py +0 -0
  75. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/watch.py +0 -0
  76. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/workspace.py +0 -0
  77. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb/modules/workspace_members.py +0 -0
  78. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli.py +0 -0
  79. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/auth.py +0 -0
  80. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/branch.py +0 -0
  81. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/cicd.py +0 -0
  82. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/cli.py +0 -0
  83. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/common.py +0 -0
  84. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/config.py +0 -0
  85. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/datasource.py +0 -0
  86. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/exceptions.py +0 -0
  87. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/fmt.py +0 -0
  88. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/job.py +0 -0
  89. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/pipe.py +0 -0
  90. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/regions.py +0 -0
  91. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/tag.py +0 -0
  92. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/telemetry.py +0 -0
  93. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/test.py +0 -0
  94. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/tinyunit/tinyunit.py +0 -0
  95. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/tinyunit/tinyunit_lib.py +0 -0
  96. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/workspace.py +0 -0
  97. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tb_cli_modules/workspace_members.py +0 -0
  98. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird/tornado_template.py +0 -0
  99. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/SOURCES.txt +0 -0
  100. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/dependency_links.txt +0 -0
  101. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/entry_points.txt +0 -0
  102. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/requires.txt +0 -0
  103. {tinybird-0.0.1.dev79 → tinybird-0.0.1.dev81}/tinybird.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev79
3
+ Version: 0.0.1.dev81
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
@@ -924,11 +924,12 @@ class TinyB:
924
924
  kafka_auto_offset_reset=None,
925
925
  kafka_schema_registry_url=None,
926
926
  kafka_sasl_mechanism="PLAIN",
927
+ kafka_security_protocol="SASL_SSL",
927
928
  kafka_ssl_ca_pem=None,
928
929
  ):
929
930
  params = {
930
931
  "service": "kafka",
931
- "kafka_security_protocol": "SASL_SSL",
932
+ "kafka_security_protocol": kafka_security_protocol,
932
933
  "kafka_sasl_mechanism": kafka_sasl_mechanism,
933
934
  "kafka_bootstrap_servers": kafka_bootstrap_servers,
934
935
  "kafka_sasl_plain_username": kafka_key,
@@ -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.dev79'
8
- __revision__ = 'f126631'
7
+ __version__ = '0.0.1.dev81'
8
+ __revision__ = 'd577324'
@@ -88,7 +88,6 @@ async def cli(
88
88
  logging.basicConfig(level=logging.DEBUG)
89
89
 
90
90
  config_temp = CLIConfig.get_project_config()
91
- project = Project(folder=config_temp.cwd)
92
91
 
93
92
  if token:
94
93
  config_temp.set_token(token)
@@ -132,6 +131,7 @@ async def cli(
132
131
  if client:
133
132
  ctx.ensure_object(dict)["client"] = client
134
133
 
134
+ project = Project(folder=config.get("cwd", os.getcwd()))
135
135
  ctx.ensure_object(dict)["project"] = project
136
136
  ctx.ensure_object(dict)["env"] = get_target_env(cloud, build)
137
137
 
@@ -146,9 +146,6 @@ class CLIConfig:
146
146
  values: Dict[str, Any] = json.loads(file.read())
147
147
  for k, v in values.items():
148
148
  self[k] = v
149
- if "cwd" in values:
150
- self.set_cwd(values["cwd"])
151
-
152
149
  return True
153
150
  except OSError:
154
151
  return False
@@ -212,7 +209,7 @@ class CLIConfig:
212
209
  self["host"] = f"{scheme}://{netloc}"
213
210
 
214
211
  def set_cwd(self, cwd: str) -> None:
215
- self.cwd = os.path.join(os.path.dirname(self._path) if self._path else os.getcwd(), cwd)
212
+ self["cwd"] = cwd
216
213
 
217
214
  def get_host(self, use_defaults_if_needed: bool = False) -> Optional[str]:
218
215
  result: Optional[str] = self.get("host", None)
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import re
3
3
  from pathlib import Path
4
- from typing import Optional
4
+ from typing import Optional, Tuple
5
5
 
6
6
  import click
7
7
 
@@ -64,7 +64,7 @@ async def create(
64
64
  try:
65
65
  tb_client = config.get_client()
66
66
  user_token: Optional[str] = None
67
- created = False
67
+ created_something = False
68
68
  if prompt:
69
69
  try:
70
70
  user_token = config.get_user_token()
@@ -83,11 +83,13 @@ async def create(
83
83
  click.echo(FeedbackManager.highlight(message="\n» Creating new project structure..."))
84
84
  create_project_structure(folder)
85
85
  click.echo(FeedbackManager.success(message="✓ Scaffolding completed!\n"))
86
- created = True
86
+ created_something = True
87
87
  result = ""
88
88
  if data or prompt:
89
89
  click.echo(FeedbackManager.highlight(message="\n» Creating resources..."))
90
- result = await create_resources(local_client, tb_client, user_token, data, prompt, folder)
90
+ result, created_something = await create_resources(
91
+ local_client, tb_client, user_token, data, prompt, folder
92
+ )
91
93
  click.echo(FeedbackManager.success(message="✓ Done!\n"))
92
94
 
93
95
  if not already_has_cicd(root_folder):
@@ -95,12 +97,14 @@ async def create(
95
97
  init_git(root_folder)
96
98
  await init_cicd(root_folder, data_project_dir=os.path.relpath(folder))
97
99
  click.echo(FeedbackManager.success(message="✓ Done!\n"))
100
+ created_something = True
98
101
 
99
102
  if not already_has_cursor_rules(root_folder):
100
103
  click.echo(FeedbackManager.highlight(message="\n» Creating .cursorrules..."))
101
104
  create_rules(root_folder, "tb", agent)
102
105
  click.echo(FeedbackManager.success(message="✓ Done!\n"))
103
- created = True
106
+ created_something = True
107
+
104
108
  if should_generate_fixtures(result):
105
109
  click.echo(FeedbackManager.highlight(message="\n» Generating fixtures..."))
106
110
 
@@ -110,7 +114,7 @@ async def create(
110
114
  datasource_path = Path(folder) / "datasources" / f"{ds_name}.datasource"
111
115
  click.echo(FeedbackManager.info(message=f"✓ /fixtures/{ds_name}"))
112
116
  persist_fixture(ds_name, data_content, folder)
113
- created = True
117
+ created_something = True
114
118
  elif prompt and user_token:
115
119
  datasource_files = [f for f in os.listdir(Path(folder) / "datasources") if f.endswith(".datasource")]
116
120
  for datasource_file in datasource_files:
@@ -129,8 +133,9 @@ async def create(
129
133
  if data:
130
134
  persist_fixture(datasource_name, data, folder)
131
135
  click.echo(FeedbackManager.info(message=f"✓ /fixtures/{datasource_name}"))
132
- created = True
133
- if not created:
136
+ created_something = True
137
+
138
+ if not created_something:
134
139
  click.echo(FeedbackManager.warning(message="△ No resources created\n"))
135
140
  except Exception as e:
136
141
  click.echo(FeedbackManager.error(message=f"Error: {str(e)}"))
@@ -185,8 +190,9 @@ async def create_resources(
185
190
  data: Optional[str],
186
191
  prompt: Optional[str],
187
192
  folder: str,
188
- ):
193
+ ) -> Tuple[str, bool]:
189
194
  result = ""
195
+ created_any_resource = False
190
196
  folder_path = Path(folder)
191
197
  if data:
192
198
  path = folder_path / data
@@ -206,6 +212,7 @@ TYPE ENDPOINT
206
212
  result = (
207
213
  f"<response><resource><type>datasource</type><name>{name}</name><content></content></resource></response>"
208
214
  )
215
+ created_any_resource = True
209
216
 
210
217
  elif prompt and user_token:
211
218
  datasource_paths = [
@@ -262,12 +269,14 @@ TYPE ENDPOINT
262
269
  force=True,
263
270
  folder=folder,
264
271
  )
272
+ created_any_resource = True
265
273
 
266
274
  for pipe in pipes:
267
275
  content = pipe["content"].replace("```", "")
268
276
  generate_pipe_file(pipe["name"], content, folder)
277
+ created_any_resource = True
269
278
 
270
- return result
279
+ return result, created_any_resource
271
280
 
272
281
 
273
282
  def init_git(folder: str):
@@ -15,6 +15,23 @@ from tinybird.tb.modules.feedback_manager import FeedbackManager
15
15
  from tinybird.tb.modules.project import Project
16
16
 
17
17
 
18
+ # TODO(eclbg): This should eventually end up in client.py, but we're not using it here yet.
19
+ def api_fetch(url: str, headers: dict) -> dict:
20
+ r = requests.get(url, headers=headers)
21
+ if r.status_code == 200:
22
+ return r.json()
23
+ # Try to parse and print the error from the response
24
+ try:
25
+ result = r.json()
26
+ error = result.get("error")
27
+ logging.debug(json.dumps(result, indent=2))
28
+ click.echo(FeedbackManager.error(message=f"Error: {error}"))
29
+ sys.exit(1)
30
+ except Exception:
31
+ click.echo(FeedbackManager.error(message="Error parsing response from API"))
32
+ sys.exit(1)
33
+
34
+
18
35
  # TODO(eclbg): This logic should be in the server, and there should be a dedicated endpoint for promoting a deployment
19
36
  # potato
20
37
  def promote_deployment(host: Optional[str], headers: dict, wait: bool) -> None:
@@ -197,16 +214,15 @@ def deployment_ls(ctx: click.Context) -> None:
197
214
 
198
215
  TINYBIRD_API_KEY = client.token
199
216
  HEADERS = {"Authorization": f"Bearer {TINYBIRD_API_KEY}"}
200
- TINYBIRD_API_URL = f"{client.host}/v1/deployments"
217
+ url = f"{client.host}/v1/deployments"
201
218
 
202
- r = requests.get(TINYBIRD_API_URL, headers=HEADERS)
203
- result = r.json()
219
+ result = api_fetch(url, HEADERS)
204
220
  logging.debug(json.dumps(result, indent=2))
205
221
 
206
222
  status_map = {"data_ready": "Ready", "failed": "Failed"}
207
223
  columns = ["ID", "Status", "Created at", "Live"]
208
224
  table = []
209
- for deployment in result.get("deployments"):
225
+ for deployment in result.get("deployments", []):
210
226
  if deployment.get("id") == "0":
211
227
  continue
212
228
 
@@ -402,12 +418,12 @@ def create_deployment(
402
418
 
403
419
  if deployment and wait and not check:
404
420
  while True:
405
- TINYBIRD_API_URL = f"{client.host}/v1/deployments/{deployment.get('id')}"
406
- r = requests.get(TINYBIRD_API_URL, headers=HEADERS)
407
- result = r.json()
408
- logging.debug(json.dumps(result, indent=2))
409
-
410
- deployment = result.get("deployment")
421
+ url = f"{client.host}/v1/deployments/{deployment.get('id')}"
422
+ res = api_fetch(url, HEADERS)
423
+ deployment = res.get("deployment")
424
+ if not deployment:
425
+ click.echo(FeedbackManager.error(message="Error parsing deployment from response"))
426
+ sys.exit(1)
411
427
  if deployment.get("status") == "failed":
412
428
  click.echo(FeedbackManager.error(message="Deployment failed"))
413
429
  deploy_errors = deployment.get("errors")
@@ -135,6 +135,11 @@ def connection_create(ctx: Context) -> None:
135
135
  default="PLAIN",
136
136
  help="Authentication method for connection-based protocols. Defaults to 'PLAIN'",
137
137
  )
138
+ @click.option(
139
+ "--security-protocol",
140
+ default="SASL_SSL",
141
+ help="Security protocol for connection-based protocols. Defaults to 'SASL_SSL'",
142
+ )
138
143
  @click.option("--ssl-ca-pem", default=None, help="Path or content of the CA Certificate file in PEM format")
139
144
  @click.pass_context
140
145
  @coro
@@ -147,6 +152,7 @@ async def connection_create_kafka(
147
152
  auto_offset_reset: Optional[str],
148
153
  schema_registry_url: Optional[str],
149
154
  sasl_mechanism: Optional[str],
155
+ security_protocol: Optional[str],
150
156
  ssl_ca_pem: Optional[str],
151
157
  ) -> None:
152
158
  """
@@ -165,10 +171,10 @@ async def connection_create_kafka(
165
171
  if not bootstrap_servers:
166
172
  bootstrap_servers = click.prompt("Kafka Bootstrap Server")
167
173
  validate_kafka_bootstrap_servers(bootstrap_servers)
168
- if not key:
174
+ if key is None:
169
175
  key = click.prompt("Key")
170
176
  validate_kafka_key(key)
171
- if not secret:
177
+ if secret is None:
172
178
  secret = click.prompt("Secret", hide_input=True)
173
179
  validate_kafka_secret(secret)
174
180
  if not connection_name:
@@ -187,6 +193,7 @@ async def connection_create_kafka(
187
193
  auto_offset_reset,
188
194
  schema_registry_url,
189
195
  sasl_mechanism,
196
+ security_protocol,
190
197
  get_ca_pem_content(ssl_ca_pem),
191
198
  )
192
199
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tinybird
3
- Version: 0.0.1.dev79
3
+ Version: 0.0.1.dev81
4
4
  Summary: Tinybird Command Line Tool
5
5
  Home-page: https://www.tinybird.co/docs/cli/introduction.html
6
6
  Author: Tinybird
File without changes