durable-workflow 2.21.0__tar.gz → 2.21.2__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.0/src/durable_workflow.egg-info → durable_workflow-2.21.2}/PKG-INFO +1 -1
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/pyproject.toml +3 -3
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/client.py +39 -24
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/workflow.py +11 -3
- {durable_workflow-2.21.0 → durable_workflow-2.21.2/src/durable_workflow.egg-info}/PKG-INFO +1 -1
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/SOURCES.txt +1 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_capabilities_digest.py +42 -2
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_client.py +7 -7
- durable_workflow-2.21.2/tests/test_parallel_group_boundaries.py +80 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_replay_regression_corpus.py +2 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_result_continue_as_new.py +4 -3
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_runtime_external_payload_transport.py +1 -1
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_typed_workflow_values.py +1 -1
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_result_timeout.py +2 -2
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/LICENSE +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/README.md +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/setup.cfg +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/__init__.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_activity_checkpoint.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_activity_lease.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_activity_process.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_avro.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_cancellation_scope.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_cancellation_scope_history.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_capabilities_digest.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_condition_fingerprint.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_cooperative_cancellation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_failure_reporting.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_metric_routes.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_poll_transport.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_prepared_local_activity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_query_task_authority.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_response_limit.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_sticky_workflow_cache.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_typed_values.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/activity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/auth_composition.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/cancellation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/errors.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_storage.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_task_input.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_task_result.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/history_bundle_verify.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/interceptors.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/invocable.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/metrics.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/nexus.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/py.typed +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/python_conformance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_clock.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_clock_math.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_conformance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_verify.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/retry_policy.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/serializer.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/server_compatibility.json +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/sync.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/telemetry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/telemetry_carrier.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/testing.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/worker_session.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/worker_status.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/workflow_updates_conformance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/entry_points.txt +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/requires.txt +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/top_level.txt +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_acceptance_authority.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_acceptance_consumer.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_acceptance_entry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_cancellation_policies.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_checkpoint.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_context.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_exponential_retry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_heartbeat_authority.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_identity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_install_inventory.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_lease_authority.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_lease_renewal.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_lease_worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_process.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_retry_cap_cell.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_retry_info.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_run_closed_refusal.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_worker_lost.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_auth_composition.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_avro_value_benchmark.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_avro_value_protocol.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_business_replay_clock.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_business_replay_clock_child.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_business_replay_clock_parallel.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_business_replay_clock_redrive.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_business_replay_clock_sequence_claims.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_cause.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_context.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_remaining_time.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_scope_admission.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_scope_authoring.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_scope_boundary.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cancellation_scope_opening.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_capabilities_digest_unknown.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_checkpointed_batch_example.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_child_workflow_policies.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_ci_checkout.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_ci_integration_endpoint.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_client_iterators.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_client_telemetry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_client_timeouts.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_codec_regression_corpus.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_command_keys_acceptance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_command_keys_captured_inputs.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_command_keys_container_ownership.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_command_keys_workspace.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_committed_cancellation_scope_descendants.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_committed_cancellation_scope_groups.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_committed_cancellation_scope_history.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_committed_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_completion_size_limit.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_condition_fingerprint.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_condition_occurrence_id.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_condition_replay_drift.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_control_plane_parity_fixtures.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cooperative_cancellation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cooperative_cancellation_client.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cooperative_cancellation_worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_cooperative_remote_worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_docs_release_channel.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_docstring_cross_references.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_durable_selection.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_empty_callback_failure.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_errors.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_external_storage.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_external_task_input.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_external_task_result.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_failure_reporting.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_generator_lifecycle.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_golden_history_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_history_bundle_pruned.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_history_bundle_schema2.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_history_bundle_verify.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_history_event_contract.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_invocable.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_local_activity_backoff.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_local_failure_reporting.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_message_streams.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_metric_routes.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_metrics.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_native_timer_redrive_cell.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_native_timer_redrive_clock.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_nexus_durable_wait.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_nexus_namespace.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_nexus_wire.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_order_processing_example.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_parallel_completion_order_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_parallel_failure_order.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_parallel_group_policy.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_parallel_member_failure_open_siblings.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_parallel_saga_authoring.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_patch_history.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_payload_policy_refresh.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_pending_operation_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_physical_command_key_readback.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_poll_failure_backoff.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_poll_transport.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_portal_source_split.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_prepared_local_activity_client.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_prepared_local_activity_groups.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_prepared_local_activity_policies.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_prepared_local_activity_worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_public_boundary_scanner.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_publish_workflow_isolation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_published_activity_acceptance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_published_pagination_evidence.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_pypi_project_surface.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_python_conformance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_queries.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_query_task_authority.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_query_timeout_retry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_quiesced_snapshot.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_readme_quickstart.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_redrive_call_ledger.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_redrive_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_redrive_successor_evidence.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_registration_ambiguity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_release_metadata.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_release_promotion.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_replay_clock.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_replay_conformance.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_replay_verify.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_response_body_limit.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_retry_cap_download.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_retry_cap_workflow.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_retry_policy.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_run_activities.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_run_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_run_closed_settlement_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_schedule_origin.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_schedules.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_scoped_run_cancellation_context.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sdk_metrics_contract.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_search_attribute_replay_identity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_serializer.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_signal_external_workflow.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_signal_with_start.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_signals.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sleep.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_standalone_activity_client.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_static_credential_validation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sticky_execution.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sticky_history_suffix.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_storage_admission.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sync.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_sync_activities.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_synthetic_command_key_readback.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_telemetry.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_telemetry_carrier.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_testing_failures.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_testing_harness.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_testing_nexus.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_threaded_heartbeat_example.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_tls_trust.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_transport_diagnostics.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_typed_values.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_update_outcome.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_update_signal_condition_replay.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_updates.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_wait_condition.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_deregistration.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_observation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_session.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_startup_buffered.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_startup_raw.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_startup_read_budget.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_startup_snapshot.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_status.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_telemetry_wire.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_worker_transient_runtime.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_entry_arguments.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_entrypoint_validation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_handler_validation.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_identity.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_workflow_streams.py +0 -0
- {durable_workflow-2.21.0 → durable_workflow-2.21.2}/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.21.
|
|
7
|
+
version = "2.21.2"
|
|
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.21.
|
|
83
|
-
registry-version = "2.21.
|
|
82
|
+
product-train = "2.21.2"
|
|
83
|
+
registry-version = "2.21.2"
|
|
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"
|
|
@@ -4225,7 +4225,15 @@ class Client:
|
|
|
4225
4225
|
any continue-as-new runs). Decodes the recorded ``input`` and
|
|
4226
4226
|
``output`` envelopes when present.
|
|
4227
4227
|
"""
|
|
4228
|
-
|
|
4228
|
+
return await self._describe_workflow_execution(workflow_id)
|
|
4229
|
+
|
|
4230
|
+
async def _describe_workflow_execution(
|
|
4231
|
+
self, workflow_id: str, run_id: str | None = None,
|
|
4232
|
+
) -> WorkflowExecution:
|
|
4233
|
+
path = f"/workflows/{quote(workflow_id, safe='')}"
|
|
4234
|
+
if run_id is not None:
|
|
4235
|
+
path += f"/runs/{quote(run_id, safe='')}"
|
|
4236
|
+
data = await self._request("GET", path, context=workflow_id)
|
|
4229
4237
|
input_val = data.get("input")
|
|
4230
4238
|
output_val = data.get("output")
|
|
4231
4239
|
output_from_envelope = False
|
|
@@ -5651,11 +5659,21 @@ class Client:
|
|
|
5651
5659
|
if result_type is not None:
|
|
5652
5660
|
validate_annotation(result_type, "result_type")
|
|
5653
5661
|
deadline = asyncio.get_running_loop().time() + timeout
|
|
5662
|
+
selected_run_id = handle.run_id or None
|
|
5663
|
+
visited: set[str] = set()
|
|
5654
5664
|
while True:
|
|
5655
|
-
|
|
5665
|
+
if selected_run_id is None:
|
|
5666
|
+
desc = await self.describe_workflow(handle.workflow_id)
|
|
5667
|
+
else:
|
|
5668
|
+
desc = await self._describe_workflow_execution(handle.workflow_id, selected_run_id)
|
|
5669
|
+
if desc.run_id is not None and desc.run_id != selected_run_id:
|
|
5670
|
+
raise WorkflowFailed("the server returned a different run from the selected workflow run")
|
|
5656
5671
|
status = desc.status
|
|
5657
|
-
|
|
5658
|
-
|
|
5672
|
+
terminal = status in (
|
|
5673
|
+
"completed", "failed", "terminated", "canceled", "cancelled", "timed_out", "continued",
|
|
5674
|
+
)
|
|
5675
|
+
if terminal:
|
|
5676
|
+
run_id = selected_run_id or desc.run_id
|
|
5659
5677
|
if (status == "completed" and desc._output_from_envelope and desc.run_id is not None
|
|
5660
5678
|
and desc.run_id == run_id):
|
|
5661
5679
|
# The status read already carries this run's decoded output;
|
|
@@ -5665,30 +5683,27 @@ class Client:
|
|
|
5665
5683
|
return decode_payload_value(desc.output, result_type, "workflow result")
|
|
5666
5684
|
if run_id is None:
|
|
5667
5685
|
raise WorkflowFailed("no run_id available to fetch history")
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
f"workflow {handle.workflow_id} run {run_id} continued as new, but its "
|
|
5684
|
-
"successor run could not be followed"
|
|
5685
|
-
)
|
|
5686
|
-
run_id = successor
|
|
5686
|
+
kind, value = await self._run_terminal_outcome(handle.workflow_id, run_id, desc, result_type)
|
|
5687
|
+
if kind == "result":
|
|
5688
|
+
return value
|
|
5689
|
+
if kind == "no_terminal_event":
|
|
5690
|
+
return None
|
|
5691
|
+
visited.add(run_id)
|
|
5692
|
+
successor = value if isinstance(value, str) and value else (
|
|
5693
|
+
await self.describe_workflow(handle.workflow_id)
|
|
5694
|
+
).run_id
|
|
5695
|
+
if successor is None or successor in visited:
|
|
5696
|
+
raise WorkflowFailed(
|
|
5697
|
+
f"workflow {handle.workflow_id} run {run_id} continued as new, but its "
|
|
5698
|
+
"successor run could not be followed"
|
|
5699
|
+
)
|
|
5700
|
+
selected_run_id = successor
|
|
5687
5701
|
if asyncio.get_running_loop().time() > deadline:
|
|
5688
5702
|
raise TimeoutError(
|
|
5689
5703
|
f"workflow {handle.workflow_id} not terminal after {timeout}s (status={status})"
|
|
5690
5704
|
)
|
|
5691
|
-
|
|
5705
|
+
if not terminal:
|
|
5706
|
+
await asyncio.sleep(poll_interval)
|
|
5692
5707
|
|
|
5693
5708
|
# ── Schedules ─────────────────────────────────────────────────────
|
|
5694
5709
|
def get_schedule_handle(self, schedule_id: str) -> ScheduleHandle:
|
|
@@ -5766,7 +5766,11 @@ def _replay_state(
|
|
|
5766
5766
|
details=details,
|
|
5767
5767
|
history_index=event_index,
|
|
5768
5768
|
)
|
|
5769
|
-
|
|
5769
|
+
# PHP Server can record ActivityCancelled without the selection path.
|
|
5770
|
+
# The durable opening still binds its sequence to the selected group.
|
|
5771
|
+
if _selection_group_metadata(payload) is not None or (
|
|
5772
|
+
event_type == "ActivityCancelled" and workflow_sequence in selection_opening_payloads
|
|
5773
|
+
):
|
|
5770
5774
|
selection_resolutions[workflow_sequence] = value
|
|
5771
5775
|
selection_resolution_indexes[workflow_sequence] = event_index
|
|
5772
5776
|
_append_selection_step(shape, event, fallback_sequence=workflow_sequence)
|
|
@@ -6966,7 +6970,9 @@ def _replay_state(
|
|
|
6966
6970
|
recorded_sequences = [
|
|
6967
6971
|
step.workflow_sequence for step in recorded_steps + recorded_wait_steps + recorded_pending_steps
|
|
6968
6972
|
]
|
|
6969
|
-
base_sequence = max(
|
|
6973
|
+
base_sequence = max(
|
|
6974
|
+
[*recorded_sequences, *consumed_policy_sequences, *consumed_selection_sequences], default=0,
|
|
6975
|
+
) + len(pending) + 1
|
|
6970
6976
|
|
|
6971
6977
|
def _build(group: list[Any], group_base: int) -> tuple[list[Any], list[Any]]:
|
|
6972
6978
|
size = len(_parallel_leaves(group, nested=group is not commands))
|
|
@@ -7855,7 +7861,9 @@ def _replay_state(
|
|
|
7855
7861
|
``parallel_sequence_mismatch`` (sdk-python#338).
|
|
7856
7862
|
"""
|
|
7857
7863
|
base = commands[0]._parallel_group_path[0]["parallel_group_base_sequence"]
|
|
7858
|
-
|
|
7864
|
+
# Receiver events, such as UpdateApplied, can reference the next
|
|
7865
|
+
# command sequence without reserving it for an authored operation.
|
|
7866
|
+
return any(base <= step.workflow_sequence < base + len(commands) for step in _unconsumed_recorded_steps())
|
|
7859
7867
|
|
|
7860
7868
|
def _parallel_failure_marker(commands: list[Any]) -> int | None:
|
|
7861
7869
|
"""The member sequence a recorded early-failure decision names, if any.
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/SOURCES.txt
RENAMED
|
@@ -146,6 +146,7 @@ tests/test_nexus_wire.py
|
|
|
146
146
|
tests/test_order_processing_example.py
|
|
147
147
|
tests/test_parallel_completion_order_replay.py
|
|
148
148
|
tests/test_parallel_failure_order.py
|
|
149
|
+
tests/test_parallel_group_boundaries.py
|
|
149
150
|
tests/test_parallel_group_policy.py
|
|
150
151
|
tests/test_parallel_member_failure_open_siblings.py
|
|
151
152
|
tests/test_parallel_saga_authoring.py
|
|
@@ -193,18 +193,58 @@ async def run_result(server: ResultServer, run_id: str | None = None) -> Any:
|
|
|
193
193
|
async def test_completed_result_comes_from_the_status_read(run_id: str | None) -> None:
|
|
194
194
|
server = ResultServer("completed")
|
|
195
195
|
assert await run_result(server, run_id) == {"from": "status"}
|
|
196
|
-
|
|
196
|
+
path = "/api/workflows/wf"
|
|
197
|
+
if run_id is not None:
|
|
198
|
+
path += f"/runs/{run_id}"
|
|
199
|
+
assert server.paths == [path]
|
|
197
200
|
|
|
198
201
|
|
|
199
202
|
@pytest.mark.parametrize(("server", "run_id"), [
|
|
200
203
|
(ResultServer("completed", envelope=False), None),
|
|
201
|
-
(ResultServer("completed"), "run-
|
|
204
|
+
(ResultServer("completed", envelope=False), "run-2"),
|
|
202
205
|
])
|
|
203
206
|
async def test_completed_result_falls_back_to_history(server: ResultServer, run_id: str | None) -> None:
|
|
204
207
|
assert await run_result(server, run_id) == {"from": "history"}
|
|
205
208
|
assert any(path.endswith("/history") for path in server.paths)
|
|
206
209
|
|
|
207
210
|
|
|
211
|
+
async def test_selected_result_rejects_a_response_for_another_run() -> None:
|
|
212
|
+
server = ResultServer("completed")
|
|
213
|
+
with pytest.raises(WorkflowFailed, match="a different run"):
|
|
214
|
+
await run_result(server, "run-1")
|
|
215
|
+
assert server.paths == ["/api/workflows/wf/runs/run-1"]
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
async def test_selected_result_reads_the_recorded_continuation() -> None:
|
|
219
|
+
paths: list[str] = []
|
|
220
|
+
first = "/api/workflows/wf/runs/run-1"
|
|
221
|
+
next_run = "/api/workflows/wf/runs/run-2"
|
|
222
|
+
|
|
223
|
+
async def respond(request: httpx.Request) -> httpx.Response:
|
|
224
|
+
path = request.url.path
|
|
225
|
+
paths.append(path)
|
|
226
|
+
if path == first:
|
|
227
|
+
return httpx.Response(200, json={"workflow_id": "wf", "run_id": "run-1", "status": "continued"})
|
|
228
|
+
if path == first + "/history":
|
|
229
|
+
return httpx.Response(200, json={"events": [{
|
|
230
|
+
"event_type": "WorkflowContinuedAsNew", "payload": {"continued_to_run_id": "run-2"},
|
|
231
|
+
}]})
|
|
232
|
+
assert path == next_run
|
|
233
|
+
assert paths.count(next_run) <= 2
|
|
234
|
+
status = "running" if paths.count(next_run) == 1 else "completed"
|
|
235
|
+
body: dict[str, Any] = {"workflow_id": "wf", "run_id": "run-2", "status": status}
|
|
236
|
+
if status == "completed":
|
|
237
|
+
body["output_envelope"] = serializer.envelope({"from": "continued run"})
|
|
238
|
+
return httpx.Response(200, json=body)
|
|
239
|
+
|
|
240
|
+
async with Client("http://result.invalid", namespace="17", token="control-token") as client:
|
|
241
|
+
await client._http.aclose()
|
|
242
|
+
client._http = httpx.AsyncClient(base_url="http://result.invalid", transport=httpx.MockTransport(respond))
|
|
243
|
+
handle = client.get_workflow_handle("wf", run_id="run-1")
|
|
244
|
+
assert await handle.result(timeout=1, poll_interval=0) == {"from": "continued run"}
|
|
245
|
+
assert paths == [first, first + "/history", next_run, next_run]
|
|
246
|
+
|
|
247
|
+
|
|
208
248
|
async def test_failed_result_still_reads_history() -> None:
|
|
209
249
|
server = ResultServer("failed")
|
|
210
250
|
with pytest.raises(WorkflowFailed, match="boom"):
|
|
@@ -3585,7 +3585,7 @@ class TestGetResult:
|
|
|
3585
3585
|
@pytest.mark.asyncio
|
|
3586
3586
|
async def test_completed_result_on_later_history_page(self, client: Client) -> None:
|
|
3587
3587
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3588
|
-
client.
|
|
3588
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3589
3589
|
return_value=WorkflowExecution(
|
|
3590
3590
|
workflow_id="wf-1", run_id="run-1", workflow_type="greeter", status="completed",
|
|
3591
3591
|
)
|
|
@@ -3607,7 +3607,7 @@ class TestGetResult:
|
|
|
3607
3607
|
@pytest.mark.asyncio
|
|
3608
3608
|
async def test_repeated_history_page_token_fails(self, client: Client) -> None:
|
|
3609
3609
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3610
|
-
client.
|
|
3610
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3611
3611
|
return_value=WorkflowExecution(
|
|
3612
3612
|
workflow_id="wf-1", run_id="run-1", workflow_type="greeter", status="completed",
|
|
3613
3613
|
)
|
|
@@ -3621,7 +3621,7 @@ class TestGetResult:
|
|
|
3621
3621
|
@pytest.mark.asyncio
|
|
3622
3622
|
async def test_completed_result_uses_event_payload_codec(self, client: Client) -> None:
|
|
3623
3623
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3624
|
-
client.
|
|
3624
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3625
3625
|
return_value=WorkflowExecution(
|
|
3626
3626
|
workflow_id="wf-1",
|
|
3627
3627
|
run_id="run-1",
|
|
@@ -3651,7 +3651,7 @@ class TestGetResult:
|
|
|
3651
3651
|
@pytest.mark.asyncio
|
|
3652
3652
|
async def test_completed_result_uses_describe_payload_codec_fallback(self, client: Client) -> None:
|
|
3653
3653
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3654
|
-
client.
|
|
3654
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3655
3655
|
return_value=WorkflowExecution(
|
|
3656
3656
|
workflow_id="wf-1",
|
|
3657
3657
|
run_id="run-1",
|
|
@@ -3685,7 +3685,7 @@ class TestGetResult:
|
|
|
3685
3685
|
@pytest.mark.asyncio
|
|
3686
3686
|
async def test_snake_case_workflow_completed_is_not_accepted(self, client: Client) -> None:
|
|
3687
3687
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3688
|
-
client.
|
|
3688
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3689
3689
|
return_value=WorkflowExecution(
|
|
3690
3690
|
workflow_id="wf-1",
|
|
3691
3691
|
run_id="run-1",
|
|
@@ -3713,7 +3713,7 @@ class TestGetResult:
|
|
|
3713
3713
|
@pytest.mark.asyncio
|
|
3714
3714
|
async def test_snake_case_workflow_failed_is_not_accepted(self, client: Client) -> None:
|
|
3715
3715
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3716
|
-
client.
|
|
3716
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3717
3717
|
return_value=WorkflowExecution(
|
|
3718
3718
|
workflow_id="wf-1",
|
|
3719
3719
|
run_id="run-1",
|
|
@@ -3738,7 +3738,7 @@ class TestGetResult:
|
|
|
3738
3738
|
@pytest.mark.asyncio
|
|
3739
3739
|
async def test_result_field_is_not_read_as_output_fallback(self, client: Client) -> None:
|
|
3740
3740
|
handle = WorkflowHandle(client, workflow_id="wf-1", run_id="run-1", workflow_type="greeter")
|
|
3741
|
-
client.
|
|
3741
|
+
client._describe_workflow_execution = AsyncMock(
|
|
3742
3742
|
return_value=WorkflowExecution(
|
|
3743
3743
|
workflow_id="wf-1",
|
|
3744
3744
|
run_id="run-1",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Parallel groups that follow a selection or applied update (#350)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from contextlib import suppress
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
12
|
+
from durable_workflow import serializer, workflow
|
|
13
|
+
from durable_workflow.errors import ActivityFailed
|
|
14
|
+
from durable_workflow.workflow import WorkflowContext, commands_to_server_commands, replay
|
|
15
|
+
|
|
16
|
+
FIXTURES = Path(__file__).parent / "fixtures" / "replay_regressions"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@workflow.defn(name="rv348_cancel")
|
|
20
|
+
class GroupAfterSelection:
|
|
21
|
+
def run(self, ctx: WorkflowContext): # type: ignore[no-untyped-def]
|
|
22
|
+
yield ctx.select({
|
|
23
|
+
"t": ctx.start_timer(1),
|
|
24
|
+
"slow": ctx.schedule_activity("slow", [], retry_policy={"max_attempts": 1}),
|
|
25
|
+
})
|
|
26
|
+
return (yield [ctx.schedule_activity(f"m{i}", [i]) for i in range(2)])
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@workflow.defn(name="rv348_plain")
|
|
30
|
+
class GroupAfterUpdate:
|
|
31
|
+
@workflow.update("report")
|
|
32
|
+
def report(self, *_: Any) -> dict[str, str]:
|
|
33
|
+
return {"compensating": "failed"}
|
|
34
|
+
|
|
35
|
+
def run(self, ctx: WorkflowContext): # type: ignore[no-untyped-def]
|
|
36
|
+
with suppress(ActivityFailed):
|
|
37
|
+
yield [ctx.schedule_activity(f"m{i}", [i], retry_policy={"max_attempts": 1}) for i in range(2)]
|
|
38
|
+
return (yield [ctx.schedule_activity(f"undo{i}", [i]) for i in range(2)])
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@workflow.defn(name="group-after-selection")
|
|
42
|
+
class GroupAfterSelectionWithCancellation:
|
|
43
|
+
def run(self, ctx: WorkflowContext, spacer: bool): # type: ignore[no-untyped-def]
|
|
44
|
+
selected = yield ctx.select({
|
|
45
|
+
"timer": ctx.start_timer(1),
|
|
46
|
+
"slow": ctx.schedule_activity("hold", [], queue="no-worker"),
|
|
47
|
+
})
|
|
48
|
+
if spacer:
|
|
49
|
+
yield ctx.start_timer(1)
|
|
50
|
+
values = yield [ctx.schedule_activity("step", [index]) for index in range(2)]
|
|
51
|
+
yield selected.handles["slow"].cancel()
|
|
52
|
+
last = yield ctx.schedule_activity("step", [2])
|
|
53
|
+
return {"selected": selected.key, "steps": [*values, last]}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def fixture(name: str) -> dict[str, Any]:
|
|
57
|
+
with (FIXTURES / name).open() as source:
|
|
58
|
+
return json.load(source) # type: ignore[no-any-return]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@pytest.mark.parametrize("record", [False, True])
|
|
62
|
+
def test_group_after_resolved_selection_schedules_despite_open_loser(record: bool) -> None:
|
|
63
|
+
captured = fixture("failure-order-released-select-cancel.json")
|
|
64
|
+
history = captured["history"]
|
|
65
|
+
resolved = next(i for i, event in enumerate(history) if event["event_type"] == "SelectionResolved")
|
|
66
|
+
state = replay(GroupAfterSelection, history[:resolved + 1], [], payload_codec=serializer.AVRO_CODEC,
|
|
67
|
+
record_parallel_failure_order=record)
|
|
68
|
+
wire = commands_to_server_commands(state.commands, "q", payload_codec=serializer.AVRO_CODEC)
|
|
69
|
+
groups = [command for command in wire if command["type"] == "schedule_activity"]
|
|
70
|
+
assert [command["activity_type"] for command in groups] == ["m0", "m1"]
|
|
71
|
+
assert [command["parallel_group_base_sequence"] for command in groups] == [3 + int(record)] * 2
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_group_after_update_applied_schedules_at_the_next_command_sequence() -> None:
|
|
75
|
+
captured = fixture("failure-order-released-update-before-new-worker.json")
|
|
76
|
+
state = replay(GroupAfterUpdate, captured["history"], [], payload_codec=serializer.AVRO_CODEC)
|
|
77
|
+
wire = commands_to_server_commands(state.commands, "q", payload_codec=serializer.AVRO_CODEC)
|
|
78
|
+
groups = [command for command in wire if command["type"] == "schedule_activity"]
|
|
79
|
+
assert [command["activity_type"] for command in groups] == ["undo0", "undo1"]
|
|
80
|
+
assert [command["parallel_group_base_sequence"] for command in groups] == [3, 3]
|
|
@@ -50,6 +50,7 @@ from tests.test_golden_history_replay import (
|
|
|
50
50
|
GoldenVersionMarkerWorkflow,
|
|
51
51
|
)
|
|
52
52
|
from tests.test_parallel_failure_order import ReviewPlain, ReviewSelectCancel, ReviewZeroCommandCatch
|
|
53
|
+
from tests.test_parallel_group_boundaries import GroupAfterSelectionWithCancellation
|
|
53
54
|
from tests.test_parallel_group_policy import ParallelFailurePolicyWorkflow
|
|
54
55
|
from tests.test_parallel_member_failure_open_siblings import (
|
|
55
56
|
NativeCaughtMemberFailure,
|
|
@@ -485,6 +486,7 @@ WORKFLOWS = [
|
|
|
485
486
|
NativeUncaughtMemberFailure,
|
|
486
487
|
ReviewPlain,
|
|
487
488
|
ReviewSelectCancel,
|
|
489
|
+
GroupAfterSelectionWithCancellation,
|
|
488
490
|
ReviewZeroCommandCatch,
|
|
489
491
|
UpdateSignalConditionTimerWorkflow,
|
|
490
492
|
WorkflowStreamAuthorWorkflow,
|
|
@@ -30,11 +30,12 @@ class ChainServer:
|
|
|
30
30
|
async def respond(self, request: httpx.Request) -> httpx.Response:
|
|
31
31
|
path = request.url.path
|
|
32
32
|
self.paths.append(path)
|
|
33
|
+
_, _, run_path = path.partition("/runs/")
|
|
34
|
+
run = run_path.split("/")[0] or self.current
|
|
33
35
|
if path.endswith("/history"):
|
|
34
|
-
run = path.split("/runs/")[1].split("/")[0]
|
|
35
36
|
return httpx.Response(200, json={"events": [STARTED, *self.histories[run]], "next_page_token": None})
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
status = self.status if run == self.current else "continued"
|
|
38
|
+
return httpx.Response(200, json={"workflow_id": "wf", "run_id": run, "workflow_type": "t", "status": status})
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
async def result_of(server: ChainServer, run_id: str | None) -> Any:
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_runtime_external_payload_transport.py
RENAMED
|
@@ -569,7 +569,7 @@ async def test_client_start_and_result_use_runtime_credentials_without_provider_
|
|
|
569
569
|
"run_id": "run-1",
|
|
570
570
|
"workflow_type": "runtime-payload-replay",
|
|
571
571
|
}
|
|
572
|
-
server.responses[("GET", "/api/workflows/runtime-payload-workflow")] = {
|
|
572
|
+
server.responses[("GET", "/api/workflows/runtime-payload-workflow/runs/run-1")] = {
|
|
573
573
|
"workflow_id": "runtime-payload-workflow",
|
|
574
574
|
"run_id": "run-1",
|
|
575
575
|
"workflow_type": "runtime-payload-replay",
|
|
@@ -230,7 +230,7 @@ async def test_the_client_decodes_a_result_type_and_sends_neutral_arguments() ->
|
|
|
230
230
|
from durable_workflow.client import Client, WorkflowExecution, WorkflowHandle
|
|
231
231
|
|
|
232
232
|
client = Client("http://server.invalid", token="t")
|
|
233
|
-
client.
|
|
233
|
+
client._describe_workflow_execution = AsyncMock(return_value=WorkflowExecution( # type: ignore[method-assign]
|
|
234
234
|
workflow_id="wf", run_id="run", workflow_type="x", status="completed", payload_codec="avro"))
|
|
235
235
|
client.get_history = AsyncMock(return_value={"events": [ # type: ignore[method-assign]
|
|
236
236
|
{"event_type": "WorkflowCompleted", "payload": {"output": serializer.envelope(ADA_NEUTRAL),
|
|
@@ -9,9 +9,9 @@ from durable_workflow.errors import WorkflowCancelled, WorkflowFailed, WorkflowT
|
|
|
9
9
|
|
|
10
10
|
def result_client(status: str, event_type: str, payload: dict) -> tuple[Client, WorkflowHandle]:
|
|
11
11
|
client = Client("https://unused.example")
|
|
12
|
-
client.
|
|
12
|
+
client._describe_workflow_execution = AsyncMock(
|
|
13
13
|
return_value=WorkflowExecution(
|
|
14
|
-
workflow_id="order", run_id="
|
|
14
|
+
workflow_id="order", run_id="selected-run", workflow_type="order", status=status,
|
|
15
15
|
)
|
|
16
16
|
)
|
|
17
17
|
client.get_history = AsyncMock(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_activity_checkpoint.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_activity_process.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_cancellation_scope.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_capabilities_digest.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_condition_fingerprint.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_failure_reporting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_prepared_local_activity.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_query_task_authority.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/_sticky_workflow_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/auth_composition.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_storage.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_task_input.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/external_task_result.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/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.0 → durable_workflow-2.21.2}/src/durable_workflow/python_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_clock_math.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/replay_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/server_compatibility.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow/telemetry_carrier.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.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/requires.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/src/durable_workflow.egg-info/top_level.txt
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_acceptance_authority.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_acceptance_consumer.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_cancellation_policies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_exponential_retry.py
RENAMED
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_heartbeat_authority.py
RENAMED
|
File without changes
|
|
File without changes
|
{durable_workflow-2.21.0 → durable_workflow-2.21.2}/tests/test_activity_install_inventory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|