ob-metaflow 2.15.0.1__py2.py3-none-any.whl → 2.15.5.1__py2.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.
Potentially problematic release.
This version of ob-metaflow might be problematic. Click here for more details.
- metaflow/__init__.py +6 -0
- metaflow/cmd/code/__init__.py +230 -0
- metaflow/cmd/develop/stub_generator.py +5 -2
- metaflow/cmd/main_cli.py +1 -0
- metaflow/cmd/make_wrapper.py +35 -3
- metaflow/extension_support/plugins.py +1 -0
- metaflow/metaflow_config.py +2 -0
- metaflow/metaflow_environment.py +3 -1
- metaflow/mflog/__init__.py +4 -3
- metaflow/plugins/__init__.py +14 -0
- metaflow/plugins/argo/argo_client.py +9 -2
- metaflow/plugins/argo/argo_workflows.py +79 -28
- metaflow/plugins/argo/argo_workflows_cli.py +16 -25
- metaflow/plugins/argo/argo_workflows_deployer_objects.py +5 -2
- metaflow/plugins/cards/card_modules/main.js +52 -50
- metaflow/plugins/kubernetes/kubernetes_decorator.py +2 -1
- metaflow/plugins/kubernetes/kubernetes_jobsets.py +2 -0
- metaflow/plugins/metadata_providers/service.py +16 -7
- metaflow/plugins/pypi/bootstrap.py +17 -26
- metaflow/plugins/pypi/conda_environment.py +8 -8
- metaflow/plugins/pypi/parsers.py +268 -0
- metaflow/plugins/pypi/utils.py +18 -0
- metaflow/runner/click_api.py +5 -1
- metaflow/runner/deployer.py +3 -2
- metaflow/version.py +1 -1
- {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/Makefile +36 -17
- {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/Tiltfile +29 -10
- ob_metaflow-2.15.5.1.dist-info/METADATA +87 -0
- {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/RECORD +34 -32
- {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/WHEEL +1 -1
- ob_metaflow-2.15.0.1.dist-info/METADATA +0 -94
- {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/pick_services.sh +0 -0
- {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/LICENSE +0 -0
- {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/entry_points.txt +0 -0
- {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/top_level.txt +0 -0
|
@@ -130,6 +130,7 @@ def argo_workflows(obj, name=None):
|
|
|
130
130
|
is_flag=True,
|
|
131
131
|
default=False,
|
|
132
132
|
help="Only print out JSON sent to Argo Workflows. Do not deploy anything.",
|
|
133
|
+
hidden=True,
|
|
133
134
|
)
|
|
134
135
|
@click.option(
|
|
135
136
|
"--max-workers",
|
|
@@ -182,14 +183,9 @@ def argo_workflows(obj, name=None):
|
|
|
182
183
|
help="Incident.io API V2 key for workflow success/failure notifications.",
|
|
183
184
|
)
|
|
184
185
|
@click.option(
|
|
185
|
-
"--incident-io-
|
|
186
|
-
default=None,
|
|
187
|
-
help="Incident.io severity id for success alerts.",
|
|
188
|
-
)
|
|
189
|
-
@click.option(
|
|
190
|
-
"--incident-io-error-severity-id",
|
|
186
|
+
"--incident-io-alert-source-config-id",
|
|
191
187
|
default=None,
|
|
192
|
-
help="Incident.io
|
|
188
|
+
help="Incident.io Alert source config ID. Example '01GW2G3V0S59R238FAHPDS1R66'",
|
|
193
189
|
)
|
|
194
190
|
@click.option(
|
|
195
191
|
"--enable-heartbeat-daemon/--no-enable-heartbeat-daemon",
|
|
@@ -229,8 +225,7 @@ def create(
|
|
|
229
225
|
notify_slack_webhook_url=None,
|
|
230
226
|
notify_pager_duty_integration_key=None,
|
|
231
227
|
notify_incident_io_api_key=None,
|
|
232
|
-
|
|
233
|
-
incident_io_error_severity_id=None,
|
|
228
|
+
incident_io_alert_source_config_id=None,
|
|
234
229
|
enable_heartbeat_daemon=True,
|
|
235
230
|
deployer_attribute_file=None,
|
|
236
231
|
enable_error_msg_capture=False,
|
|
@@ -287,8 +282,7 @@ def create(
|
|
|
287
282
|
notify_slack_webhook_url,
|
|
288
283
|
notify_pager_duty_integration_key,
|
|
289
284
|
notify_incident_io_api_key,
|
|
290
|
-
|
|
291
|
-
incident_io_error_severity_id,
|
|
285
|
+
incident_io_alert_source_config_id,
|
|
292
286
|
enable_heartbeat_daemon,
|
|
293
287
|
enable_error_msg_capture,
|
|
294
288
|
)
|
|
@@ -464,8 +458,7 @@ def make_flow(
|
|
|
464
458
|
notify_slack_webhook_url,
|
|
465
459
|
notify_pager_duty_integration_key,
|
|
466
460
|
notify_incident_io_api_key,
|
|
467
|
-
|
|
468
|
-
incident_io_error_severity_id,
|
|
461
|
+
incident_io_alert_source_config_id,
|
|
469
462
|
enable_heartbeat_daemon,
|
|
470
463
|
enable_error_msg_capture,
|
|
471
464
|
):
|
|
@@ -488,19 +481,18 @@ def make_flow(
|
|
|
488
481
|
"https://api.slack.com/messaging/webhooks to generate a webhook url.\n"
|
|
489
482
|
" For notifications through PagerDuty, generate an integration key by following the instructions at "
|
|
490
483
|
"https://support.pagerduty.com/docs/services-and-integrations#create-a-generic-events-api-integration\n"
|
|
491
|
-
" For notifications through Incident.io, generate an
|
|
484
|
+
" For notifications through Incident.io, generate an alert source config."
|
|
492
485
|
)
|
|
493
486
|
|
|
494
|
-
if
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
487
|
+
if (
|
|
488
|
+
(notify_on_error or notify_on_success)
|
|
489
|
+
and notify_incident_io_api_key
|
|
490
|
+
and incident_io_alert_source_config_id is None
|
|
491
|
+
):
|
|
492
|
+
raise MetaflowException(
|
|
493
|
+
"Incident.io alerts require an alert source configuration ID. Please set one with --incident-io-alert-source-config-id"
|
|
494
|
+
)
|
|
499
495
|
|
|
500
|
-
if notify_on_success and incident_io_success_severity_id is None:
|
|
501
|
-
raise MetaflowException(
|
|
502
|
-
"Incident.io success notifications require a severity id. Please set one with --incident-io-success-severity-id"
|
|
503
|
-
)
|
|
504
496
|
# Attach @kubernetes and @environment decorator to the flow to
|
|
505
497
|
# ensure that the related decorator hooks are invoked.
|
|
506
498
|
decorators._attach_decorators(
|
|
@@ -545,8 +537,7 @@ def make_flow(
|
|
|
545
537
|
notify_slack_webhook_url=notify_slack_webhook_url,
|
|
546
538
|
notify_pager_duty_integration_key=notify_pager_duty_integration_key,
|
|
547
539
|
notify_incident_io_api_key=notify_incident_io_api_key,
|
|
548
|
-
|
|
549
|
-
incident_io_error_severity_id=incident_io_error_severity_id,
|
|
540
|
+
incident_io_alert_source_config_id=incident_io_alert_source_config_id,
|
|
550
541
|
enable_heartbeat_daemon=enable_heartbeat_daemon,
|
|
551
542
|
enable_error_msg_capture=enable_error_msg_capture,
|
|
552
543
|
)
|
|
@@ -171,12 +171,16 @@ class ArgoWorkflowsTriggeredRun(TriggeredRun):
|
|
|
171
171
|
command_obj.sync_wait()
|
|
172
172
|
return command_obj.process.returncode == 0
|
|
173
173
|
|
|
174
|
-
def wait_for_completion(
|
|
174
|
+
def wait_for_completion(
|
|
175
|
+
self, check_interval: int = 5, timeout: Optional[int] = None
|
|
176
|
+
):
|
|
175
177
|
"""
|
|
176
178
|
Wait for the workflow to complete or timeout.
|
|
177
179
|
|
|
178
180
|
Parameters
|
|
179
181
|
----------
|
|
182
|
+
check_interval: int, default: 5
|
|
183
|
+
Frequency of checking for workflow completion, in seconds.
|
|
180
184
|
timeout : int, optional, default None
|
|
181
185
|
Maximum time in seconds to wait for workflow completion.
|
|
182
186
|
If None, waits indefinitely.
|
|
@@ -187,7 +191,6 @@ class ArgoWorkflowsTriggeredRun(TriggeredRun):
|
|
|
187
191
|
If the workflow does not complete within the specified timeout period.
|
|
188
192
|
"""
|
|
189
193
|
start_time = time.time()
|
|
190
|
-
check_interval = 5
|
|
191
194
|
while self.is_running:
|
|
192
195
|
if timeout is not None and (time.time() - start_time) > timeout:
|
|
193
196
|
raise TimeoutError(
|