outerbounds 0.3.176rc1__py3-none-any.whl → 0.3.176rc3__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.
- outerbounds/apps/app_cli.py +4 -4
- outerbounds/apps/capsule.py +17 -9
- outerbounds/apps/config_schema.yaml +1 -1
- {outerbounds-0.3.176rc1.dist-info → outerbounds-0.3.176rc3.dist-info}/METADATA +3 -3
- {outerbounds-0.3.176rc1.dist-info → outerbounds-0.3.176rc3.dist-info}/RECORD +7 -7
- {outerbounds-0.3.176rc1.dist-info → outerbounds-0.3.176rc3.dist-info}/WHEEL +0 -0
- {outerbounds-0.3.176rc1.dist-info → outerbounds-0.3.176rc3.dist-info}/entry_points.txt +0 -0
outerbounds/apps/app_cli.py
CHANGED
@@ -525,9 +525,8 @@ def _parse_capsule_table(filtered_capsules):
|
|
525
525
|
|
526
526
|
for capsule in filtered_capsules:
|
527
527
|
spec = capsule.get("spec", {})
|
528
|
-
status = capsule.get("status", {})
|
528
|
+
status = capsule.get("status", {}) or {}
|
529
529
|
cap_id = capsule.get("id")
|
530
|
-
|
531
530
|
display_name = spec.get("displayName", "")
|
532
531
|
ready = str(status.get("readyToServeTraffic", False))
|
533
532
|
auth_type = spec.get("authConfig", {}).get("authType", "")
|
@@ -535,7 +534,8 @@ def _parse_capsule_table(filtered_capsules):
|
|
535
534
|
tags_str = ", ".join(
|
536
535
|
[f"{tag['key']}={tag['value']}" for tag in spec.get("tags", [])]
|
537
536
|
)
|
538
|
-
|
537
|
+
access_info = status.get("accessInfo", {}) or {}
|
538
|
+
url = access_info.get("outOfClusterURL", None)
|
539
539
|
|
540
540
|
table_data.append(
|
541
541
|
[
|
@@ -545,7 +545,7 @@ def _parse_capsule_table(filtered_capsules):
|
|
545
545
|
auth_type,
|
546
546
|
port,
|
547
547
|
tags_str,
|
548
|
-
f"https://{url}",
|
548
|
+
f"https://{url}" if url else "URL not available",
|
549
549
|
]
|
550
550
|
)
|
551
551
|
return headers, table_data
|
outerbounds/apps/capsule.py
CHANGED
@@ -70,14 +70,16 @@ class CapsuleStateMachine:
|
|
70
70
|
|
71
71
|
@property
|
72
72
|
def out_of_cluster_url(self):
|
73
|
-
|
73
|
+
access_info = self.current_status.get("accessInfo", {}) or {}
|
74
|
+
url = access_info.get("outOfClusterURL", None)
|
74
75
|
if url is not None:
|
75
76
|
return f"https://{url}"
|
76
77
|
return None
|
77
78
|
|
78
79
|
@property
|
79
80
|
def in_cluster_url(self):
|
80
|
-
|
81
|
+
access_info = self.current_status.get("accessInfo", {}) or {}
|
82
|
+
url = access_info.get("inClusterURL", None)
|
81
83
|
if url is not None:
|
82
84
|
return f"https://{url}"
|
83
85
|
return None
|
@@ -230,7 +232,7 @@ def create_capsule(capsule_input: dict, api_url: str, request_headers: dict):
|
|
230
232
|
retryable_status_codes=[409], # todo : verify me
|
231
233
|
)
|
232
234
|
|
233
|
-
if response.status_code
|
235
|
+
if response.status_code >= 400:
|
234
236
|
raise TODOException(
|
235
237
|
f"Failed to create capsule: {response.status_code} {response.text}"
|
236
238
|
)
|
@@ -245,7 +247,7 @@ def list_capsules(api_url: str, request_headers: dict):
|
|
245
247
|
retryable_status_codes=[409], # todo : verify me
|
246
248
|
conn_error_retries=3,
|
247
249
|
)
|
248
|
-
if response.status_code
|
250
|
+
if response.status_code >= 400:
|
249
251
|
raise TODOException(
|
250
252
|
f"Failed to list capsules: {response.status_code} {response.text}"
|
251
253
|
)
|
@@ -262,7 +264,7 @@ def get_capsule(capsule_id: str, api_url: str, request_headers: dict):
|
|
262
264
|
retryable_status_codes=[409, 404], # todo : verify me
|
263
265
|
conn_error_retries=3,
|
264
266
|
)
|
265
|
-
if response.status_code
|
267
|
+
if response.status_code >= 400:
|
266
268
|
raise TODOException(
|
267
269
|
f"Failed to get capsule: {response.status_code} {response.text}"
|
268
270
|
)
|
@@ -277,12 +279,14 @@ def delete_capsule(capsule_id: str, api_url: str, request_headers: dict):
|
|
277
279
|
headers=request_headers,
|
278
280
|
retryable_status_codes=[409], # todo : verify me
|
279
281
|
)
|
280
|
-
if response.status_code
|
282
|
+
if response.status_code >= 400:
|
281
283
|
raise TODOException(
|
282
284
|
f"Failed to delete capsule: {response.status_code} {response.text}"
|
283
285
|
)
|
284
286
|
|
285
|
-
|
287
|
+
if response.status_code == 200:
|
288
|
+
return True
|
289
|
+
return False
|
286
290
|
|
287
291
|
|
288
292
|
def list_capsules(api_url: str, request_headers: dict):
|
@@ -364,7 +368,7 @@ class Capsule:
|
|
364
368
|
_capsules = list_capsules(base_url, request_headers)
|
365
369
|
if "capsules" not in _capsules:
|
366
370
|
raise TODOException(f"Failed to list capsules")
|
367
|
-
return _capsules.get("capsules", [])
|
371
|
+
return _capsules.get("capsules", []) or []
|
368
372
|
|
369
373
|
@classmethod
|
370
374
|
def delete(cls, identifier: str, base_url: str, perimeter: str):
|
@@ -449,6 +453,7 @@ class Capsule:
|
|
449
453
|
"💊 Waiting for %s %s to be ready to serve traffic"
|
450
454
|
% (self.capsule_type.lower(), self.identifier)
|
451
455
|
)
|
456
|
+
self.status = state_machine
|
452
457
|
for i in range(self._create_timeout):
|
453
458
|
capsule_response = self.get()
|
454
459
|
state_machine.add_status(capsule_response.get("status", {}))
|
@@ -463,9 +468,12 @@ class Capsule:
|
|
463
468
|
state_machine.out_of_cluster_url,
|
464
469
|
),
|
465
470
|
)
|
466
|
-
self.status = state_machine
|
467
471
|
break
|
468
472
|
if self._debug_dir:
|
469
473
|
state_machine.check_for_debug(self._debug_dir)
|
470
474
|
|
475
|
+
if not self.status.ready_to_serve_traffic:
|
476
|
+
raise TODOException(
|
477
|
+
f"Capsule {self.identifier} failed to be ready to serve traffic"
|
478
|
+
)
|
471
479
|
return capsule_response
|
@@ -53,7 +53,7 @@ properties:
|
|
53
53
|
description: Outerbounds integrations to attach to the app. You can use the value you set in the `@secrets` decorator in your code.
|
54
54
|
items:
|
55
55
|
type: string
|
56
|
-
example: ["
|
56
|
+
example: ["hf-token"]
|
57
57
|
environment: # Used in `run` command
|
58
58
|
# Todo: So this part might not be best on the CLI. We should probably have a better way to handle this.
|
59
59
|
# In simplicity, we can just JSON dump anything that looks like a dict/list/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: outerbounds
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.176rc3
|
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.14.1)
|
32
|
-
Requires-Dist: ob-metaflow-extensions (==1.1.
|
33
|
-
Requires-Dist: ob-metaflow-stubs (==6.0.3.
|
32
|
+
Requires-Dist: ob-metaflow-extensions (==1.1.163rc4)
|
33
|
+
Requires-Dist: ob-metaflow-stubs (==6.0.3.176rc3)
|
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"
|
@@ -40,15 +40,15 @@ outerbounds/_vendor/yaml/scanner.py,sha256=ZcI8IngR56PaQ0m27WU2vxCqmDCuRjz-hr7pi
|
|
40
40
|
outerbounds/_vendor/yaml/serializer.py,sha256=8wFZRy9SsQSktF_f9OOroroqsh4qVUe53ry07P9UgCc,4368
|
41
41
|
outerbounds/_vendor/yaml/tokens.py,sha256=JBSu38wihGr4l73JwbfMA7Ks1-X84g8-NskTz7KwPmA,2578
|
42
42
|
outerbounds/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
outerbounds/apps/app_cli.py,sha256=
|
43
|
+
outerbounds/apps/app_cli.py,sha256=zbzFOYpRkgFVtBhcZGl0sn8BkL6w0uc9PNMx25CECfA,23456
|
44
44
|
outerbounds/apps/app_config.py,sha256=KBmW9grhiuG9XZG-R0GZkM-024cjj6ztGzOX_2wZW34,11291
|
45
45
|
outerbounds/apps/artifacts.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
|
-
outerbounds/apps/capsule.py,sha256=
|
46
|
+
outerbounds/apps/capsule.py,sha256=bxXlm4mc3uwu6KbHmRC7NpsMU0IHBm6yeFvytaIAst8,16957
|
47
47
|
outerbounds/apps/cli_to_config.py,sha256=hV6rfPgCiAX03O363GkvdjSIJBt3-oSbL6F2sTUucFE,3195
|
48
48
|
outerbounds/apps/code_package/__init__.py,sha256=8McF7pgx8ghvjRnazp2Qktlxi9yYwNiwESSQrk-2oW8,68
|
49
49
|
outerbounds/apps/code_package/code_packager.py,sha256=SQDBXKwizzpag5GpwoZpvvkyPOodRSQwk2ecAAfO0HI,23316
|
50
50
|
outerbounds/apps/code_package/examples.py,sha256=aF8qKIJxCVv_ugcShQjqUsXKKKMsm1oMkQIl8w3QKuw,4016
|
51
|
-
outerbounds/apps/config_schema.yaml,sha256=
|
51
|
+
outerbounds/apps/config_schema.yaml,sha256=R1sSKFroqCSkcJScdAKU2vCvhgdFt_PJNZzecHB1oe0,8629
|
52
52
|
outerbounds/apps/dependencies.py,sha256=SqvdFQdFZZW0wXX_CHMHCrfE0TwaRkTvGCRbQ2Mx3q0,3935
|
53
53
|
outerbounds/apps/deployer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
54
|
outerbounds/apps/experimental/__init__.py,sha256=12L_FzZyzv162uo4I6cmlrxat7feUtIu_kxbObTJZTA,3059
|
@@ -72,7 +72,7 @@ outerbounds/utils/metaflowconfig.py,sha256=l2vJbgPkLISU-XPGZFaC8ZKmYFyJemlD6bwB-
|
|
72
72
|
outerbounds/utils/schema.py,sha256=lMUr9kNgn9wy-sO_t_Tlxmbt63yLeN4b0xQXbDUDj4A,2331
|
73
73
|
outerbounds/utils/utils.py,sha256=4Z8cszNob_8kDYCLNTrP-wWads_S_MdL3Uj3ju4mEsk,501
|
74
74
|
outerbounds/vendor.py,sha256=gRLRJNXtZBeUpPEog0LOeIsl6GosaFFbCxUvR4bW6IQ,5093
|
75
|
-
outerbounds-0.3.
|
76
|
-
outerbounds-0.3.
|
77
|
-
outerbounds-0.3.
|
78
|
-
outerbounds-0.3.
|
75
|
+
outerbounds-0.3.176rc3.dist-info/METADATA,sha256=jayxJ0ZnDei5OjAnSJgPe-wbyThfy9rYss2IK7iPPTY,1846
|
76
|
+
outerbounds-0.3.176rc3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
77
|
+
outerbounds-0.3.176rc3.dist-info/entry_points.txt,sha256=7ye0281PKlvqxu15rjw60zKg2pMsXI49_A8BmGqIqBw,47
|
78
|
+
outerbounds-0.3.176rc3.dist-info/RECORD,,
|
File without changes
|
File without changes
|