|
61 | 61 |
|
62 | 62 | PROTOCOL_VERSION = "1.16" |
63 | 63 | CONTROL_PLANE_VERSION = "2" |
| 64 | +PORTABLE_WORKER_AFFINITY_CAPABILITY_MANIFEST: dict[str, dict[str, str | bool]] = { |
| 65 | + "local_activities": { |
| 66 | + "supported": False, |
| 67 | + "minimum_protocol_version": "1.18", |
| 68 | + "reason": "python_worker_does_not_execute_record_local_activity", |
| 69 | + }, |
| 70 | + "worker_sessions": { |
| 71 | + "supported": False, |
| 72 | + "minimum_protocol_version": "1.18", |
| 73 | + "reason": "python_worker_has_no_typed_session_lifecycle", |
| 74 | + }, |
| 75 | + "sticky_execution": { |
| 76 | + "supported": False, |
| 77 | + "minimum_protocol_version": "1.18", |
| 78 | + "reason": "python_worker_uses_complete_durable_history_replay", |
| 79 | + }, |
| 80 | +} |
64 | 81 | _MESSAGE_STREAMS_CAPABILITY = "message_streams" |
65 | 82 | _MESSAGE_STREAMS_MINIMUM_WORKER_PROTOCOL = (1, 15) |
66 | 83 | CONTROL_PLANE_REQUEST_CONTRACT_SCHEMA = "durable-workflow.v2.control-plane-request.contract" |
@@ -4568,6 +4585,7 @@ async def register_worker( |
4568 | 4585 | sdk_version: str | None = None, |
4569 | 4586 | build_id: str | None = None, |
4570 | 4587 | capabilities: list[str] | None = None, |
| 4588 | + capability_manifest: dict[str, dict[str, Any]] | None = None, |
4571 | 4589 | task_slots: dict[str, int] | None = None, |
4572 | 4590 | process_metrics: dict[str, Any] | None = None, |
4573 | 4591 | heartbeat_interval_seconds: int | None = None, |
@@ -4605,6 +4623,8 @@ async def register_worker( |
4605 | 4623 | body["workflow_command_contracts"] = workflow_command_contracts |
4606 | 4624 | if capabilities is not None: |
4607 | 4625 | body["capabilities"] = [capability for capability in capabilities if capability] |
| 4626 | + if capability_manifest is not None: |
| 4627 | + body["capability_manifest"] = capability_manifest |
4608 | 4628 | if build_id is not None: |
4609 | 4629 | body["build_id"] = build_id |
4610 | 4630 | if max_concurrent_workflow_tasks is not None: |
|
0 commit comments