hatchet-sdk 0.45.3b1__tar.gz → 0.46.1__tar.gz
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 hatchet-sdk might be problematic. Click here for more details.
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/PKG-INFO +8 -8
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/admin.py +63 -127
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/dispatcher/action_listener.py +23 -21
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/events.py +48 -85
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/loader.py +14 -40
- hatchet_sdk-0.46.1/hatchet_sdk/opentelemetry/instrumentor.py +323 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/runner/runner.py +102 -140
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/pyproject.toml +19 -9
- hatchet_sdk-0.45.3b1/hatchet_sdk/utils/tracing.py +0 -70
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/README.md +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/client.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/dispatcher/dispatcher.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/event_ts.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/api_token_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/default_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/event_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/github_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/healthcheck_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/log_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/metadata_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/rate_limits_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/slack_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/sns_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/step_run_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/tenant_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/user_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/worker_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/workflow_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/workflow_run_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api/workflow_runs_api.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api_client.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/api_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/configuration.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/exceptions.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/accept_invite_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_error.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_errors.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_meta.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_meta_auth.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_meta_integration.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_meta_posthog.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_resource_meta.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/api_token.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/bulk_create_event_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/bulk_create_event_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cancel_event_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cancel_step_run_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/concurrency_limit_strategy.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_api_token_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_api_token_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_cron_workflow_trigger_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_event_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_pull_request_from_step_run.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_sns_integration_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_tenant_alert_email_group_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_tenant_invite_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/create_tenant_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cron_workflows.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cron_workflows_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cron_workflows_method.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_data.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_key_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_order_by_direction.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_update_cancel200_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/event_workflow_run_summary.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/events.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/github_app_installation.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/github_branch.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/github_repo.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/info_get_version200_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/job.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/job_run.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/job_run_status.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/link_github_repository_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/list_api_tokens_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/list_github_app_installations_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/list_pull_requests_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/list_slack_webhooks.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/list_sns_integrations.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/log_line.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/log_line_level.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/log_line_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/log_line_order_by_direction.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/log_line_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/pagination_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/pull_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/pull_request_state.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/queue_metrics.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/rate_limit.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/rate_limit_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/rate_limit_order_by_direction.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/rate_limit_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/recent_step_runs.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/reject_invite_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/replay_event_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/replay_workflow_runs_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/rerun_step_run_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/schedule_workflow_run_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/scheduled_run_status.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/scheduled_workflows.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/scheduled_workflows_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/scheduled_workflows_method.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/semaphore_slots.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/slack_webhook.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/sns_integration.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_archive.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_archive_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_diff.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_event.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_event_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_event_reason.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_event_severity.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/step_run_status.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_alert_email_group.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_alerting_settings.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_invite.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_invite_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_member.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_member_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_member_role.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_resource.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_resource_limit.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_resource_policy.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/trigger_workflow_run_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/update_tenant_alert_email_group_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/update_tenant_invite_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/update_tenant_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/update_worker_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user_change_password_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user_login_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user_register_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/user_tenant_public.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_create_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_create_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_created.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/webhook_worker_request_method.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker_label.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker_runtime_info.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/worker_type.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_concurrency.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_deployment_config.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_kind.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_metrics.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_cancel200_response.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_list.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_order_by_direction.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_order_by_field.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_shape.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_status.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_run_triggered_by.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_runs_cancel_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_runs_metrics_counts.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_tag.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_trigger_cron_ref.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_trigger_event_ref.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_triggers.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_update_request.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_version.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_version_concurrency.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_version_definition.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_version_meta.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/models/workflow_workers_count.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/rest.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest/tenacity_utils.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/rest_client.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/run_event_listener.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/workflow_listener.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/connection.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/context/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/context/context.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/context/worker_context.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/dispatcher_pb2.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/dispatcher_pb2.pyi +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/dispatcher_pb2_grpc.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/events_pb2.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/events_pb2.pyi +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/events_pb2_grpc.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/workflows_pb2.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/workflows_pb2.pyi +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/contracts/workflows_pb2_grpc.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/features/cron.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/features/scheduled.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/hatchet.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/labels.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/logger.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/metadata.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/py.typed +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/rate_limit.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/semver.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/token.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/utils/aio_utils.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/utils/backoff.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/utils/serialization.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/utils/types.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/utils/typing.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/v2/callable.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/v2/concurrency.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/v2/hatchet.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/__init__.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/action_listener_process.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/runner/run_loop_manager.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/runner/utils/capture_logs.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/runner/utils/error_with_traceback.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/worker/worker.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/workflow.py +0 -0
- {hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/workflow_run.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hatchet-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.46.1
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Alexander Belanger
|
|
6
6
|
Author-email: alexander@hatchet.run
|
|
@@ -9,6 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.10
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Provides-Extra: otel
|
|
12
13
|
Requires-Dist: aiohttp (>=3.10.5,<4.0.0)
|
|
13
14
|
Requires-Dist: aiohttp-retry (>=2.8.3,<3.0.0)
|
|
14
15
|
Requires-Dist: aiostream (>=0.5.2,<0.6.0)
|
|
@@ -17,14 +18,13 @@ Requires-Dist: grpcio (>=1.64.1,!=1.68.*) ; python_version < "3.13"
|
|
|
17
18
|
Requires-Dist: grpcio (>=1.69.0) ; python_version >= "3.13"
|
|
18
19
|
Requires-Dist: grpcio-tools (>=1.64.1,!=1.68.*) ; python_version < "3.13"
|
|
19
20
|
Requires-Dist: grpcio-tools (>=1.69.0) ; python_version >= "3.13"
|
|
20
|
-
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
|
21
21
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
|
22
|
-
Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0)
|
|
23
|
-
Requires-Dist: opentelemetry-distro (>=0.
|
|
24
|
-
Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0)
|
|
25
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0)
|
|
26
|
-
Requires-Dist: opentelemetry-instrumentation (>=0.
|
|
27
|
-
Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0)
|
|
22
|
+
Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0) ; extra == "otel"
|
|
23
|
+
Requires-Dist: opentelemetry-distro (>=0.49b0) ; extra == "otel"
|
|
24
|
+
Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0) ; extra == "otel"
|
|
25
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0) ; extra == "otel"
|
|
26
|
+
Requires-Dist: opentelemetry-instrumentation (>=0.49b0) ; extra == "otel"
|
|
27
|
+
Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0) ; extra == "otel"
|
|
28
28
|
Requires-Dist: prometheus-client (>=0.21.1,<0.22.0)
|
|
29
29
|
Requires-Dist: protobuf (>=5.29.1,<6.0.0)
|
|
30
30
|
Requires-Dist: pydantic (>=2.6.3,<3.0.0)
|
|
@@ -24,12 +24,6 @@ from hatchet_sdk.contracts.workflows_pb2 import (
|
|
|
24
24
|
)
|
|
25
25
|
from hatchet_sdk.contracts.workflows_pb2_grpc import WorkflowServiceStub
|
|
26
26
|
from hatchet_sdk.utils.serialization import flatten
|
|
27
|
-
from hatchet_sdk.utils.tracing import (
|
|
28
|
-
create_carrier,
|
|
29
|
-
create_tracer,
|
|
30
|
-
inject_carrier_into_metadata,
|
|
31
|
-
parse_carrier_from_metadata,
|
|
32
|
-
)
|
|
33
27
|
from hatchet_sdk.workflow_run import RunRef, WorkflowRunRef
|
|
34
28
|
|
|
35
29
|
from ..loader import ClientConfig
|
|
@@ -95,7 +89,10 @@ class AdminClientBase:
|
|
|
95
89
|
else options["additional_metadata"]
|
|
96
90
|
)
|
|
97
91
|
if meta is not None:
|
|
98
|
-
options
|
|
92
|
+
options = {
|
|
93
|
+
**options,
|
|
94
|
+
"additional_metadata": json.dumps(meta).encode("utf-8"),
|
|
95
|
+
}
|
|
99
96
|
except json.JSONDecodeError as e:
|
|
100
97
|
raise ValueError(f"Error encoding payload: {e}")
|
|
101
98
|
|
|
@@ -171,7 +168,6 @@ class AdminClientAioImpl(AdminClientBase):
|
|
|
171
168
|
self.token = config.token
|
|
172
169
|
self.listener_client = new_listener(config)
|
|
173
170
|
self.namespace = config.namespace
|
|
174
|
-
self.otel_tracer = create_tracer(config=config)
|
|
175
171
|
|
|
176
172
|
async def run(
|
|
177
173
|
self,
|
|
@@ -190,74 +186,46 @@ class AdminClientAioImpl(AdminClientBase):
|
|
|
190
186
|
wrr.workflow_run_id, wrr.workflow_listener, wrr.workflow_run_event_listener
|
|
191
187
|
)
|
|
192
188
|
|
|
189
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
193
190
|
@tenacity_retry
|
|
194
191
|
async def run_workflow(
|
|
195
192
|
self, workflow_name: str, input: any, options: TriggerWorkflowOptions = None
|
|
196
193
|
) -> WorkflowRunRef:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
try:
|
|
195
|
+
if not self.pooled_workflow_listener:
|
|
196
|
+
self.pooled_workflow_listener = PooledWorkflowRunListener(self.config)
|
|
200
197
|
|
|
201
|
-
|
|
202
|
-
f"hatchet.async_run_workflow.{workflow_name}", context=ctx
|
|
203
|
-
) as span:
|
|
204
|
-
carrier = create_carrier()
|
|
198
|
+
namespace = self.namespace
|
|
205
199
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
namespace = self.namespace
|
|
213
|
-
|
|
214
|
-
if (
|
|
215
|
-
options is not None
|
|
216
|
-
and "namespace" in options
|
|
217
|
-
and options["namespace"] is not None
|
|
218
|
-
):
|
|
219
|
-
namespace = options.pop("namespace")
|
|
220
|
-
|
|
221
|
-
if namespace != "" and not workflow_name.startswith(self.namespace):
|
|
222
|
-
workflow_name = f"{namespace}{workflow_name}"
|
|
223
|
-
|
|
224
|
-
if options is not None and "additional_metadata" in options:
|
|
225
|
-
options["additional_metadata"] = inject_carrier_into_metadata(
|
|
226
|
-
options["additional_metadata"], carrier
|
|
227
|
-
)
|
|
228
|
-
span.set_attributes(
|
|
229
|
-
flatten(
|
|
230
|
-
options["additional_metadata"], parent_key="", separator="."
|
|
231
|
-
)
|
|
232
|
-
)
|
|
233
|
-
|
|
234
|
-
request = self._prepare_workflow_request(workflow_name, input, options)
|
|
235
|
-
|
|
236
|
-
span.add_event(
|
|
237
|
-
"Triggering workflow", attributes={"workflow_name": workflow_name}
|
|
238
|
-
)
|
|
200
|
+
if (
|
|
201
|
+
options is not None
|
|
202
|
+
and "namespace" in options
|
|
203
|
+
and options["namespace"] is not None
|
|
204
|
+
):
|
|
205
|
+
namespace = options.pop("namespace")
|
|
239
206
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
metadata=get_metadata(self.token),
|
|
243
|
-
)
|
|
207
|
+
if namespace != "" and not workflow_name.startswith(self.namespace):
|
|
208
|
+
workflow_name = f"{namespace}{workflow_name}"
|
|
244
209
|
|
|
245
|
-
|
|
246
|
-
"Received workflow response",
|
|
247
|
-
attributes={"workflow_name": workflow_name},
|
|
248
|
-
)
|
|
210
|
+
request = self._prepare_workflow_request(workflow_name, input, options)
|
|
249
211
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
)
|
|
255
|
-
except (grpc.RpcError, grpc.aio.AioRpcError) as e:
|
|
256
|
-
if e.code() == grpc.StatusCode.ALREADY_EXISTS:
|
|
257
|
-
raise DedupeViolationErr(e.details())
|
|
212
|
+
resp: TriggerWorkflowResponse = await self.aio_client.TriggerWorkflow(
|
|
213
|
+
request,
|
|
214
|
+
metadata=get_metadata(self.token),
|
|
215
|
+
)
|
|
258
216
|
|
|
259
|
-
|
|
217
|
+
return WorkflowRunRef(
|
|
218
|
+
workflow_run_id=resp.workflow_run_id,
|
|
219
|
+
workflow_listener=self.pooled_workflow_listener,
|
|
220
|
+
workflow_run_event_listener=self.listener_client,
|
|
221
|
+
)
|
|
222
|
+
except (grpc.RpcError, grpc.aio.AioRpcError) as e:
|
|
223
|
+
if e.code() == grpc.StatusCode.ALREADY_EXISTS:
|
|
224
|
+
raise DedupeViolationErr(e.details())
|
|
225
|
+
|
|
226
|
+
raise e
|
|
260
227
|
|
|
228
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
261
229
|
@tenacity_retry
|
|
262
230
|
async def run_workflows(
|
|
263
231
|
self,
|
|
@@ -386,7 +354,6 @@ class AdminClient(AdminClientBase):
|
|
|
386
354
|
self.token = config.token
|
|
387
355
|
self.listener_client = new_listener(config)
|
|
388
356
|
self.namespace = config.namespace
|
|
389
|
-
self.otel_tracer = create_tracer(config=config)
|
|
390
357
|
|
|
391
358
|
@tenacity_retry
|
|
392
359
|
def put_workflow(
|
|
@@ -456,78 +423,47 @@ class AdminClient(AdminClientBase):
|
|
|
456
423
|
|
|
457
424
|
raise e
|
|
458
425
|
|
|
459
|
-
##
|
|
460
|
-
## TODO: `any` type hint should come from `typing`
|
|
426
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
461
427
|
@tenacity_retry
|
|
462
428
|
def run_workflow(
|
|
463
429
|
self, workflow_name: str, input: any, options: TriggerWorkflowOptions = None
|
|
464
430
|
) -> WorkflowRunRef:
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
431
|
+
try:
|
|
432
|
+
if not self.pooled_workflow_listener:
|
|
433
|
+
self.pooled_workflow_listener = PooledWorkflowRunListener(self.config)
|
|
468
434
|
|
|
469
|
-
|
|
470
|
-
f"hatchet.run_workflow.{workflow_name}", context=ctx
|
|
471
|
-
) as span:
|
|
472
|
-
carrier = create_carrier()
|
|
435
|
+
namespace = self.namespace
|
|
473
436
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
namespace =
|
|
481
|
-
|
|
482
|
-
## TODO: Factor this out - it's repeated a lot of places
|
|
483
|
-
if (
|
|
484
|
-
options is not None
|
|
485
|
-
and "namespace" in options
|
|
486
|
-
and options["namespace"] is not None
|
|
487
|
-
):
|
|
488
|
-
namespace = options.pop("namespace")
|
|
489
|
-
|
|
490
|
-
if options is not None and "additional_metadata" in options:
|
|
491
|
-
options["additional_metadata"] = inject_carrier_into_metadata(
|
|
492
|
-
options["additional_metadata"], carrier
|
|
493
|
-
)
|
|
494
|
-
|
|
495
|
-
span.set_attributes(
|
|
496
|
-
flatten(
|
|
497
|
-
options["additional_metadata"], parent_key="", separator="."
|
|
498
|
-
)
|
|
499
|
-
)
|
|
500
|
-
|
|
501
|
-
if namespace != "" and not workflow_name.startswith(self.namespace):
|
|
502
|
-
workflow_name = f"{namespace}{workflow_name}"
|
|
503
|
-
|
|
504
|
-
request = self._prepare_workflow_request(workflow_name, input, options)
|
|
505
|
-
|
|
506
|
-
span.add_event(
|
|
507
|
-
"Triggering workflow", attributes={"workflow_name": workflow_name}
|
|
508
|
-
)
|
|
437
|
+
## TODO: Factor this out - it's repeated a lot of places
|
|
438
|
+
if (
|
|
439
|
+
options is not None
|
|
440
|
+
and "namespace" in options
|
|
441
|
+
and options["namespace"] is not None
|
|
442
|
+
):
|
|
443
|
+
namespace = options.pop("namespace")
|
|
509
444
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
metadata=get_metadata(self.token),
|
|
513
|
-
)
|
|
445
|
+
if namespace != "" and not workflow_name.startswith(self.namespace):
|
|
446
|
+
workflow_name = f"{namespace}{workflow_name}"
|
|
514
447
|
|
|
515
|
-
|
|
516
|
-
"Received workflow response",
|
|
517
|
-
attributes={"workflow_name": workflow_name},
|
|
518
|
-
)
|
|
448
|
+
request = self._prepare_workflow_request(workflow_name, input, options)
|
|
519
449
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
450
|
+
resp: TriggerWorkflowResponse = self.client.TriggerWorkflow(
|
|
451
|
+
request,
|
|
452
|
+
metadata=get_metadata(self.token),
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
return WorkflowRunRef(
|
|
456
|
+
workflow_run_id=resp.workflow_run_id,
|
|
457
|
+
workflow_listener=self.pooled_workflow_listener,
|
|
458
|
+
workflow_run_event_listener=self.listener_client,
|
|
459
|
+
)
|
|
460
|
+
except (grpc.RpcError, grpc.aio.AioRpcError) as e:
|
|
461
|
+
if e.code() == grpc.StatusCode.ALREADY_EXISTS:
|
|
462
|
+
raise DedupeViolationErr(e.details())
|
|
528
463
|
|
|
529
|
-
|
|
464
|
+
raise e
|
|
530
465
|
|
|
466
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
531
467
|
@tenacity_retry
|
|
532
468
|
def run_workflows(
|
|
533
469
|
self, workflows: List[WorkflowRunDict], options: TriggerWorkflowOptions = None
|
{hatchet_sdk-0.45.3b1 → hatchet_sdk-0.46.1}/hatchet_sdk/clients/dispatcher/action_listener.py
RENAMED
|
@@ -90,27 +90,29 @@ class Action:
|
|
|
90
90
|
self.additional_metadata = {}
|
|
91
91
|
|
|
92
92
|
@property
|
|
93
|
-
def otel_attributes(self) -> dict[str,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
93
|
+
def otel_attributes(self) -> dict[str, str | int]:
|
|
94
|
+
try:
|
|
95
|
+
payload_str = json.dumps(self.action_payload, default=str)
|
|
96
|
+
except Exception:
|
|
97
|
+
payload_str = str(self.action_payload)
|
|
98
|
+
|
|
99
|
+
attrs: dict[str, str | int | None] = {
|
|
100
|
+
"hatchet.tenant_id": self.tenant_id,
|
|
101
|
+
"hatchet.worker_id": self.worker_id,
|
|
102
|
+
"hatchet.workflow_run_id": self.workflow_run_id,
|
|
103
|
+
"hatchet.step_id": self.step_id,
|
|
104
|
+
"hatchet.step_run_id": self.step_run_id,
|
|
105
|
+
"hatchet.retry_count": self.retry_count,
|
|
106
|
+
"hatchet.parent_workflow_run_id": self.parent_workflow_run_id,
|
|
107
|
+
"hatchet.child_workflow_index": self.child_workflow_index,
|
|
108
|
+
"hatchet.child_workflow_key": self.child_workflow_key,
|
|
109
|
+
"hatchet.action_payload": payload_str,
|
|
110
|
+
"hatchet.workflow_name": self.job_name,
|
|
111
|
+
"hatchet.action_name": self.action_id,
|
|
112
|
+
"hatchet.get_group_key_run_id": self.get_group_key_run_id,
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {k: v for k, v in attrs.items() if v}
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
START_STEP_RUN = 0
|
|
@@ -17,12 +17,6 @@ from hatchet_sdk.contracts.events_pb2 import (
|
|
|
17
17
|
)
|
|
18
18
|
from hatchet_sdk.contracts.events_pb2_grpc import EventsServiceStub
|
|
19
19
|
from hatchet_sdk.utils.serialization import flatten
|
|
20
|
-
from hatchet_sdk.utils.tracing import (
|
|
21
|
-
create_carrier,
|
|
22
|
-
create_tracer,
|
|
23
|
-
inject_carrier_into_metadata,
|
|
24
|
-
parse_carrier_from_metadata,
|
|
25
|
-
)
|
|
26
20
|
|
|
27
21
|
from ..loader import ClientConfig
|
|
28
22
|
from ..metadata import get_metadata
|
|
@@ -63,7 +57,6 @@ class EventClient:
|
|
|
63
57
|
self.client = client
|
|
64
58
|
self.token = config.token
|
|
65
59
|
self.namespace = config.namespace
|
|
66
|
-
self.otel_tracer = create_tracer(config=config)
|
|
67
60
|
|
|
68
61
|
async def async_push(
|
|
69
62
|
self, event_key, payload, options: Optional[PushEventOptions] = None
|
|
@@ -79,54 +72,41 @@ class EventClient:
|
|
|
79
72
|
) -> List[Event]:
|
|
80
73
|
return await asyncio.to_thread(self.bulk_push, events=events, options=options)
|
|
81
74
|
|
|
75
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
82
76
|
@tenacity_retry
|
|
83
77
|
def push(self, event_key, payload, options: PushEventOptions = None) -> Event:
|
|
84
|
-
|
|
85
|
-
(options or {}).get("additional_metadata", {})
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
with self.otel_tracer.start_as_current_span(
|
|
89
|
-
"hatchet.push", context=ctx
|
|
90
|
-
) as span:
|
|
91
|
-
carrier = create_carrier()
|
|
92
|
-
namespace = self.namespace
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
options is not None
|
|
96
|
-
and "namespace" in options
|
|
97
|
-
and options["namespace"] is not None
|
|
98
|
-
):
|
|
99
|
-
namespace = options.pop("namespace")
|
|
100
|
-
|
|
101
|
-
namespaced_event_key = namespace + event_key
|
|
102
|
-
|
|
103
|
-
try:
|
|
104
|
-
meta = inject_carrier_into_metadata(
|
|
105
|
-
dict() if options is None else options["additional_metadata"],
|
|
106
|
-
carrier,
|
|
107
|
-
)
|
|
108
|
-
meta_bytes = None if meta is None else json.dumps(meta).encode("utf-8")
|
|
109
|
-
except Exception as e:
|
|
110
|
-
raise ValueError(f"Error encoding meta: {e}")
|
|
78
|
+
namespace = self.namespace
|
|
111
79
|
|
|
112
|
-
|
|
80
|
+
if (
|
|
81
|
+
options is not None
|
|
82
|
+
and "namespace" in options
|
|
83
|
+
and options["namespace"] is not None
|
|
84
|
+
):
|
|
85
|
+
namespace = options.pop("namespace")
|
|
113
86
|
|
|
114
|
-
|
|
115
|
-
payload_bytes = json.dumps(payload).encode("utf-8")
|
|
116
|
-
except json.UnicodeEncodeError as e:
|
|
117
|
-
raise ValueError(f"Error encoding payload: {e}")
|
|
87
|
+
namespaced_event_key = namespace + event_key
|
|
118
88
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
89
|
+
try:
|
|
90
|
+
meta = dict() if options is None else options["additional_metadata"]
|
|
91
|
+
meta_bytes = None if meta is None else json.dumps(meta).encode("utf-8")
|
|
92
|
+
except Exception as e:
|
|
93
|
+
raise ValueError(f"Error encoding meta: {e}")
|
|
125
94
|
|
|
126
|
-
|
|
95
|
+
try:
|
|
96
|
+
payload_bytes = json.dumps(payload).encode("utf-8")
|
|
97
|
+
except json.UnicodeEncodeError as e:
|
|
98
|
+
raise ValueError(f"Error encoding payload: {e}")
|
|
99
|
+
|
|
100
|
+
request = PushEventRequest(
|
|
101
|
+
key=namespaced_event_key,
|
|
102
|
+
payload=payload_bytes,
|
|
103
|
+
eventTimestamp=proto_timestamp_now(),
|
|
104
|
+
additionalMetadata=meta_bytes,
|
|
105
|
+
)
|
|
127
106
|
|
|
128
|
-
|
|
107
|
+
return self.client.Push(request, metadata=get_metadata(self.token))
|
|
129
108
|
|
|
109
|
+
## IMPORTANT: Keep this method's signature in sync with the wrapper in the OTel instrumentor
|
|
130
110
|
@tenacity_retry
|
|
131
111
|
def bulk_push(
|
|
132
112
|
self,
|
|
@@ -134,10 +114,6 @@ class EventClient:
|
|
|
134
114
|
options: BulkPushEventOptions = None,
|
|
135
115
|
) -> List[Event]:
|
|
136
116
|
namespace = self.namespace
|
|
137
|
-
bulk_push_correlation_id = uuid4()
|
|
138
|
-
ctx = parse_carrier_from_metadata(
|
|
139
|
-
(options or {}).get("additional_metadata", {})
|
|
140
|
-
)
|
|
141
117
|
|
|
142
118
|
if (
|
|
143
119
|
options is not None
|
|
@@ -148,43 +124,30 @@ class EventClient:
|
|
|
148
124
|
|
|
149
125
|
bulk_events = []
|
|
150
126
|
for event in events:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
try:
|
|
173
|
-
payload_bytes = json.dumps(payload).encode("utf-8")
|
|
174
|
-
except json.UnicodeEncodeError as e:
|
|
175
|
-
raise ValueError(f"Error encoding payload: {e}")
|
|
176
|
-
|
|
177
|
-
request = PushEventRequest(
|
|
178
|
-
key=event_key,
|
|
179
|
-
payload=payload_bytes,
|
|
180
|
-
eventTimestamp=proto_timestamp_now(),
|
|
181
|
-
additionalMetadata=meta_bytes,
|
|
182
|
-
)
|
|
183
|
-
bulk_events.append(request)
|
|
127
|
+
event_key = namespace + event["key"]
|
|
128
|
+
payload = event["payload"]
|
|
129
|
+
|
|
130
|
+
try:
|
|
131
|
+
meta = event.get("additional_metadata", {})
|
|
132
|
+
meta_bytes = json.dumps(meta).encode("utf-8") if meta else None
|
|
133
|
+
except Exception as e:
|
|
134
|
+
raise ValueError(f"Error encoding meta: {e}")
|
|
135
|
+
|
|
136
|
+
try:
|
|
137
|
+
payload_bytes = json.dumps(payload).encode("utf-8")
|
|
138
|
+
except json.UnicodeEncodeError as e:
|
|
139
|
+
raise ValueError(f"Error encoding payload: {e}")
|
|
140
|
+
|
|
141
|
+
request = PushEventRequest(
|
|
142
|
+
key=event_key,
|
|
143
|
+
payload=payload_bytes,
|
|
144
|
+
eventTimestamp=proto_timestamp_now(),
|
|
145
|
+
additionalMetadata=meta_bytes,
|
|
146
|
+
)
|
|
147
|
+
bulk_events.append(request)
|
|
184
148
|
|
|
185
149
|
bulk_request = BulkPushEventRequest(events=bulk_events)
|
|
186
150
|
|
|
187
|
-
span.add_event("Pushing bulk events")
|
|
188
151
|
response = self.client.BulkPush(bulk_request, metadata=get_metadata(self.token))
|
|
189
152
|
|
|
190
153
|
return response.events
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import json
|
|
2
1
|
import os
|
|
3
2
|
from logging import Logger, getLogger
|
|
4
3
|
from typing import Dict, Optional
|
|
4
|
+
from warnings import warn
|
|
5
5
|
|
|
6
6
|
import yaml
|
|
7
7
|
|
|
@@ -39,10 +39,6 @@ class ClientConfig:
|
|
|
39
39
|
logger: Logger = None,
|
|
40
40
|
grpc_max_recv_message_length: int = 4 * 1024 * 1024, # 4MB
|
|
41
41
|
grpc_max_send_message_length: int = 4 * 1024 * 1024, # 4MB
|
|
42
|
-
otel_exporter_oltp_endpoint: str | None = None,
|
|
43
|
-
otel_service_name: str | None = None,
|
|
44
|
-
otel_exporter_oltp_headers: dict[str, str] | None = None,
|
|
45
|
-
otel_exporter_oltp_protocol: str | None = None,
|
|
46
42
|
worker_healthcheck_port: int | None = None,
|
|
47
43
|
worker_healthcheck_enabled: bool | None = None,
|
|
48
44
|
worker_preset_labels: dict[str, str] = {},
|
|
@@ -56,10 +52,6 @@ class ClientConfig:
|
|
|
56
52
|
self.logInterceptor = logger
|
|
57
53
|
self.grpc_max_recv_message_length = grpc_max_recv_message_length
|
|
58
54
|
self.grpc_max_send_message_length = grpc_max_send_message_length
|
|
59
|
-
self.otel_exporter_oltp_endpoint = otel_exporter_oltp_endpoint
|
|
60
|
-
self.otel_service_name = otel_service_name
|
|
61
|
-
self.otel_exporter_oltp_headers = otel_exporter_oltp_headers
|
|
62
|
-
self.otel_exporter_oltp_protocol = otel_exporter_oltp_protocol
|
|
63
55
|
self.worker_healthcheck_port = worker_healthcheck_port
|
|
64
56
|
self.worker_healthcheck_enabled = worker_healthcheck_enabled
|
|
65
57
|
self.worker_preset_labels = worker_preset_labels
|
|
@@ -142,33 +134,6 @@ class ConfigLoader:
|
|
|
142
134
|
|
|
143
135
|
tls_config = self._load_tls_config(config_data["tls"], host_port)
|
|
144
136
|
|
|
145
|
-
otel_exporter_oltp_endpoint = get_config_value(
|
|
146
|
-
"otel_exporter_oltp_endpoint", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_ENDPOINT"
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
otel_service_name = get_config_value(
|
|
150
|
-
"otel_service_name", "HATCHET_CLIENT_OTEL_SERVICE_NAME"
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
_oltp_headers = get_config_value(
|
|
154
|
-
"otel_exporter_oltp_headers", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS"
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
if _oltp_headers:
|
|
158
|
-
try:
|
|
159
|
-
otel_header_key, api_key = _oltp_headers.split("=", maxsplit=1)
|
|
160
|
-
otel_exporter_oltp_headers = {otel_header_key: api_key}
|
|
161
|
-
except ValueError:
|
|
162
|
-
raise ValueError(
|
|
163
|
-
"HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS must be in the format `key=value`"
|
|
164
|
-
)
|
|
165
|
-
else:
|
|
166
|
-
otel_exporter_oltp_headers = None
|
|
167
|
-
|
|
168
|
-
otel_exporter_oltp_protocol = get_config_value(
|
|
169
|
-
"otel_exporter_oltp_protocol", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_PROTOCOL"
|
|
170
|
-
)
|
|
171
|
-
|
|
172
137
|
worker_healthcheck_port = int(
|
|
173
138
|
get_config_value(
|
|
174
139
|
"worker_healthcheck_port", "HATCHET_CLIENT_WORKER_HEALTHCHECK_PORT"
|
|
@@ -196,6 +161,19 @@ class ConfigLoader:
|
|
|
196
161
|
if autoscaling_target:
|
|
197
162
|
worker_preset_labels["hatchet-autoscaling-target"] = autoscaling_target
|
|
198
163
|
|
|
164
|
+
legacy_otlp_headers = get_config_value(
|
|
165
|
+
"otel_exporter_otlp_endpoint", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_ENDPOINT"
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
legacy_otlp_headers = get_config_value(
|
|
169
|
+
"otel_exporter_otlp_headers", "HATCHET_CLIENT_OTEL_EXPORTER_OTLP_HEADERS"
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
if legacy_otlp_headers or legacy_otlp_headers:
|
|
173
|
+
warn(
|
|
174
|
+
"The `otel_exporter_otlp_*` fields are no longer supported as of SDK version `0.46.0`. Please see the documentation on OpenTelemetry at https://docs.hatchet.run/home/features/opentelemetry for more information on how to migrate to the new `HatchetInstrumentor`."
|
|
175
|
+
)
|
|
176
|
+
|
|
199
177
|
return ClientConfig(
|
|
200
178
|
tenant_id=tenant_id,
|
|
201
179
|
tls_config=tls_config,
|
|
@@ -207,10 +185,6 @@ class ConfigLoader:
|
|
|
207
185
|
logger=defaults.logInterceptor,
|
|
208
186
|
grpc_max_recv_message_length=grpc_max_recv_message_length,
|
|
209
187
|
grpc_max_send_message_length=grpc_max_send_message_length,
|
|
210
|
-
otel_exporter_oltp_endpoint=otel_exporter_oltp_endpoint,
|
|
211
|
-
otel_service_name=otel_service_name,
|
|
212
|
-
otel_exporter_oltp_headers=otel_exporter_oltp_headers,
|
|
213
|
-
otel_exporter_oltp_protocol=otel_exporter_oltp_protocol,
|
|
214
188
|
worker_healthcheck_port=worker_healthcheck_port,
|
|
215
189
|
worker_healthcheck_enabled=worker_healthcheck_enabled,
|
|
216
190
|
worker_preset_labels=worker_preset_labels,
|