outerbounds 0.3.180rc2__py3-none-any.whl → 0.3.180rc4__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.
@@ -46,6 +46,8 @@ from .capsule import (
46
46
  list_and_filter_capsules,
47
47
  CapsuleApi,
48
48
  DEPLOYMENT_READY_CONDITIONS,
49
+ CapsuleApiException,
50
+ CapsuleDeploymentException,
49
51
  )
50
52
  from .dependencies import bake_deployment_image
51
53
  import shlex
@@ -746,12 +748,13 @@ def deploy(
746
748
  system_msg=True,
747
749
  )
748
750
 
749
- except AppConfigError as e:
750
- click.echo(f"Error in app configuration: {e}", err=True)
751
- raise e
752
751
  except Exception as e:
753
- click.echo(f"Error deploying app: {e}", err=True)
754
- raise e
752
+ logger(
753
+ f"Deployment failed: [{e.__class__.__name__}]: {e}",
754
+ bad=True,
755
+ system_msg=True,
756
+ )
757
+ exit(1)
755
758
 
756
759
 
757
760
  def _parse_capsule_table(filtered_capsules):
@@ -492,7 +492,11 @@ class CapsuleApi:
492
492
  response = self._wrapped_api_caller(
493
493
  requests.get,
494
494
  _url,
495
- retryable_status_codes=[409], # todo : verify me
495
+ retryable_status_codes=[409, 404], # todo : verify me
496
+ # Adding 404s because sometimes we might even end up getting 404s if
497
+ # the backend cache is not updated yet. So on consistent 404s we should
498
+ # just crash out.
499
+ conn_error_retries=3,
496
500
  )
497
501
  try:
498
502
  return response.json().get("workers", []) or []
@@ -26,12 +26,12 @@ class ImageBakingException(Exception):
26
26
 
27
27
  def _safe_open_file(path: str):
28
28
  if not os.path.exists(path):
29
- raise TODOException(f"File does not exist: {path}")
29
+ raise ImageBakingException(f"File does not exist: {path}")
30
30
  try:
31
31
  with open(path, "r") as f:
32
32
  return f.read()
33
33
  except Exception as e:
34
- raise TODOException(f"Failed to open file: {e}")
34
+ raise ImageBakingException(f"Failed to open file: {e}")
35
35
 
36
36
 
