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.

Files changed (35) hide show
  1. metaflow/__init__.py +6 -0
  2. metaflow/cmd/code/__init__.py +230 -0
  3. metaflow/cmd/develop/stub_generator.py +5 -2
  4. metaflow/cmd/main_cli.py +1 -0
  5. metaflow/cmd/make_wrapper.py +35 -3
  6. metaflow/extension_support/plugins.py +1 -0
  7. metaflow/metaflow_config.py +2 -0
  8. metaflow/metaflow_environment.py +3 -1
  9. metaflow/mflog/__init__.py +4 -3
  10. metaflow/plugins/__init__.py +14 -0
  11. metaflow/plugins/argo/argo_client.py +9 -2
  12. metaflow/plugins/argo/argo_workflows.py +79 -28
  13. metaflow/plugins/argo/argo_workflows_cli.py +16 -25
  14. metaflow/plugins/argo/argo_workflows_deployer_objects.py +5 -2
  15. metaflow/plugins/cards/card_modules/main.js +52 -50
  16. metaflow/plugins/kubernetes/kubernetes_decorator.py +2 -1
  17. metaflow/plugins/kubernetes/kubernetes_jobsets.py +2 -0
  18. metaflow/plugins/metadata_providers/service.py +16 -7
  19. metaflow/plugins/pypi/bootstrap.py +17 -26
  20. metaflow/plugins/pypi/conda_environment.py +8 -8
  21. metaflow/plugins/pypi/parsers.py +268 -0
  22. metaflow/plugins/pypi/utils.py +18 -0
  23. metaflow/runner/click_api.py +5 -1
  24. metaflow/runner/deployer.py +3 -2
  25. metaflow/version.py +1 -1
  26. {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/Makefile +36 -17
  27. {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/Tiltfile +29 -10
  28. ob_metaflow-2.15.5.1.dist-info/METADATA +87 -0
  29. {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/RECORD +34 -32
  30. {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/WHEEL +1 -1
  31. ob_metaflow-2.15.0.1.dist-info/METADATA +0 -94
  32. {ob_metaflow-2.15.0.1.data → ob_metaflow-2.15.5.1.data}/data/share/metaflow/devtools/pick_services.sh +0 -0
  33. {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/LICENSE +0 -0
  34. {ob_metaflow-2.15.0.1.dist-info → ob_metaflow-2.15.5.1.dist-info}/entry_points.txt +0 -0
  35. {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-success-severity-id",
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 severity id for error alerts.",
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
- incident_io_success_severity_id=None,
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
- incident_io_success_severity_id,
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
- incident_io_success_severity_id,
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 API key with a permission to create incidents."
484
+ " For notifications through Incident.io, generate an alert source config."
492
485
  )
493
486
 
494
- if notify_incident_io_api_key:
495
- if notify_on_error and incident_io_error_severity_id is None:
496
- raise MetaflowException(
497
- "Incident.io error notifications require a severity id. Please set one with --incident-io-error-severity-id"
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
- incident_io_success_severity_id=incident_io_success_severity_id,
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(self, timeout: Optional[int] = None):
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(