hatchet-sdk 0.4.0 → 0.5.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +24 -0
- data/lib/hatchet/clients/rest/README.md +31 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/durable_tasks_api.rb +113 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/feature_flags_api.rb +107 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +156 -52
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb +114 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +78 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +3 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +9 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +170 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +94 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_model_base.rb +88 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +44 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_evaluation_result.rb +238 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span.rb +525 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_kind.rb +44 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_list.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_status_code.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/task_status_stat.rb +13 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +24 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb +256 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_additional_metadata_operator.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_request.rb +310 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_response.rb +310 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_hmac.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_entry.rb +470 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_kind.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition.rb +286 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition_kind.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +49 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metric.rb +341 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metrics.rb +222 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb +237 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +3 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +13 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +34 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +11 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb +280 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +1 -13
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_status.rb +41 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_idempotency.rb +265 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task.rb +393 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_desired_worker_label.rb +288 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_rate_limit.rb +271 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +24 -0
- data/lib/hatchet/contracts/v1/workflows_pb.rb +3 -1
- data/lib/hatchet/idempotency.rb +35 -1
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/workflow.rb +2 -2
- data/sig/hatchet/idempotency.rbs +8 -0
- metadata +31 -2
|
@@ -9,7 +9,7 @@ require 'v1/shared/condition_pb'
|
|
|
9
9
|
require 'v1/shared/trigger_pb'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
descriptor_data = "\n\x12v1/workflows.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19v1/shared/condition.proto\x1a\x17v1/shared/trigger.proto\"[\n\x12\x43\x61ncelTasksRequest\x12\x14\n\x0c\x65xternal_ids\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"[\n\x12ReplayTasksRequest\x12\x14\n\x0c\x65xternal_ids\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"\xb7\x01\n\x0bTasksFilter\x12\x10\n\x08statuses\x18\x01 \x03(\t\x12)\n\x05since\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x14\n\x0cworkflow_ids\x18\x04 \x03(\t\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x05 \x03(\tB\x08\n\x06_until\".\n\x13\x43\x61ncelTasksResponse\x12\x17\n\x0f\x63\x61ncelled_tasks\x18\x01 \x03(\t\"-\n\x13ReplayTasksResponse\x12\x16\n\x0ereplayed_tasks\x18\x01 \x03(\t\"\xae\x02\n\x19TriggerWorkflowRunRequest\x12\x15\n\rworkflow_name\x18\x01 \x01(\t\x12\r\n\x05input\x18\x02 \x01(\x0c\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x03 \x01(\x0c\x12\x15\n\x08priority\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12U\n\x15\x64\x65sired_worker_labels\x18\x05 \x03(\x0b\x32\x36.v1.TriggerWorkflowRunRequest.DesiredWorkerLabelsEntry\x1aS\n\x18\x44\x65siredWorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.v1.DesiredWorkerLabels:\x02\x38\x01\x42\x0b\n\t_priority\"1\n\x1aTriggerWorkflowRunResponse\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\"X\n\x18\x42ranchDurableTaskRequest\x12\x18\n\x10task_external_id\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x03\x12\x11\n\tbranch_id\x18\x03 \x01(\x03\"Y\n\x19\x42ranchDurableTaskResponse\x12\x18\n\x10task_external_id\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x03\x12\x11\n\tbranch_id\x18\x03 \x01(\x03\"\xed\x04\n\x1c\x43reateWorkflowVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x16\n\x0e\x65vent_triggers\x18\x04 \x03(\t\x12\x15\n\rcron_triggers\x18\x05 \x03(\t\x12!\n\x05tasks\x18\x06 \x03(\x0b\x32\x12.v1.CreateTaskOpts\x12$\n\x0b\x63oncurrency\x18\x07 \x01(\x0b\x32\x0f.v1.Concurrency\x12\x17\n\ncron_input\x18\x08 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0fon_failure_task\x18\t \x01(\x0b\x32\x12.v1.CreateTaskOptsH\x01\x88\x01\x01\x12\'\n\x06sticky\x18\n \x01(\x0e\x32\x12.v1.StickyStrategyH\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_priority\x18\x0b \x01(\x05H\x03\x88\x01\x01\x12(\n\x0f\x63oncurrency_arr\x18\x0c \x03(\x0b\x32\x0f.v1.Concurrency\x12*\n\x0f\x64\x65\x66\x61ult_filters\x18\r \x03(\x0b\x32\x11.v1.DefaultFilter\x12\x1e\n\x11input_json_schema\x18\x0e \x01(\x0cH\x04\x88\x01\x01\x12/\n\x0bidempotency\x18\x0f \x01(\x0b\x32\x15.v1.IdempotencyConfigH\x05\x88\x01\x01\x42\r\n\x0b_cron_inputB\x12\n\x10_on_failure_taskB\t\n\x07_stickyB\x13\n\x11_default_priorityB\x14\n\x12_input_json_schemaB\x0e\n\x0c_idempotency\"
|
|
12
|
+
descriptor_data = "\n\x12v1/workflows.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19v1/shared/condition.proto\x1a\x17v1/shared/trigger.proto\"[\n\x12\x43\x61ncelTasksRequest\x12\x14\n\x0c\x65xternal_ids\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"[\n\x12ReplayTasksRequest\x12\x14\n\x0c\x65xternal_ids\x18\x01 \x03(\t\x12$\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x0f.v1.TasksFilterH\x00\x88\x01\x01\x42\t\n\x07_filter\"\xb7\x01\n\x0bTasksFilter\x12\x10\n\x08statuses\x18\x01 \x03(\t\x12)\n\x05since\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x14\n\x0cworkflow_ids\x18\x04 \x03(\t\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x05 \x03(\tB\x08\n\x06_until\".\n\x13\x43\x61ncelTasksResponse\x12\x17\n\x0f\x63\x61ncelled_tasks\x18\x01 \x03(\t\"-\n\x13ReplayTasksResponse\x12\x16\n\x0ereplayed_tasks\x18\x01 \x03(\t\"\xae\x02\n\x19TriggerWorkflowRunRequest\x12\x15\n\rworkflow_name\x18\x01 \x01(\t\x12\r\n\x05input\x18\x02 \x01(\x0c\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x03 \x01(\x0c\x12\x15\n\x08priority\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12U\n\x15\x64\x65sired_worker_labels\x18\x05 \x03(\x0b\x32\x36.v1.TriggerWorkflowRunRequest.DesiredWorkerLabelsEntry\x1aS\n\x18\x44\x65siredWorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.v1.DesiredWorkerLabels:\x02\x38\x01\x42\x0b\n\t_priority\"1\n\x1aTriggerWorkflowRunResponse\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\"X\n\x18\x42ranchDurableTaskRequest\x12\x18\n\x10task_external_id\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x03\x12\x11\n\tbranch_id\x18\x03 \x01(\x03\"Y\n\x19\x42ranchDurableTaskResponse\x12\x18\n\x10task_external_id\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\x03\x12\x11\n\tbranch_id\x18\x03 \x01(\x03\"\xed\x04\n\x1c\x43reateWorkflowVersionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x16\n\x0e\x65vent_triggers\x18\x04 \x03(\t\x12\x15\n\rcron_triggers\x18\x05 \x03(\t\x12!\n\x05tasks\x18\x06 \x03(\x0b\x32\x12.v1.CreateTaskOpts\x12$\n\x0b\x63oncurrency\x18\x07 \x01(\x0b\x32\x0f.v1.Concurrency\x12\x17\n\ncron_input\x18\x08 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0fon_failure_task\x18\t \x01(\x0b\x32\x12.v1.CreateTaskOptsH\x01\x88\x01\x01\x12\'\n\x06sticky\x18\n \x01(\x0e\x32\x12.v1.StickyStrategyH\x02\x88\x01\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_priority\x18\x0b \x01(\x05H\x03\x88\x01\x01\x12(\n\x0f\x63oncurrency_arr\x18\x0c \x03(\x0b\x32\x0f.v1.Concurrency\x12*\n\x0f\x64\x65\x66\x61ult_filters\x18\r \x03(\x0b\x32\x11.v1.DefaultFilter\x12\x1e\n\x11input_json_schema\x18\x0e \x01(\x0cH\x04\x88\x01\x01\x12/\n\x0bidempotency\x18\x0f \x01(\x0b\x32\x15.v1.IdempotencyConfigH\x05\x88\x01\x01\x42\r\n\x0b_cron_inputB\x12\n\x10_on_failure_taskB\t\n\x07_stickyB\x13\n\x11_default_priorityB\x14\n\x12_input_json_schemaB\x0e\n\x0c_idempotency\"n\n\x11IdempotencyConfig\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\x0e\n\x06ttl_ms\x18\x02 \x01(\x03\x12*\n\x06method\x18\x03 \x01(\x0e\x32\x15.v1.IdempotencyMethodH\x00\x88\x01\x01\x42\t\n\x07_method\"`\n\x19IdempotencyCollisionError\x12 \n\x18\x65xisting_run_external_id\x18\x01 \x01(\t\x12!\n\x19\x63olliding_run_external_id\x18\x02 \x01(\t\"\x87\x01\n$BulkTriggerIdempotencyCollisionError\x12,\n$successful_workflow_run_external_ids\x18\x01 \x03(\t\x12\x31\n\ncollisions\x18\x02 \x03(\x0b\x32\x1d.v1.IdempotencyCollisionError\"T\n\rDefaultFilter\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\r\n\x05scope\x18\x02 \x01(\t\x12\x14\n\x07payload\x18\x03 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_payload\"\x93\x01\n\x0b\x43oncurrency\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\x15\n\x08max_runs\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x39\n\x0elimit_strategy\x18\x03 \x01(\x0e\x32\x1c.v1.ConcurrencyLimitStrategyH\x01\x88\x01\x01\x42\x0b\n\t_max_runsB\x11\n\x0f_limit_strategy\"\xb7\x05\n\x0e\x43reateTaskOpts\x12\x13\n\x0breadable_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\t\x12\x0f\n\x07timeout\x18\x03 \x01(\t\x12\x0e\n\x06inputs\x18\x04 \x01(\t\x12\x0f\n\x07parents\x18\x05 \x03(\t\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12,\n\x0brate_limits\x18\x07 \x03(\x0b\x32\x17.v1.CreateTaskRateLimit\x12;\n\rworker_labels\x18\x08 \x03(\x0b\x32$.v1.CreateTaskOpts.WorkerLabelsEntry\x12\x1b\n\x0e\x62\x61\x63koff_factor\x18\t \x01(\x02H\x00\x88\x01\x01\x12 \n\x13\x62\x61\x63koff_max_seconds\x18\n \x01(\x05H\x01\x88\x01\x01\x12$\n\x0b\x63oncurrency\x18\x0b \x03(\x0b\x32\x0f.v1.Concurrency\x12+\n\nconditions\x18\x0c \x01(\x0b\x32\x12.v1.TaskConditionsH\x02\x88\x01\x01\x12\x1d\n\x10schedule_timeout\x18\r \x01(\tH\x03\x88\x01\x01\x12\x12\n\nis_durable\x18\x0e \x01(\x08\x12;\n\rslot_requests\x18\x0f \x03(\x0b\x32$.v1.CreateTaskOpts.SlotRequestsEntry\x1aL\n\x11WorkerLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.v1.DesiredWorkerLabels:\x02\x38\x01\x1a\x33\n\x11SlotRequestsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x42\x11\n\x0f_backoff_factorB\x16\n\x14_backoff_max_secondsB\r\n\x0b_conditionsB\x13\n\x11_schedule_timeout\"\xfd\x01\n\x13\x43reateTaskRateLimit\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\x05units\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08key_expr\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nunits_expr\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11limit_values_expr\x18\x05 \x01(\tH\x03\x88\x01\x01\x12,\n\x08\x64uration\x18\x06 \x01(\x0e\x32\x15.v1.RateLimitDurationH\x04\x88\x01\x01\x42\x08\n\x06_unitsB\x0b\n\t_key_exprB\r\n\x0b_units_exprB\x14\n\x12_limit_values_exprB\x0b\n\t_duration\"@\n\x1d\x43reateWorkflowVersionResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x02 \x01(\t\"+\n\x14GetRunDetailsRequest\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\"\xaa\x01\n\rTaskRunDetail\x12\x13\n\x0b\x65xternal_id\x18\x01 \x01(\t\x12\x1d\n\x06status\x18\x02 \x01(\x0e\x32\r.v1.RunStatus\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06output\x18\x04 \x01(\x0cH\x01\x88\x01\x01\x12\x13\n\x0breadable_id\x18\x05 \x01(\t\x12\x12\n\nis_evicted\x18\x06 \x01(\x08\x42\x08\n\x06_errorB\t\n\x07_output\"\x84\x02\n\x15GetRunDetailsResponse\x12\r\n\x05input\x18\x01 \x01(\x0c\x12\x1d\n\x06status\x18\x02 \x01(\x0e\x32\r.v1.RunStatus\x12:\n\ttask_runs\x18\x03 \x03(\x0b\x32\'.v1.GetRunDetailsResponse.TaskRunsEntry\x12\x0c\n\x04\x64one\x18\x04 \x01(\x08\x12\x1b\n\x13\x61\x64\x64itional_metadata\x18\x05 \x01(\x0c\x12\x12\n\nis_evicted\x18\x06 \x01(\x08\x1a\x42\n\rTaskRunsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.v1.TaskRunDetail:\x02\x38\x01*$\n\x0eStickyStrategy\x12\x08\n\x04SOFT\x10\x00\x12\x08\n\x04HARD\x10\x01*]\n\x11RateLimitDuration\x12\n\n\x06SECOND\x10\x00\x12\n\n\x06MINUTE\x10\x01\x12\x08\n\x04HOUR\x10\x02\x12\x07\n\x03\x44\x41Y\x10\x03\x12\x08\n\x04WEEK\x10\x04\x12\t\n\x05MONTH\x10\x05\x12\x08\n\x04YEAR\x10\x06*[\n\tRunStatus\x12\n\n\x06QUEUED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x45VICTED\x10\x05*(\n\x11IdempotencyMethod\x12\x07\n\x03TTL\x10\x00\x12\n\n\x06STATUS\x10\x01*\x7f\n\x18\x43oncurrencyLimitStrategy\x12\x16\n\x12\x43\x41NCEL_IN_PROGRESS\x10\x00\x12\x0f\n\x0b\x44ROP_NEWEST\x10\x01\x12\x10\n\x0cQUEUE_NEWEST\x10\x02\x12\x15\n\x11GROUP_ROUND_ROBIN\x10\x03\x12\x11\n\rCANCEL_NEWEST\x10\x04\x32\xcf\x03\n\x0c\x41\x64minService\x12R\n\x0bPutWorkflow\x12 .v1.CreateWorkflowVersionRequest\x1a!.v1.CreateWorkflowVersionResponse\x12>\n\x0b\x43\x61ncelTasks\x12\x16.v1.CancelTasksRequest\x1a\x17.v1.CancelTasksResponse\x12>\n\x0bReplayTasks\x12\x16.v1.ReplayTasksRequest\x1a\x17.v1.ReplayTasksResponse\x12S\n\x12TriggerWorkflowRun\x12\x1d.v1.TriggerWorkflowRunRequest\x1a\x1e.v1.TriggerWorkflowRunResponse\x12\x44\n\rGetRunDetails\x12\x18.v1.GetRunDetailsRequest\x1a\x19.v1.GetRunDetailsResponse\x12P\n\x11\x42ranchDurableTask\x12\x1c.v1.BranchDurableTaskRequest\x1a\x1d.v1.BranchDurableTaskResponseBBZ@github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1b\x06proto3"
|
|
13
13
|
|
|
14
14
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
15
15
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -27,6 +27,7 @@ module V1
|
|
|
27
27
|
CreateWorkflowVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.CreateWorkflowVersionRequest").msgclass
|
|
28
28
|
IdempotencyConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.IdempotencyConfig").msgclass
|
|
29
29
|
IdempotencyCollisionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.IdempotencyCollisionError").msgclass
|
|
30
|
+
BulkTriggerIdempotencyCollisionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.BulkTriggerIdempotencyCollisionError").msgclass
|
|
30
31
|
DefaultFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.DefaultFilter").msgclass
|
|
31
32
|
Concurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.Concurrency").msgclass
|
|
32
33
|
CreateTaskOpts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.CreateTaskOpts").msgclass
|
|
@@ -38,5 +39,6 @@ module V1
|
|
|
38
39
|
StickyStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.StickyStrategy").enummodule
|
|
39
40
|
RateLimitDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.RateLimitDuration").enummodule
|
|
40
41
|
RunStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.RunStatus").enummodule
|
|
42
|
+
IdempotencyMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.IdempotencyMethod").enummodule
|
|
41
43
|
ConcurrencyLimitStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("v1.ConcurrencyLimitStrategy").enummodule
|
|
42
44
|
end
|
data/lib/hatchet/idempotency.rb
CHANGED
|
@@ -21,7 +21,41 @@ module Hatchet
|
|
|
21
21
|
|
|
22
22
|
# @return [V1::IdempotencyConfig]
|
|
23
23
|
def to_proto
|
|
24
|
-
::V1::IdempotencyConfig.new(
|
|
24
|
+
::V1::IdempotencyConfig.new(
|
|
25
|
+
expression: @expression,
|
|
26
|
+
ttl_ms: @ttl_ms,
|
|
27
|
+
method: ::V1::IdempotencyMethod::TTL,
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Status-based idempotency: keeps the idempotency key alive until the associated run
|
|
33
|
+
# reaches a terminal status. +fallback_ttl_ms+ caps how long the key can live before
|
|
34
|
+
# it's evicted, even if the run has not reached a terminal status.
|
|
35
|
+
#
|
|
36
|
+
# @example
|
|
37
|
+
# Hatchet::StatusBasedIdempotencyConfig.new(expression: "input.id", fallback_ttl_ms: 10_000)
|
|
38
|
+
class StatusBasedIdempotencyConfig
|
|
39
|
+
# @return [String] CEL expression evaluated against workflow input
|
|
40
|
+
attr_reader :expression
|
|
41
|
+
|
|
42
|
+
# @return [Integer] Fallback TTL in milliseconds; the longest the key can live
|
|
43
|
+
attr_reader :fallback_ttl_ms
|
|
44
|
+
|
|
45
|
+
# @param expression [String] CEL expression to derive the idempotency key
|
|
46
|
+
# @param fallback_ttl_ms [Integer] Fallback TTL for the idempotency key in milliseconds
|
|
47
|
+
def initialize(expression:, fallback_ttl_ms:)
|
|
48
|
+
@expression = expression
|
|
49
|
+
@fallback_ttl_ms = fallback_ttl_ms
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @return [V1::IdempotencyConfig]
|
|
53
|
+
def to_proto
|
|
54
|
+
::V1::IdempotencyConfig.new(
|
|
55
|
+
expression: @expression,
|
|
56
|
+
ttl_ms: @fallback_ttl_ms,
|
|
57
|
+
method: ::V1::IdempotencyMethod::STATUS,
|
|
58
|
+
)
|
|
25
59
|
end
|
|
26
60
|
end
|
|
27
61
|
end
|
data/lib/hatchet/version.rb
CHANGED
data/lib/hatchet/workflow.rb
CHANGED
|
@@ -46,7 +46,7 @@ module Hatchet
|
|
|
46
46
|
# @return [Task, nil] The on_success task
|
|
47
47
|
attr_reader :on_success
|
|
48
48
|
|
|
49
|
-
# @return [Hatchet::TTLBasedIdempotencyConfig, nil] Idempotency configuration
|
|
49
|
+
# @return [Hatchet::TTLBasedIdempotencyConfig, Hatchet::StatusBasedIdempotencyConfig, nil] Idempotency configuration
|
|
50
50
|
attr_reader :idempotency
|
|
51
51
|
|
|
52
52
|
# @return [String, nil] The workflow ID writer (set after registration)
|
|
@@ -60,7 +60,7 @@ module Hatchet
|
|
|
60
60
|
# @param task_defaults [Hash, nil] Default task settings
|
|
61
61
|
# @param default_filters [Array<DefaultFilter>] Default filters
|
|
62
62
|
# @param sticky [Symbol, nil] Sticky strategy
|
|
63
|
-
# @param idempotency [Hatchet::TTLBasedIdempotencyConfig, nil] Idempotency configuration
|
|
63
|
+
# @param idempotency [Hatchet::TTLBasedIdempotencyConfig, Hatchet::StatusBasedIdempotencyConfig, nil] Idempotency configuration
|
|
64
64
|
# @param client [Hatchet::Client, nil] The client
|
|
65
65
|
def initialize(
|
|
66
66
|
name:,
|
data/sig/hatchet/idempotency.rbs
CHANGED
|
@@ -6,4 +6,12 @@ module Hatchet
|
|
|
6
6
|
def initialize: (expression: String, ttl_ms: Integer) -> void
|
|
7
7
|
def to_proto: () -> untyped
|
|
8
8
|
end
|
|
9
|
+
|
|
10
|
+
class StatusBasedIdempotencyConfig
|
|
11
|
+
attr_reader expression: String
|
|
12
|
+
attr_reader fallback_ttl_ms: Integer
|
|
13
|
+
|
|
14
|
+
def initialize: (expression: String, fallback_ttl_ms: Integer) -> void
|
|
15
|
+
def to_proto: () -> untyped
|
|
16
|
+
end
|
|
9
17
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hatchet-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- gabriel ruttner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -207,12 +207,15 @@ files:
|
|
|
207
207
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb
|
|
208
208
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/cel_api.rb
|
|
209
209
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/default_api.rb
|
|
210
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/durable_tasks_api.rb
|
|
210
211
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/event_api.rb
|
|
212
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/feature_flags_api.rb
|
|
211
213
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/filter_api.rb
|
|
212
214
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/github_api.rb
|
|
213
215
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/healthcheck_api.rb
|
|
214
216
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb
|
|
215
217
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/metadata_api.rb
|
|
218
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/observability_api.rb
|
|
216
219
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb
|
|
217
220
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/slack_api.rb
|
|
218
221
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sns_api.rb
|
|
@@ -227,6 +230,7 @@ files:
|
|
|
227
230
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb
|
|
228
231
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_client.rb
|
|
229
232
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_error.rb
|
|
233
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_model_base.rb
|
|
230
234
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/configuration.rb
|
|
231
235
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/accept_invite_request.rb
|
|
232
236
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_error.rb
|
|
@@ -265,6 +269,8 @@ files:
|
|
|
265
269
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_update_cancel200_response.rb
|
|
266
270
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_workflow_run_summary.rb
|
|
267
271
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/events.rb
|
|
272
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_evaluation_result.rb
|
|
273
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/feature_flag_id.rb
|
|
268
274
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/get_step_run_diff_response.rb
|
|
269
275
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/info_get_version200_response.rb
|
|
270
276
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job.rb
|
|
@@ -279,6 +285,10 @@ files:
|
|
|
279
285
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_list.rb
|
|
280
286
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_direction.rb
|
|
281
287
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_field.rb
|
|
288
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span.rb
|
|
289
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_kind.rb
|
|
290
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_span_list.rb
|
|
291
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/otel_status_code.rb
|
|
282
292
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pagination_response.rb
|
|
283
293
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request.rb
|
|
284
294
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request_state.rb
|
|
@@ -339,6 +349,7 @@ files:
|
|
|
339
349
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_policy.rb
|
|
340
350
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_step_run_queue_metrics.rb
|
|
341
351
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_version.rb
|
|
352
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_run_result.rb
|
|
342
353
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_workflow_run_request.rb
|
|
343
354
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_cron_workflow_trigger_request.rb
|
|
344
355
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_scheduled_workflow_run_request.rb
|
|
@@ -353,6 +364,9 @@ files:
|
|
|
353
364
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_register_request.rb
|
|
354
365
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_memberships_list.rb
|
|
355
366
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_public.rb
|
|
367
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_additional_metadata_operator.rb
|
|
368
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_request.rb
|
|
369
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_branch_durable_task_response.rb
|
|
356
370
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancel_task_request.rb
|
|
357
371
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancelled_tasks.rb
|
|
358
372
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cel_debug_request.rb
|
|
@@ -365,6 +379,10 @@ files:
|
|
|
365
379
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_basic_auth.rb
|
|
366
380
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_webhook_request_hmac.rb
|
|
367
381
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_dag_children.rb
|
|
382
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_entry.rb
|
|
383
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_event_log_kind.rb
|
|
384
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition.rb
|
|
385
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_durable_wait_condition_kind.rb
|
|
368
386
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event.rb
|
|
369
387
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_list.rb
|
|
370
388
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_triggered_run.rb
|
|
@@ -375,8 +393,13 @@ files:
|
|
|
375
393
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_level.rb
|
|
376
394
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_list.rb
|
|
377
395
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_order_by_direction.rb
|
|
396
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metric.rb
|
|
397
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_logs_point_metrics.rb
|
|
378
398
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replay_task_request.rb
|
|
379
399
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replayed_tasks.rb
|
|
400
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_restore_task_response.rb
|
|
401
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_detail_count.rb
|
|
402
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_running_filter.rb
|
|
380
403
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event.rb
|
|
381
404
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_list.rb
|
|
382
405
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb
|
|
@@ -393,6 +416,7 @@ files:
|
|
|
393
416
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb
|
|
394
417
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_filter_request.rb
|
|
395
418
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb
|
|
419
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_wait_item.rb
|
|
396
420
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook.rb
|
|
397
421
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook_api_key_auth.rb
|
|
398
422
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_webhook_auth_type.rb
|
|
@@ -422,6 +446,7 @@ files:
|
|
|
422
446
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_info.rb
|
|
423
447
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_sdks.rb
|
|
424
448
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_slot_config.rb
|
|
449
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_status.rb
|
|
425
450
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_type.rb
|
|
426
451
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb
|
|
427
452
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_concurrency.rb
|
|
@@ -446,7 +471,11 @@ files:
|
|
|
446
471
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_update_request.rb
|
|
447
472
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version.rb
|
|
448
473
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_definition.rb
|
|
474
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_idempotency.rb
|
|
449
475
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_meta.rb
|
|
476
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task.rb
|
|
477
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_desired_worker_label.rb
|
|
478
|
+
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_task_rate_limit.rb
|
|
450
479
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_workers_count.rb
|
|
451
480
|
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/version.rb
|
|
452
481
|
- lib/hatchet/clients/rest/spec/spec_helper.rb
|