37
37
  def bake_deployment_image(
@@ -133,8 +133,8 @@ class SecretRetriever:
133
133
 
134
134
  request_headers = {**headers, **(SERVICE_HEADERS or {})}
135
135
  except ImportError:
136
- raise TODOException(
137
- "Failed to create capsule: No Metaflow service headers found"
136
+ raise OuterboundsSecretsException(
137
+ "Failed to create app: No Metaflow service headers found"
138
138
  )
139
139
 
140
140
  response = safe_requests_wrapper(
outerbounds/apps/utils.py CHANGED
@@ -352,7 +352,7 @@ def safe_requests_wrapper(
352
352
  there can be intermittent issues that would resolve themselves if we retry gracefully.
353
353
  """
354
354
  if requests_module_fn not in requests_funcs:
355
- raise TODOException(
355
+ raise ValueError(
356
356
  f"safe_requests_wrapper doesn't support {requests_module_fn.__name__}. You can only use the following functions: {requests_funcs}"
357
357
  )
358
358
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: outerbounds
3
- Version: 0.3.180rc2
3
+ Version: 0.3.180rc4
4
4
  Summary: More Data Science, Less Administration
5
5
  License: Proprietary
6
6
  Keywords: data science,machine learning,MLOps
@@ -29,8 +29,8 @@ Requires-Dist: google-cloud-secret-manager (>=2.20.0,<3.0.0) ; extra == "gcp"
29
29
  Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0) ; extra == "gcp"
30
30
  Requires-Dist: metaflow-checkpoint (==0.2.1)
31
31
  Requires-Dist: ob-metaflow (==2.15.17.1)
32
- Requires-Dist: ob-metaflow-extensions (==1.1.168rc2)
33
- Requires-Dist: ob-metaflow-stubs (==6.0.3.180rc2)
32
+ Requires-Dist: ob-metaflow-extensions (==1.1.168rc4)
33
+ Requires-Dist: ob-metaflow-stubs (==6.0.3.180rc4)
34
34
  Requires-Dist: opentelemetry-distro (>=0.41b0) ; extra == "otel"
35
35
  Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.20.0) ; extra == "otel"
36
36
  Requires-Dist: opentelemetry-instrumentation-requests (>=0.41b0) ; extra == "otel"
@@ -44,21 +44,21 @@ outerbounds/_vendor/yaml/serializer.py,sha256=8wFZRy9SsQSktF_f9OOroroqsh4qVUe53r
44
44
  outerbounds/_vendor/yaml/tokens.py,sha256=JBSu38wihGr4l73JwbfMA7Ks1-X84g8-NskTz7KwPmA,2578
45
45
  outerbounds/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  outerbounds/apps/_state_machine.py,sha256=3hQF5O2zJdtQWdy9e5w393O85u6UjGApqTMlRU3UhFk,12964
47
- outerbounds/apps/app_cli.py,sha256=IK6VhCwvOXIm9TWYiPxxIbARw-4vxR78ZK1u27-zVlg,44735
47
+ outerbounds/apps/app_cli.py,sha256=FfONKmfTzI0jJmGfBq5APWVJmFDbcvrsEKi78aaXfj0,44763
48
48
  outerbounds/apps/app_config.py,sha256=KBmW9grhiuG9XZG-R0GZkM-024cjj6ztGzOX_2wZW34,11291
49
49
  outerbounds/apps/artifacts.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- outerbounds/apps/capsule.py,sha256=2B_d_zuoQzN4Qs3Tiw_v9EwD7ToQLy8_83rWmVjBz48,30693
50
+ outerbounds/apps/capsule.py,sha256=YoOkUYGPrbXPaSUwS3teui1XPJDZCIxn-9tPpm1X0GM,30927
51
51
  outerbounds/apps/cli_to_config.py,sha256=9IIrJbiaNXoUruCh1s23KbzN87Qyc_MPfqLqXM3nEaE,3275
52
52
  outerbounds/apps/code_package/__init__.py,sha256=8McF7pgx8ghvjRnazp2Qktlxi9yYwNiwESSQrk-2oW8,68
53
53
  outerbounds/apps/code_package/code_packager.py,sha256=RWvM5BKjgLhu7icsO_n5SSYC57dwyST0dWpoWF88ovU,22881
54
54
  outerbounds/apps/code_package/examples.py,sha256=aF8qKIJxCVv_ugcShQjqUsXKKKMsm1oMkQIl8w3QKuw,4016
55
55
  outerbounds/apps/config_schema.yaml,sha256=j_mysTAPkIMSocItTg3aduMDfBs2teIhAErvpF0Elus,8826
56
- outerbounds/apps/dependencies.py,sha256=SqvdFQdFZZW0wXX_CHMHCrfE0TwaRkTvGCRbQ2Mx3q0,3935
56
+ outerbounds/apps/dependencies.py,sha256=UucyQYZ5VjUPBb3XzAARa4fuiLHXuV7iMZ8OZ_nAuE8,3949
57
57
  outerbounds/apps/deployer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  outerbounds/apps/experimental/__init__.py,sha256=ExPFIJSF8FcE1pKVyiNQnX8aBi3Rz8YFQ2_s5NVeU7I,3056
59
59
  outerbounds/apps/perimeters.py,sha256=DKWKMbkSx8WObf4yA74UolleT417B9c_6POioztMHxY,1766
60
- outerbounds/apps/secrets.py,sha256=27qf04lOBqRjvcswj0ldHOmntP2T6SEjtMJtkJQ_GUg,6100
61
- outerbounds/apps/utils.py,sha256=CC5xBKz1N0b8mNYZzJjblT30H_FfHLoS9_gdEArDc4A,12121
60
+ outerbounds/apps/secrets.py,sha256=sBMJzwjsARhtcuxgn18i66lagllpYOlh2oXR_hVAb1Y,6110
61
+ outerbounds/apps/utils.py,sha256=NbEpSrzk-l95EBFoWuxil_0xjpIuFt0jjIXD2r1w71M,12118
62
62
  outerbounds/apps/validations.py,sha256=kR2eXckx0XJ4kUOOLkMRepbTh0INtL1Z8aV4-fZpfc8,678
63
63
  outerbounds/cli_main.py,sha256=e9UMnPysmc7gbrimq2I4KfltggyU7pw59Cn9aEguVcU,74
64
64
  outerbounds/command_groups/__init__.py,sha256=QPWtj5wDRTINDxVUL7XPqG3HoxHNvYOg08EnuSZB2Hc,21
@@ -76,7 +76,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
76
76
  outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
77
77
  outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
78
78
  outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
79
- outerbounds-0.3.180rc2.dist-info/METADATA,sha256=w__jQJnKxKIrW0_wSa_9jpogVOxx08OXKK00XngnYfY,1846
80
- outerbounds-0.3.180rc2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
81
- outerbounds-0.3.180rc2.dist-info/entry_points.txt,sha256=AP6rZg7y5SK9e9a9iVq0Fi9Q2KPjPZSwtZ6R98rLw-8,56
82
- outerbounds-0.3.180rc2.dist-info/RECORD,,
79
+ outerbounds-0.3.180rc4.dist-info/METADATA,sha256=TzNa7b91XFl1ZaQIBEPoZICgaod09sSxkfz5hMqFp8k,1846
80
+ outerbounds-0.3.180rc4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
81
+ outerbounds-0.3.180rc4.dist-info/entry_points.txt,sha256=AP6rZg7y5SK9e9a9iVq0Fi9Q2KPjPZSwtZ6R98rLw-8,56
82
+ outerbounds-0.3.180rc4.dist-info/RECORD,,