From 3d725102e05c7551f64a23457846e718061ae881 Mon Sep 17 00:00:00 2001 From: Diogo Ferreira Date: Fri, 22 Nov 2024 15:02:41 +0000 Subject: [PATCH 1/3] improve the explanation about cpu time limits and its relationship withg the duration of a Workflow --- src/content/docs/workflows/reference/limits.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workflows/reference/limits.mdx b/src/content/docs/workflows/reference/limits.mdx index 83e24c98bc12653..08df689779cfbd3 100644 --- a/src/content/docs/workflows/reference/limits.mdx +++ b/src/content/docs/workflows/reference/limits.mdx @@ -16,8 +16,8 @@ Many limits are inherited from those applied to Workers scripts and as documente | ----------------------------------------- | ----------------------- | --------------------- | | Workflow class definitions per script | 1MB max script size per [Worker size limits](/workers/platform/limits/#account-plan-limits) | 10MB max script size per [Worker size limits](/workers/platform/limits/#account-plan-limits) | Total scripts per account | 100 | 500 (shared with [Worker script limits](/workers/platform/limits/#account-plan-limits) | -| Compute time per Workflow | 10 seconds | 30 seconds of [active CPU time](/workers/platform/limits/#cpu-time) | -| Duration (wall clock) per `step` | Unlimited | Unlimited - e.g. waiting on network I/O calls or querying a database | +| Compute time per step [^3] | 10 seconds | 30 seconds of [active CPU time](/workers/platform/limits/#cpu-time) | +| Duration (wall clock) per step [^3] | Unlimited | Unlimited - e.g. waiting on network I/O calls or querying a database | | Maximum persisted state per step | 1MiB (2^20 bytes) | 1MiB (2^20 bytes) | | Maximum state that can be persisted per Workflow instance | 100MB | 1GB | | Maximum `step.sleep` duration | 365 days (1 year) [^1] | @@ -31,4 +31,6 @@ Many limits are inherited from those applied to Workers scripts and as documente [^2]: Workflow state and logs will be retained for 3 days on the Workers Free plan and for 7 days on the Workers Paid plan. +[^3]: A Workflow instance can run forever, as long as each step does not take more than the CPU time limit and the maximum number of steps per Workflow is not reached. + From 604f14e378ec8f7984d914bdb56c40c31cb60857 Mon Sep 17 00:00:00 2001 From: Diogo Ferreira Date: Fri, 22 Nov 2024 15:42:02 +0000 Subject: [PATCH 2/3] Added information regarding the maximum length of a Workflow ID and its match pattern --- src/content/docs/workflows/build/workers-api.mdx | 4 +++- src/content/docs/workflows/reference/limits.mdx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workflows/build/workers-api.mdx b/src/content/docs/workflows/build/workers-api.mdx index 78c21d3e661959f..0a02b3353d2c655 100644 --- a/src/content/docs/workflows/build/workers-api.mdx +++ b/src/content/docs/workflows/build/workers-api.mdx @@ -173,7 +173,7 @@ Create (trigger) a new instance of the given Workflow. * `options` - optional properties to pass when creating an instance. -An ID is automatically generated, but a user-provided ID can be specified. This can be useful when mapping Workflows to users, merchants or other identifiers in your system. +An ID is automatically generated, but a user-provided ID can be specified (limited to 64 characters [^1]). This can be useful when mapping Workflows to users, merchants or other identifiers in your system. ```ts // Create a new Workflow instance with your own ID: @@ -293,3 +293,5 @@ type InstanceStatus = { output?: object; }; ``` + +[^1]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_ diff --git a/src/content/docs/workflows/reference/limits.mdx b/src/content/docs/workflows/reference/limits.mdx index 08df689779cfbd3..c0f4522c149a62b 100644 --- a/src/content/docs/workflows/reference/limits.mdx +++ b/src/content/docs/workflows/reference/limits.mdx @@ -25,7 +25,7 @@ Many limits are inherited from those applied to Workers scripts and as documente | Maximum Workflow executions | 100,000 per day [shared with Workers daily limit](/workers/platform/limits/#worker-limits) | Unlimited | | Concurrent Workflow instances (executions) | 25 | 100 [^1] | | Retention limit for completed Workflow state | 3 days | 30 days [^2] | -| Maximum length of a Workflow ID | 64 bytes | +| Maximum length of a Workflow ID [^4] | 64 characters | [^1]: This limit will be reviewed and revised during the open beta for Workflows. Follow the [Workflows changelog](/workflows/reference/changelog/) for updates. @@ -33,4 +33,6 @@ Many limits are inherited from those applied to Workers scripts and as documente [^3]: A Workflow instance can run forever, as long as each step does not take more than the CPU time limit and the maximum number of steps per Workflow is not reached. +[^4]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_ + From 18e5ad928bab4d2fc3c1daf65f6a446fdb7e22b9 Mon Sep 17 00:00:00 2001 From: Diogo Ferreira Date: Fri, 22 Nov 2024 15:44:06 +0000 Subject: [PATCH 3/3] Update src/content/docs/workflows/reference/limits.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> --- src/content/docs/workflows/reference/limits.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workflows/reference/limits.mdx b/src/content/docs/workflows/reference/limits.mdx index c0f4522c149a62b..fbbd75f098abcf4 100644 --- a/src/content/docs/workflows/reference/limits.mdx +++ b/src/content/docs/workflows/reference/limits.mdx @@ -17,7 +17,7 @@ Many limits are inherited from those applied to Workers scripts and as documente | Workflow class definitions per script | 1MB max script size per [Worker size limits](/workers/platform/limits/#account-plan-limits) | 10MB max script size per [Worker size limits](/workers/platform/limits/#account-plan-limits) | Total scripts per account | 100 | 500 (shared with [Worker script limits](/workers/platform/limits/#account-plan-limits) | | Compute time per step [^3] | 10 seconds | 30 seconds of [active CPU time](/workers/platform/limits/#cpu-time) | -| Duration (wall clock) per step [^3] | Unlimited | Unlimited - e.g. waiting on network I/O calls or querying a database | +| Duration (wall clock) per step [^3] | Unlimited | Unlimited - for example, waiting on network I/O calls or querying a database | | Maximum persisted state per step | 1MiB (2^20 bytes) | 1MiB (2^20 bytes) | | Maximum state that can be persisted per Workflow instance | 100MB | 1GB | | Maximum `step.sleep` duration | 365 days (1 year) [^1] |