durable-workflow 2.21.2__tar.gz → 2.22.0__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.
- {durable_workflow-2.21.2/src/durable_workflow.egg-info → durable_workflow-2.22.0}/PKG-INFO +1 -1
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/pyproject.toml +3 -3
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/__init__.py +2 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/client.py +11 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/errors.py +14 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/sync.py +2 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/worker.py +5 -4
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/workflow.py +8 -10
- {durable_workflow-2.21.2 → durable_workflow-2.22.0/src/durable_workflow.egg-info}/PKG-INFO +1 -1
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_completion_size_limit.py +6 -2
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_failure_order.py +11 -9
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_replay_regression_corpus.py +26 -2
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_standalone_activity_client.py +43 -1
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sync.py +2 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker.py +3 -1
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/LICENSE +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/README.md +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/setup.cfg +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_activity_checkpoint.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_activity_lease.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_activity_process.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_avro.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_cancellation_scope.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_cancellation_scope_history.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_capabilities_digest.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_condition_fingerprint.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_cooperative_cancellation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_failure_reporting.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_metric_routes.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_poll_transport.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_prepared_local_activity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_query_task_authority.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_response_limit.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_sticky_workflow_cache.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_typed_values.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/activity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/auth_composition.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/cancellation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_storage.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_task_input.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_task_result.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/history_bundle_verify.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/interceptors.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/invocable.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/metrics.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/nexus.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/py.typed +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/python_conformance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_clock.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_clock_math.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_conformance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_verify.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/retry_policy.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/serializer.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/server_compatibility.json +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/telemetry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/telemetry_carrier.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/testing.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/worker_session.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/worker_status.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/workflow_updates_conformance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/SOURCES.txt +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/entry_points.txt +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/requires.txt +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/top_level.txt +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_acceptance_authority.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_acceptance_consumer.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_acceptance_entry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_cancellation_policies.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_checkpoint.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_context.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_exponential_retry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_heartbeat_authority.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_identity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_install_inventory.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_lease_authority.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_lease_renewal.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_lease_worker.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_process.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_retry_cap_cell.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_retry_info.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_run_closed_refusal.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_worker_lost.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_auth_composition.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_avro_value_benchmark.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_avro_value_protocol.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_child.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_parallel.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_redrive.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_sequence_claims.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_cause.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_context.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_remaining_time.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_scope_admission.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_scope_authoring.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_scope_boundary.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cancellation_scope_opening.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_capabilities_digest.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_capabilities_digest_unknown.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_checkpointed_batch_example.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_child_workflow_policies.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_ci_checkout.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_ci_integration_endpoint.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_client.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_client_iterators.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_client_telemetry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_client_timeouts.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_codec_regression_corpus.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_command_keys_acceptance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_command_keys_captured_inputs.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_command_keys_container_ownership.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_command_keys_workspace.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_committed_cancellation_scope_descendants.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_committed_cancellation_scope_groups.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_committed_cancellation_scope_history.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_committed_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_condition_fingerprint.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_condition_occurrence_id.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_condition_replay_drift.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_control_plane_parity_fixtures.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cooperative_cancellation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cooperative_cancellation_client.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cooperative_cancellation_worker.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_cooperative_remote_worker.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_docs_release_channel.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_docstring_cross_references.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_durable_selection.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_empty_callback_failure.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_errors.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_external_storage.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_external_task_input.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_external_task_result.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_failure_reporting.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_generator_lifecycle.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_golden_history_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_history_bundle_pruned.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_history_bundle_schema2.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_history_bundle_verify.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_history_event_contract.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_invocable.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_local_activity_backoff.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_local_failure_reporting.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_message_streams.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_metric_routes.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_metrics.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_native_timer_redrive_cell.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_native_timer_redrive_clock.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_nexus_durable_wait.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_nexus_namespace.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_nexus_wire.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_order_processing_example.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_completion_order_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_group_boundaries.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_group_policy.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_member_failure_open_siblings.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_parallel_saga_authoring.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_patch_history.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_payload_policy_refresh.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_pending_operation_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_physical_command_key_readback.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_poll_failure_backoff.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_poll_transport.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_portal_source_split.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_prepared_local_activity_client.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_prepared_local_activity_groups.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_prepared_local_activity_policies.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_prepared_local_activity_worker.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_public_boundary_scanner.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_publish_workflow_isolation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_published_activity_acceptance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_published_pagination_evidence.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_pypi_project_surface.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_python_conformance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_queries.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_query_task_authority.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_query_timeout_retry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_quiesced_snapshot.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_readme_quickstart.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_redrive_call_ledger.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_redrive_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_redrive_successor_evidence.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_registration_ambiguity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_release_metadata.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_release_promotion.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_replay_clock.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_replay_conformance.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_replay_verify.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_response_body_limit.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_result_continue_as_new.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_retry_cap_download.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_retry_cap_workflow.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_retry_policy.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_run_activities.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_run_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_run_closed_settlement_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_runtime_external_payload_transport.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_schedule_origin.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_schedules.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_scoped_run_cancellation_context.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sdk_metrics_contract.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_search_attribute_replay_identity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_serializer.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_signal_external_workflow.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_signal_with_start.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_signals.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sleep.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_static_credential_validation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sticky_execution.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sticky_history_suffix.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_storage_admission.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_sync_activities.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_synthetic_command_key_readback.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_telemetry.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_telemetry_carrier.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_testing_failures.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_testing_harness.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_testing_nexus.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_threaded_heartbeat_example.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_tls_trust.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_transport_diagnostics.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_typed_values.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_typed_workflow_values.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_update_outcome.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_update_signal_condition_replay.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_updates.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_wait_condition.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_deregistration.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_observation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_session.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_startup_buffered.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_startup_raw.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_startup_read_budget.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_startup_snapshot.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_status.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_telemetry_wire.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_worker_transient_runtime.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_entry_arguments.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_entrypoint_validation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_handler_validation.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_identity.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_result_timeout.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_streams.py +0 -0
- {durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_workflow_updates_conformance.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "durable-workflow"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.22.0"
|
|
8
8
|
description = "Python client and worker SDK for Durable Workflow Cloud and self-hosted Server"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -79,8 +79,8 @@ durable-workflow-replay-conformance = "durable_workflow.replay_conformance:main"
|
|
|
79
79
|
durable-workflow-workflow-updates-conformance = "durable_workflow.workflow_updates_conformance:main"
|
|
80
80
|
|
|
81
81
|
[tool.durable-workflow]
|
|
82
|
-
product-train = "2.
|
|
83
|
-
registry-version = "2.
|
|
82
|
+
product-train = "2.22.0"
|
|
83
|
+
registry-version = "2.22.0"
|
|
84
84
|
supported-server-versions = "2.8.0"
|
|
85
85
|
supported-server-release-baselines = { "2" = "2.8.0", "3" = "3.0.0" }
|
|
86
86
|
worker-protocol-version = "1.20"
|
|
@@ -69,6 +69,7 @@ from .client import (
|
|
|
69
69
|
WorkflowStreamPage,
|
|
70
70
|
)
|
|
71
71
|
from .errors import (
|
|
72
|
+
ActivityAlreadyStarted,
|
|
72
73
|
ActivityCancelled,
|
|
73
74
|
ActivityFailed,
|
|
74
75
|
ActivityHeartbeatResumeUnavailable,
|
|
@@ -262,6 +263,7 @@ from .workflow import (
|
|
|
262
263
|
|
|
263
264
|
__all__ = [
|
|
264
265
|
"__version__",
|
|
266
|
+
"ActivityAlreadyStarted",
|
|
265
267
|
"ActivityCancelled",
|
|
266
268
|
"ActivityFailed",
|
|
267
269
|
"ActivityContext",
|
|
@@ -4779,6 +4779,7 @@ class Client:
|
|
|
4779
4779
|
schedule_to_start_timeout_seconds: int | None = None,
|
|
4780
4780
|
schedule_to_close_timeout_seconds: int | None = None,
|
|
4781
4781
|
heartbeat_timeout_seconds: int | None = None,
|
|
4782
|
+
duplicate_policy: str | None = None,
|
|
4782
4783
|
) -> StandaloneActivityHandle:
|
|
4783
4784
|
"""Start a standalone activity and return a handle bound to it.
|
|
4784
4785
|
|
|
@@ -4796,6 +4797,14 @@ class Client:
|
|
|
4796
4797
|
free-form label that surfaces on the listing/show endpoints — it
|
|
4797
4798
|
does not affect dispatch.
|
|
4798
4799
|
|
|
4800
|
+
Native Server 3.14.0 and later accept ``duplicate_policy="fail"``
|
|
4801
|
+
or ``"use-existing"`` for an active activity ID. Omission uses the
|
|
4802
|
+
Server's default, ``fail``, which raises
|
|
4803
|
+
:class:`~durable_workflow.errors.ActivityAlreadyStarted`. A
|
|
4804
|
+
``use-existing`` start returns the original execution's handle and
|
|
4805
|
+
keeps its original arguments and type. A closed ID starts a new
|
|
4806
|
+
execution under either policy.
|
|
4807
|
+
|
|
4799
4808
|
``input`` is a list of positional arguments passed to the
|
|
4800
4809
|
activity, encoded with the default payload codec.
|
|
4801
4810
|
``retry_policy`` follows the same shape used inside a workflow
|
|
@@ -4836,6 +4845,8 @@ class Client:
|
|
|
4836
4845
|
body["schedule_to_close_timeout_seconds"] = schedule_to_close_timeout_seconds
|
|
4837
4846
|
if heartbeat_timeout_seconds is not None:
|
|
4838
4847
|
body["heartbeat_timeout_seconds"] = heartbeat_timeout_seconds
|
|
4848
|
+
if duplicate_policy is not None:
|
|
4849
|
+
body["duplicate_policy"] = duplicate_policy
|
|
4839
4850
|
|
|
4840
4851
|
data = await self._request(
|
|
4841
4852
|
"POST",
|
|
@@ -536,6 +536,15 @@ class WorkflowAlreadyStarted(DurableWorkflowError):
|
|
|
536
536
|
self.workflow_id = workflow_id
|
|
537
537
|
|
|
538
538
|
|
|
539
|
+
class ActivityAlreadyStarted(DurableWorkflowError):
|
|
540
|
+
"""A standalone activity ID already has an active execution."""
|
|
541
|
+
|
|
542
|
+
def __init__(self, activity_id: str, workflow_run_id: str | None = None) -> None:
|
|
543
|
+
super().__init__(f"activity already started: {activity_id}")
|
|
544
|
+
self.activity_id = activity_id
|
|
545
|
+
self.workflow_run_id = workflow_run_id
|
|
546
|
+
|
|
547
|
+
|
|
539
548
|
class NamespaceNotFound(DurableWorkflowError):
|
|
540
549
|
"""The namespace configured on the :class:`~durable_workflow.Client` is unknown to the server."""
|
|
541
550
|
|
|
@@ -1391,6 +1400,11 @@ def _raise_for_status(
|
|
|
1391
1400
|
if status == 409:
|
|
1392
1401
|
if reason == "schedule_already_exists":
|
|
1393
1402
|
raise ScheduleAlreadyExists(context)
|
|
1403
|
+
if reason == "activity_already_started":
|
|
1404
|
+
raise ActivityAlreadyStarted(
|
|
1405
|
+
_body_string(body, "activity_id") or context,
|
|
1406
|
+
_body_string(body, "workflow_run_id"),
|
|
1407
|
+
)
|
|
1394
1408
|
if reason in ("duplicate_not_allowed", "instance_already_started"):
|
|
1395
1409
|
raise WorkflowAlreadyStarted(context)
|
|
1396
1410
|
if reason == "run_not_active":
|
|
@@ -710,6 +710,7 @@ class Client:
|
|
|
710
710
|
schedule_to_start_timeout_seconds: int | None = None,
|
|
711
711
|
schedule_to_close_timeout_seconds: int | None = None,
|
|
712
712
|
heartbeat_timeout_seconds: int | None = None,
|
|
713
|
+
duplicate_policy: str | None = None,
|
|
713
714
|
) -> SyncStandaloneActivityHandle:
|
|
714
715
|
handle = self._runner.run(
|
|
715
716
|
self._async.start_activity(
|
|
@@ -724,6 +725,7 @@ class Client:
|
|
|
724
725
|
schedule_to_start_timeout_seconds=schedule_to_start_timeout_seconds,
|
|
725
726
|
schedule_to_close_timeout_seconds=schedule_to_close_timeout_seconds,
|
|
726
727
|
heartbeat_timeout_seconds=heartbeat_timeout_seconds,
|
|
728
|
+
duplicate_policy=duplicate_policy,
|
|
727
729
|
)
|
|
728
730
|
)
|
|
729
731
|
return SyncStandaloneActivityHandle(handle, self._runner)
|
|
@@ -1318,7 +1318,7 @@ RECORD_PARALLEL_FAILURE_ORDER_ENV = "DURABLE_WORKFLOW_RECORD_PARALLEL_FAILURE_OR
|
|
|
1318
1318
|
def _record_parallel_failure_order(value: bool | None) -> bool:
|
|
1319
1319
|
"""The worker's failure-order recording setting, refused when malformed."""
|
|
1320
1320
|
if value is None:
|
|
1321
|
-
raw = os.environ.get(RECORD_PARALLEL_FAILURE_ORDER_ENV, "")
|
|
1321
|
+
raw = os.environ.get(RECORD_PARALLEL_FAILURE_ORDER_ENV, "true")
|
|
1322
1322
|
setting = raw.strip().lower()
|
|
1323
1323
|
if setting in ("", "false", "0"):
|
|
1324
1324
|
return False
|
|
@@ -1366,9 +1366,10 @@ class Worker:
|
|
|
1366
1366
|
failure-order marker before their first all-group, so their groups
|
|
1367
1367
|
raise the first recorded member failure (sdk-python#307). ``None``
|
|
1368
1368
|
reads ``DURABLE_WORKFLOW_RECORD_PARALLEL_FAILURE_ORDER`` (``true`` or
|
|
1369
|
-
``false``, default ``
|
|
1370
|
-
task queue
|
|
1371
|
-
|
|
1369
|
+
``false``, default ``true``). Before using this default, upgrade every
|
|
1370
|
+
worker on the task queue to SDK 2.21.0 or later. Set ``False`` to keep
|
|
1371
|
+
recording off. Workers on 2.21.0 and later follow a marker that a run
|
|
1372
|
+
already recorded regardless of the setting.
|
|
1372
1373
|
"""
|
|
1373
1374
|
self.client = client
|
|
1374
1375
|
self.record_parallel_failure_order = _record_parallel_failure_order(record_parallel_failure_order)
|
|
@@ -3764,9 +3764,9 @@ def replay(
|
|
|
3764
3764
|
|
|
3765
3765
|
``record_parallel_failure_order`` lets a run that reaches its first
|
|
3766
3766
|
all-group now record ``PARALLEL_FAILURE_ORDER_MARKER`` and raise its first
|
|
3767
|
-
recorded member failure (sdk-python#307).
|
|
3768
|
-
|
|
3769
|
-
|
|
3767
|
+
recorded member failure (sdk-python#307). Direct calls to this helper
|
|
3768
|
+
default to recording off. Workers pass their configured setting. Replay
|
|
3769
|
+
always follows a marker already present in history.
|
|
3770
3770
|
"""
|
|
3771
3771
|
return _replay_state(
|
|
3772
3772
|
workflow_cls,
|
|
@@ -6848,10 +6848,9 @@ def _replay_state(
|
|
|
6848
6848
|
A run reaching its first all-group now records the marker directly
|
|
6849
6849
|
before scheduling it. No all-group of the run has produced an outcome
|
|
6850
6850
|
before that point, so no earlier task can have chosen a failure under
|
|
6851
|
-
the other rule. Recording
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
keeps the earlier rule.
|
|
6851
|
+
the other rule. Recording follows ``record_parallel_failure_order``.
|
|
6852
|
+
A run with a cancellation request that may replace the group records
|
|
6853
|
+
no marker and keeps the earlier rule.
|
|
6855
6854
|
"""
|
|
6856
6855
|
nonlocal result_cursor, authored_sequence
|
|
6857
6856
|
marker = RecordVersionMarker(
|
|
@@ -6880,9 +6879,8 @@ def _replay_state(
|
|
|
6880
6879
|
pending.append(marker)
|
|
6881
6880
|
authored_sequence += 1
|
|
6882
6881
|
return True
|
|
6883
|
-
#
|
|
6884
|
-
#
|
|
6885
|
-
# cancellation request that may replace it: the earlier rule.
|
|
6882
|
+
# Keep the earlier rule when the group was recorded without a marker,
|
|
6883
|
+
# recording is off, or cancellation may replace the group.
|
|
6886
6884
|
return False
|
|
6887
6885
|
|
|
6888
6886
|
def _parallel_leaf_kind(command: Any) -> str:
|
|
@@ -119,7 +119,9 @@ async def test_typed_413_fails_the_run_once_without_resending_the_completion() -
|
|
|
119
119
|
"/api/worker/workflow-tasks/task-413/complete",
|
|
120
120
|
]
|
|
121
121
|
oversized, failure = (body(request) for request in requests)
|
|
122
|
-
assert [command["type"] for command in oversized["commands"]] == [
|
|
122
|
+
assert [command["type"] for command in oversized["commands"]] == [
|
|
123
|
+
"record_version_marker", *["schedule_activity"] * 4,
|
|
124
|
+
]
|
|
123
125
|
assert (failure["lease_owner"], failure["workflow_task_attempt"]) == ("worker-413", 3)
|
|
124
126
|
assert len(failure["commands"]) == 1
|
|
125
127
|
command = failure["commands"][0]
|
|
@@ -277,7 +279,9 @@ async def test_typed_409_fails_the_run_once_without_resending_or_failing_the_tas
|
|
|
277
279
|
"/api/worker/workflow-tasks/task-413/complete",
|
|
278
280
|
]
|
|
279
281
|
refused, failure = (body(request) for request in requests)
|
|
280
|
-
assert [command["type"] for command in refused["commands"]] == [
|
|
282
|
+
assert [command["type"] for command in refused["commands"]] == [
|
|
283
|
+
"record_version_marker", *["schedule_activity"] * 4,
|
|
284
|
+
]
|
|
281
285
|
assert (failure["lease_owner"], failure["workflow_task_attempt"]) == ("worker-413", 3)
|
|
282
286
|
command = failure["commands"][0]
|
|
283
287
|
assert (command["type"], command["non_retryable"]) == ("fail_workflow", True)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"""sdk-python#307: which member failure an all() group raises.
|
|
2
2
|
|
|
3
|
-
With recording enabled
|
|
4
|
-
|
|
5
|
-
the first all-group that can fail, when that group is first scheduled. A marked
|
|
3
|
+
With recording enabled, a run records ``PARALLEL_FAILURE_ORDER_MARKER``
|
|
4
|
+
directly before scheduling the first all-group that can fail. A marked
|
|
6
5
|
run raises the first member failure recorded in history, as soon as it is
|
|
7
6
|
recorded, whether or not the other members have settled. Every worker follows a
|
|
8
7
|
recorded marker, with recording on or off. A run whose first all-group was
|
|
@@ -124,9 +123,9 @@ def _commands(history: list[dict[str, Any]], definition: type = FailureOrder, *,
|
|
|
124
123
|
record_parallel_failure_order=record).commands
|
|
125
124
|
|
|
126
125
|
|
|
127
|
-
def
|
|
126
|
+
def test_recording_disabled_keeps_the_released_commands_for_new_runs() -> None:
|
|
128
127
|
started = [{"event_type": "WorkflowStarted", "payload": {}}]
|
|
129
|
-
commands =
|
|
128
|
+
commands = _commands(started, record=False)
|
|
130
129
|
assert FAILURE_ORDER_MARKER not in commands
|
|
131
130
|
wire = commands_to_server_commands(commands, "queue", payload_codec=serializer.AVRO_CODEC)
|
|
132
131
|
assert [command["parallel_group_base_sequence"] for command in wire] == [1] * SIZE
|
|
@@ -423,7 +422,7 @@ class ReviewPlain:
|
|
|
423
422
|
return self.caught
|
|
424
423
|
|
|
425
424
|
|
|
426
|
-
@pytest.mark.parametrize("raw,expected", [(None,
|
|
425
|
+
@pytest.mark.parametrize("raw,expected", [(None, True), ("", False), ("false", False), ("0", False),
|
|
427
426
|
("true", True), ("1", True), (" TRUE ", True)])
|
|
428
427
|
def test_the_worker_setting_reads_its_environment_variable(
|
|
429
428
|
monkeypatch: pytest.MonkeyPatch, raw: str | None, expected: bool,
|
|
@@ -449,9 +448,12 @@ def test_a_malformed_worker_setting_is_refused(monkeypatch: pytest.MonkeyPatch,
|
|
|
449
448
|
record_parallel_failure_order="true") # type: ignore[arg-type]
|
|
450
449
|
|
|
451
450
|
|
|
452
|
-
@pytest.mark.parametrize("record", [False, True])
|
|
451
|
+
@pytest.mark.parametrize("record", [None, False, True])
|
|
453
452
|
@pytest.mark.asyncio
|
|
454
|
-
async def test_the_worker_writes_the_marker_only_when_enabled(
|
|
453
|
+
async def test_the_worker_writes_the_marker_only_when_enabled(
|
|
454
|
+
monkeypatch: pytest.MonkeyPatch, record: bool | None,
|
|
455
|
+
) -> None:
|
|
456
|
+
monkeypatch.delenv(RECORD_PARALLEL_FAILURE_ORDER_ENV, raising=False)
|
|
455
457
|
client = AsyncMock(spec=Client)
|
|
456
458
|
worker = Worker(client, task_queue="q", workflows=[FailureOrder], record_parallel_failure_order=record)
|
|
457
459
|
await worker._run_workflow_task({
|
|
@@ -461,4 +463,4 @@ async def test_the_worker_writes_the_marker_only_when_enabled(record: bool) -> N
|
|
|
461
463
|
})
|
|
462
464
|
commands = client.complete_workflow_task.call_args.kwargs["commands"]
|
|
463
465
|
types = [command["type"] for command in commands]
|
|
464
|
-
assert types == (["record_version_marker"] if record else []) + ["schedule_activity"] * SIZE
|
|
466
|
+
assert types == (["record_version_marker"] if record is not False else []) + ["schedule_activity"] * SIZE
|
|
@@ -2,11 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import json
|
|
5
|
+
import os
|
|
5
6
|
from collections.abc import Mapping, Sequence
|
|
6
7
|
from importlib import metadata
|
|
7
8
|
from pathlib import Path
|
|
8
9
|
from typing import Any
|
|
9
|
-
from unittest.mock import AsyncMock
|
|
10
|
+
from unittest.mock import AsyncMock, patch
|
|
10
11
|
|
|
11
12
|
import httpx
|
|
12
13
|
import pytest
|
|
@@ -21,6 +22,7 @@ from durable_workflow.errors import (
|
|
|
21
22
|
)
|
|
22
23
|
from durable_workflow.replay_conformance import compose_report
|
|
23
24
|
from durable_workflow.retry_policy import TransportRetryPolicy
|
|
25
|
+
from durable_workflow.worker import RECORD_PARALLEL_FAILURE_ORDER_ENV
|
|
24
26
|
from durable_workflow.workflow import (
|
|
25
27
|
LocalActivityExecutionAborted,
|
|
26
28
|
WorkflowContext,
|
|
@@ -715,7 +717,11 @@ def _execute_completion_size_limit(inputs: Any) -> list[dict[str, Any]]:
|
|
|
715
717
|
retry_policy=TransportRetryPolicy(max_attempts=1))
|
|
716
718
|
client._http = httpx.AsyncClient(base_url=client.base_url, transport=httpx.MockTransport(reply))
|
|
717
719
|
async with client:
|
|
718
|
-
|
|
720
|
+
# Keep the original completion-limit fixtures on the pre-marker wire contract.
|
|
721
|
+
worker = Worker(
|
|
722
|
+
client, task_queue="queue", worker_id="holder", workflows=[CompletionSizeFanOutWorkflow],
|
|
723
|
+
record_parallel_failure_order=False,
|
|
724
|
+
)
|
|
719
725
|
await worker._run_workflow_task({
|
|
720
726
|
"task_id": "task", "workflow_id": "workflow", "run_id": "run", "workflow_task_attempt": 1,
|
|
721
727
|
"workflow_type": "sdk.completion-size-limit.fan-out", "payload_codec": "avro",
|
|
@@ -850,6 +856,24 @@ def _execute_fixture(fixture: dict[str, Any]) -> list[dict[str, Any]]:
|
|
|
850
856
|
if "history" in fixture:
|
|
851
857
|
assert history
|
|
852
858
|
|
|
859
|
+
if workflow.get("worker_default_parallel_failure_order") is True:
|
|
860
|
+
async def run_first_task() -> list[dict[str, Any]]:
|
|
861
|
+
client = AsyncMock(spec=Client)
|
|
862
|
+
with patch.dict(os.environ):
|
|
863
|
+
os.environ.pop(RECORD_PARALLEL_FAILURE_ORDER_ENV, None)
|
|
864
|
+
worker = Worker(client, task_queue="regression-corpus", workflows=[WORKFLOW_TYPES[workflow_type]])
|
|
865
|
+
await worker._run_workflow_task({
|
|
866
|
+
"task_id": "first-task", "workflow_type": workflow_type, "workflow_task_attempt": 1,
|
|
867
|
+
"workflow_id": workflow["workflow_id"], "run_id": workflow["run_id"], "history_events": history,
|
|
868
|
+
"arguments": serializer.envelope(start_input, codec=payload_codec), "payload_codec": payload_codec,
|
|
869
|
+
})
|
|
870
|
+
client.complete_workflow_task.assert_awaited_once()
|
|
871
|
+
return client.complete_workflow_task.call_args.kwargs["commands"]
|
|
872
|
+
|
|
873
|
+
commands = asyncio.run(run_first_task())
|
|
874
|
+
_assert_matches(fixture["expected"], {"command_sequence": commands}, f"{fixture['id']}.expected")
|
|
875
|
+
return commands
|
|
876
|
+
|
|
853
877
|
query = workflow.get("query")
|
|
854
878
|
query_result: Any = None
|
|
855
879
|
registered_workflows = [WORKFLOW_TYPES[workflow_type]]
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_standalone_activity_client.py
RENAMED
|
@@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, patch
|
|
|
6
6
|
import httpx
|
|
7
7
|
import pytest
|
|
8
8
|
|
|
9
|
-
from durable_workflow import serializer
|
|
9
|
+
from durable_workflow import ActivityAlreadyStarted, serializer
|
|
10
10
|
from durable_workflow.client import (
|
|
11
11
|
Client,
|
|
12
12
|
StandaloneActivityHandle,
|
|
@@ -103,6 +103,48 @@ class TestStartActivity:
|
|
|
103
103
|
assert "input" not in body
|
|
104
104
|
assert "activity_id" not in body
|
|
105
105
|
assert "retry_policy" not in body
|
|
106
|
+
assert "duplicate_policy" not in body
|
|
107
|
+
|
|
108
|
+
async def test_use_existing_returns_the_original_execution(self, client: Client) -> None:
|
|
109
|
+
response = _mock_response(200, {
|
|
110
|
+
"activity_id": "job-1",
|
|
111
|
+
"activity_execution_id": "original-execution",
|
|
112
|
+
"workflow_run_id": "original-run",
|
|
113
|
+
"workflow_type": "dw.standalone_activity",
|
|
114
|
+
"activity_type": "original-type",
|
|
115
|
+
"outcome": "returned_existing_active",
|
|
116
|
+
})
|
|
117
|
+
with patch.object(client._http, "request", new_callable=AsyncMock, return_value=response) as request:
|
|
118
|
+
handle = await client.start_activity(
|
|
119
|
+
activity_type="retry-type",
|
|
120
|
+
task_queue="outbox",
|
|
121
|
+
activity_id="job-1",
|
|
122
|
+
duplicate_policy="use-existing",
|
|
123
|
+
)
|
|
124
|
+
request.assert_awaited_once()
|
|
125
|
+
assert request.call_args.kwargs["json"]["duplicate_policy"] == "use-existing"
|
|
126
|
+
assert handle.activity_execution_id == "original-execution"
|
|
127
|
+
assert handle.workflow_run_id == "original-run"
|
|
128
|
+
assert handle.activity_type == "original-type"
|
|
129
|
+
|
|
130
|
+
@pytest.mark.parametrize("policy", [None, "fail"])
|
|
131
|
+
async def test_duplicate_conflict_is_typed(self, client: Client, policy: str | None) -> None:
|
|
132
|
+
response = _mock_response(409, {
|
|
133
|
+
"reason": "activity_already_started",
|
|
134
|
+
"activity_id": "job-1",
|
|
135
|
+
"workflow_run_id": "original-run",
|
|
136
|
+
})
|
|
137
|
+
with (
|
|
138
|
+
patch.object(client._http, "request", new_callable=AsyncMock, return_value=response) as request,
|
|
139
|
+
pytest.raises(ActivityAlreadyStarted) as caught,
|
|
140
|
+
):
|
|
141
|
+
await client.start_activity(
|
|
142
|
+
activity_type="original-type", task_queue="outbox", activity_id="job-1", duplicate_policy=policy,
|
|
143
|
+
)
|
|
144
|
+
request.assert_awaited_once()
|
|
145
|
+
assert request.call_args.kwargs["json"].get("duplicate_policy") == policy
|
|
146
|
+
assert caught.value.activity_id == "job-1"
|
|
147
|
+
assert caught.value.workflow_run_id == "original-run"
|
|
106
148
|
|
|
107
149
|
|
|
108
150
|
class TestDescribeAndResultActivity:
|
|
@@ -686,6 +686,7 @@ class TestSyncStandaloneActivities:
|
|
|
686
686
|
schedule_to_start_timeout_seconds=10,
|
|
687
687
|
schedule_to_close_timeout_seconds=180,
|
|
688
688
|
heartbeat_timeout_seconds=30,
|
|
689
|
+
duplicate_policy="use-existing",
|
|
689
690
|
)
|
|
690
691
|
|
|
691
692
|
assert isinstance(handle, SyncStandaloneActivityHandle)
|
|
@@ -704,6 +705,7 @@ class TestSyncStandaloneActivities:
|
|
|
704
705
|
assert body["schedule_to_start_timeout_seconds"] == 10
|
|
705
706
|
assert body["schedule_to_close_timeout_seconds"] == 180
|
|
706
707
|
assert body["heartbeat_timeout_seconds"] == 30
|
|
708
|
+
assert body["duplicate_policy"] == "use-existing"
|
|
707
709
|
assert serializer.decode(body["input"]["blob"], codec=body["input"]["codec"]) == [{"order_id": "o-42"}]
|
|
708
710
|
|
|
709
711
|
def test_get_activity_handle_wraps_existing_activity(self) -> None:
|
|
@@ -1904,7 +1904,9 @@ class TestWorkflowTaskExecution:
|
|
|
1904
1904
|
await worker._run_workflow_task(task)
|
|
1905
1905
|
|
|
1906
1906
|
commands = mock_client.complete_workflow_task.call_args.kwargs["commands"]
|
|
1907
|
-
|
|
1907
|
+
marker, *activities = commands
|
|
1908
|
+
assert marker["type"] == "record_version_marker"
|
|
1909
|
+
assert [command["activity_type"] for command in activities] == ["first", "second"]
|
|
1908
1910
|
assert calls == [[["a"], ["b"]]]
|
|
1909
1911
|
|
|
1910
1912
|
@pytest.mark.asyncio
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_activity_checkpoint.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_activity_process.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_cancellation_scope.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_capabilities_digest.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_condition_fingerprint.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_failure_reporting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_prepared_local_activity.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_query_task_authority.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/_sticky_workflow_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/auth_composition.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_storage.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_task_input.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/external_task_result.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/history_bundle_verify.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/python_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_clock_math.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/replay_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/server_compatibility.json
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow/telemetry_carrier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/requires.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/src/durable_workflow.egg-info/top_level.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_acceptance_authority.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_acceptance_consumer.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_cancellation_policies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_exponential_retry.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_heartbeat_authority.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_install_inventory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_activity_run_closed_refusal.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_child.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_parallel.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.2 → durable_workflow-2.22.0}/tests/test_business_replay_clock_redrive.py
RENAMED
|
File without changes
|