fix: dispatch workflow-as-code tasks from a deployed flow's inline step (#11146)

* fix: dispatch workflow-as-code tasks from a deployed flow's inline step

* fix: give a workflow-as-code task its own result-cache key

* fix: key a cached workflow-as-code task on its name and arguments

* fix: hash a cached workflow-as-code task's arguments like any job's

* chore: regenerate system prompts for the task cache_ttl docs

* fix: key a cached workflow-as-code task on its step key, not its name

* fix: key a cached workflow-as-code task on a fingerprint of its code

* fix: keep the task() doc attached to task()

* fix: key a cached inline task on its step key and the workflow input

* docs: cache_ttl has no effect on a taskFlow target
This commit is contained in:
Ruben Fiszel
2026-09-16 09:58:29 +02:00
committed by GitHub
parent a48ae656ae
commit e8078f2a96
16 changed files with 341 additions and 20 deletions
+23
View File
@@ -4608,6 +4608,14 @@ def parse_sql_client_name(name: str) -> tuple[str, Optional[str]]
# it grows with both the width of the fan-out and \`\`attempts\`\`. Retries with
# no \`\`delay\`\` all go out in a single round.
#
# \`\`cache_ttl\`\` serves a previous result of the task for that many seconds
# instead of running it again. A task is keyed on its step key (its name and
# call order) and the workflow's input, not on the arguments it is called
# with, so cache one only when whether it runs, and what it receives, follow
# from the workflow's input alone. A \`\`task_script\`\` target is keyed on the
# arguments it is called with. It has no effect on a \`\`task_flow\`\` target,
# which keeps its flow's own cache policy.
#
# Usage::
#
# @task
@@ -6742,6 +6750,13 @@ export interface TaskRetry {
export interface TaskOptions {
timeout?: number;
tag?: string;
/** Seconds during which a previous result of this task is served instead of
* running it again. A task written inline in the workflow is keyed on its
* step key (its name and call order) and the workflow's input, not on the
* arguments it is called with, so cache one only when whether it runs, and
* what it receives, follow from the workflow's input alone. A \`taskScript\`
* target is keyed on the arguments it is called with. It has no effect on a
* \`taskFlow\` target, which keeps its flow's own cache policy. */
cache_ttl?: number;
priority?: number;
concurrency_limit?: number;
@@ -6933,6 +6948,14 @@ def get_resume_urls(approver: str = None, flow_level: bool = None) -> dict
# it grows with both the width of the fan-out and \`\`attempts\`\`. Retries with
# no \`\`delay\`\` all go out in a single round.
#
# \`\`cache_ttl\`\` serves a previous result of the task for that many seconds
# instead of running it again. A task is keyed on its step key (its name and
# call order) and the workflow's input, not on the arguments it is called
# with, so cache one only when whether it runs, and what it receives, follow
# from the workflow's input alone. A \`\`task_script\`\` target is keyed on the
# arguments it is called with. It has no effect on a \`\`task_flow\`\` target,
# which keeps its flow's own cache policy.
#
# Usage::
#
# @task