fivetran-connector-sdk 0.11.13.1__py3-none-any.whl → 0.11.14.1__py3-none-any.whl

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.
@@ -25,13 +25,13 @@ from fivetran_connector_sdk.protos import common_pb2
25
25
  from fivetran_connector_sdk.protos import connector_sdk_pb2
26
26
  from fivetran_connector_sdk.protos import connector_sdk_pb2_grpc
27
27
 
28
- __version__ = "0.11.13.1"
28
+ __version__ = "0.11.14.1"
29
29
 
30
30
  MAC_OS = "mac"
31
31
  WIN_OS = "windows"
32
32
  LINUX_OS = "linux"
33
33
 
34
- TESTER_VERSION = "0.24.1022.001"
34
+ TESTER_VERSION = "0.24.1113.001"
35
35
  TESTER_FILENAME = "run_sdk_tester.jar"
36
36
  VERSION_FILENAME = "version.txt"
37
37
  UPLOAD_FILENAME = "code.zip"
@@ -249,7 +249,7 @@ def check_newer_version():
249
249
  if (int(time.time()) - timestamp) < ONE_DAY_IN_SEC:
250
250
  return
251
251
 
252
- for _ in range(MAX_RETRIES):
252
+ for index in range(MAX_RETRIES):
253
253
  try:
254
254
  # check version and save current time
255
255
  response = rq.get(PYPI_PACKAGE_DETAILS_URL)
@@ -264,7 +264,9 @@ def check_newer_version():
264
264
  f_out.write(f"{int(time.time())}")
265
265
  break
266
266
  except Exception:
267
- time.sleep(5)
267
+ retry_after = 2 ** index
268
+ print(f"WARNING: Unable to check if a newer version of `fivetran-connector-sdk` is available. Retrying again after {retry_after} seconds")
269
+ time.sleep(retry_after)
268
270
 
269
271
 
270
272
  def _tester_root_dir() -> str:
@@ -606,11 +608,12 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
606
608
  return requirements
607
609
 
608
610
  # Call this method to deploy the connector to Fivetran platform
