[Feature]: [Testing] Emulator should generate real-shaped durable execution ARNs (embed execution name)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 packages/aws-durable-execution-sdk-python-testing/src/aws_durable_execution_sdk_python_testing/execution.py 中的 Execution.new() 開始,接著檢查 executor.py 的 GetDurableExecution 回應和 Route.from_string。更新斷言 placeholder ARN 形狀的測試,並驗證產生的 ARN 包含必要的 function、qualifier、execution name 和新的 execution ID,同時一致地處理缺少的名稱。
由索引模型根據 Issue 內容生成。
描述
What would you like?
Context
Reported downstream in aws/aws-sam-cli#9200: a user who starts a local durable execution with sam local invoke --durable-execution-name test cannot correlate that name with anything afterwards — sam local execution history/get take an ARN, and the emulator's ARN contains no trace of the name.
Current behavior
The emulator generates a placeholder ARN in Execution.new() (execution.py):
# make a nicer arn
# Pattern: arn:(aws[a-zA-Z-]*)?:lambda:...:durable-execution:...
return Execution(
durable_execution_arn=str(uuid4()) + "/" + (input.invocation_id or str(uuid4())),
...
)
Two problems:
- It doesn't match the real service ARN shape, so the execution name (and function name) appear nowhere in the identifier. Locally,
DurableExecutionNameis effectively write-only. - It conflates the second path segment with the invocation ID; the real ARN's last segment is a distinct execution ID.
(The comment's intended pattern is also stale — it predates the current public API shape.)
Expected behavior
Generate ARNs matching the public DurableExecutionArn pattern from the Lambda service model:
arn:{partition}:lambda:{region}:{account}:function:{name}:{qualifier}/durable-execution/{execution-name}/{execution-id}
Everything needed is already on StartDurableExecutionInput (account_id, function_name, function_qualifier, execution_name are required fields). Region can be fixed to us-east-1, consistent with the hardcoded FunctionArn in executor.py's GetDurableExecution response.
Possible Implementation
- Null/omitted execution name: callers (e.g. SAM CLI) may send
"ExecutionName": null. Generate a name (uuid) when absent — matches cloud behavior and also fixesDurableExecutionNamebeing null inGetDurableExecutionresponses. - Execution ID: use a fresh
uuid4(), notinvocation_id. - Routing is already safe:
Route.from_stringsplits on/before URL-decoding, so a percent-encoded ARN stays one segment — the same mechanism that handles today's one-slash placeholder. botocore percent-encodes/in non-greedy URI params. - Downstream (sam-cli) is already shape-agnostic after aws/aws-sam-cli#9038 and aws/aws-sam-cli#9040 (
\S+ARN regex, Flask<path:>routes). - Store/runner treat the ARN as an opaque key; only tests asserting the placeholder shape need updating.
Questions to resolve:
- Execution-name idempotency: mimic cloud idempotency behaviour — in the service, starting a durable execution with an
ExecutionNamethat matches an existing execution for the same function is an idempotent start (the existing execution/ARN is returned rather than a new one created). The emulator currently creates a duplicate with a distinct ARN sharing the same name segment. Confirm the exact service semantics (idempotency window, retention, input-mismatch handling) and implement to match. - Function name fidelity: SAM CLI hardcodes
"FunctionName": "function"in its start payload, so local ARNs would readfunction:function:$LATEST/.... Decide whether to pair this with a sam-cli change to pass the real logical ID so the ARN is actually informative.
Blocked by
A new emulator image release is required for this to reach SAM CLI users (:latest on ECR is still v1.2.1, built 2026-05-20 from the pre-migration repo) — see #487.
- 主要語言
- Python
- 星號
- 58
- 分支
- 32
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 80
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aws/aws-durable-execution-sdk-python 的其他 Issue
-
enhancement needs-triage
難度 1/5 1-3 小時 新手友好度 72/100
aws/aws-durable-execution-sdk-python#927 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 82/100
aws/aws-durable-execution-sdk-python#875 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 85/100
aws/aws-durable-execution-sdk-python#794 ·
維護者通常 1 天內回覆
-
bug
難度 3/5 1-2 天 新手友好度 58/100
aws/aws-durable-execution-sdk-python#921 ·
維護者通常 1 天內回覆
-
[Bug]: JS examples CI still invokes Jest after Vitest migration可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug needs-triage
難度 3/5 1-2 天 新手友好度 55/100
aws/aws-durable-execution-sdk-python#918 ·
維護者通常 1 天內回覆
查看 aws/aws-durable-execution-sdk-python 的全部 Issue
相似的 Issue
-
physical
難度 2/5 1-3 小時 新手友好度 74/100
antonyrag/ragleap-core#1339 ·
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 83/100
AllenCell/SubCellSeg#5 ·
-
[🐛 Bug]: oidc_authverifier.py strips trailing slash causing "Invalid token: Invalid issuer" error未關閉
難度 2/5 1-3 小時 新手友好度 76/100
keephq/keep#6934 · 1 個 reaction ·
維護者通常 1 天內回覆
-
bug game: 01008BA02525A000 ios
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
needs-triage
難度 1/5 1 小時以內 新手友好度 87/100
gke-labs/kube-agents#5501 ·
維護者通常 1 天內回覆