609
- def deploy(self, project_path: str, deploy_key: str, group: str, connection: str, configuration: dict = None):
611
+ def deploy(self, project_path: str, force: bool, deploy_key: str, group: str, connection: str, configuration: dict = None):
610
612
  """Deploys the connector to the Fivetran platform.
611
613
 
612
614
  Args:
613
615
  project_path (str): The path to the connector project.
616
+ force (bool): Force update an existing connection.
614
617
  deploy_key (str): The deployment key.
615
618
  group (str): The group name.
616
619
  connection (str): The connection name.
@@ -642,20 +645,24 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
642
645
  print(
643
646
  f"SEVERE: The connection '{connection}' already exists and does not use the 'Connector SDK' service. You cannot update this connection.")
644
647
  os._exit(1)
645
- confirm = input(
646
- f"The connection '{connection}' already exists in the destination '{group}'. Updating it will overwrite the existing code and configuration. Do you want to proceed with the update? (Y/N): ")
647
- if confirm.lower() == "y":
648
- print("INFO: Updating the connection...\n")
649
- self.__upload_project(
650
- project_path, deploy_key, group_id, group_name, connection)
651
- self.__update_connection(
652
- connection_id, connection, group_name, connection_config, deploy_key)
653
- print("✓")
654
- print(
655
- f"INFO: Visit the Fivetran dashboard to manage the connection: https://fivetran.com/dashboard/connectors/{connection_id}/status")
656
648
  else:
657
- print("INFO: Update canceled. The process is now terminating.")
658
- os._exit(1)
649
+ if force:
650
+ confirm = "y"
651
+ else:
652
+ confirm = input(
653
+ f"The connection '{connection}' already exists in the destination '{group}'. Updating it will overwrite the existing code and configuration. Do you want to proceed with the update? (Y/N): ")
654
+ if confirm.lower() == "y":
655
+ print("INFO: Updating the connection...\n")
656
+ self.__upload_project(
657
+ project_path, deploy_key, group_id, group_name, connection)
658
+ self.__update_connection(
659
+ connection_id, connection, group_name, connection_config, deploy_key)
660
+ print("✓")
661
+ print(
662
+ f"INFO: Visit the Fivetran dashboard to manage the connection: https://fivetran.com/dashboard/connectors/{connection_id}/status")
663
+ else:
664
+ print("INFO: Update canceled. The process is now terminating.")
665
+ os._exit(1)
659
666
  else:
660
667
  self.__upload_project(project_path, deploy_key,
661
668
  group_id, group_name, connection)
@@ -1375,6 +1382,7 @@ def main():
1375
1382
  parser.add_argument("--api-key", type=str, default=None, help="Provide api key for deployment to production")
1376
1383
  parser.add_argument("--destination", type=str, default=None, help="Destination name (aka 'group name')")
1377
1384
  parser.add_argument("--connection", type=str, default=None, help="Connection name (aka 'destination schema')")
1385
+ parser.add_argument("-f", "--force", action="store_true", help="Force update an existing connection")
1378
1386
 
1379
1387
  args = parser.parse_args()
1380
1388
 
@@ -1397,7 +1405,7 @@ def main():
1397
1405
  if args.command.lower() == "deploy":
1398
1406
  if args.state:
1399
1407
  print("WARNING: 'state' parameter is not used for 'deploy' command")
1400
- connector_object.deploy(args.project_path, ft_deploy_key, ft_group, ft_connection, configuration)
1408
+ connector_object.deploy(args.project_path, args.force, ft_deploy_key, ft_group, ft_connection, configuration)
1401
1409
 
1402
1410
  elif args.command.lower() == "debug":
1403
1411
  connector_object.debug(args.project_path, configuration, state)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fivetran_connector_sdk
3
- Version: 0.11.13.1
3
+ Version: 0.11.14.1
4
4
  Summary: Build custom connectors on Fivetran platform
5
5
  Author-email: Fivetran <developers@fivetran.com>
6
6
  Project-URL: Homepage, https://fivetran.com/docs/connectors/connector-sdk
@@ -33,7 +33,7 @@ To learn more, see our [Connector SDK documentation](https://fivetran.com/docs/c
33
33
  pip install fivetran-connector-sdk
34
34
 
35
35
  ## **Requirements**
36
- - Python ≥3.9 and ≤3.13
36
+ - Python ≥3.9 and ≤3.12
37
37
  - Operating System:
38
38
  - Windows 10 or later
39
39
  - MacOS 13 (Ventura) or later
@@ -1,4 +1,4 @@
1
- fivetran_connector_sdk/__init__.py,sha256=XpntUszNsJt75dSl-J9XMKtLptwTvC0hr2lqPcJVOz0,58165
1
+ fivetran_connector_sdk/__init__.py,sha256=eEtA9kXpAxIJDncDEWWGDwg0SYT2jAHXG2wN5heX4rA,58725
2
2
  fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  fivetran_connector_sdk/protos/common_pb2.py,sha256=kUwVcyZHgLigNR-KnHZn7dHrlxaMnUXqzprsRx6T72M,6831
4
4
  fivetran_connector_sdk/protos/common_pb2.pyi,sha256=S0hdIzoXyyOKD5cjiGeDDLYpQ9J3LjAvu4rCj1JvJWE,9038
@@ -6,8 +6,8 @@ fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
6
6
  fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=9Ke_Ti1s0vAeXapfXT-EryrT2-TSGQb8mhs4gxTpUMk,7732
7
7
  fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=FWYxRgshEF3QDYAE0TM_mv4N2gGvkxCH_uPpxnMc4oA,8406
8
8
  fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=ZfJLp4DW7uP4pFOZ74s_wQ6tD3eIPi-08UfnLwe4tzo,7163
9
- fivetran_connector_sdk-0.11.13.1.dist-info/METADATA,sha256=iHsMet1l5ctuqij_pptMTJ9fFJmVlgDYKEHfbvHzYgY,2858
10
- fivetran_connector_sdk-0.11.13.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
11
- fivetran_connector_sdk-0.11.13.1.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
12
- fivetran_connector_sdk-0.11.13.1.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
13
- fivetran_connector_sdk-0.11.13.1.dist-info/RECORD,,
9
+ fivetran_connector_sdk-0.11.14.1.dist-info/METADATA,sha256=qfyFHEuw7Pe4k9frNRdyq7I1sKABLOgHIWxBcaRHHqI,2858
10
+ fivetran_connector_sdk-0.11.14.1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
11
+ fivetran_connector_sdk-0.11.14.1.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
12
+ fivetran_connector_sdk-0.11.14.1.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
13
+ fivetran_connector_sdk-0.11.14.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.5.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5