diff --git a/assets/js/collaborative-editor/components/form/form-field.tsx b/assets/js/collaborative-editor/components/form/form-field.tsx index 7be746b265..31e0037830 100644 --- a/assets/js/collaborative-editor/components/form/form-field.tsx +++ b/assets/js/collaborative-editor/components/form/form-field.tsx @@ -5,7 +5,7 @@ export const INPUT_CLASSES = interface FormFieldProps { name: string; - label: string; + label: React.ReactNode; meta: any; // TanStack Form meta type helpText?: string | undefined; children: React.ReactNode; diff --git a/assets/js/collaborative-editor/components/form/number-field.tsx b/assets/js/collaborative-editor/components/form/number-field.tsx index 6a858a04ed..ee5f848b1d 100644 --- a/assets/js/collaborative-editor/components/form/number-field.tsx +++ b/assets/js/collaborative-editor/components/form/number-field.tsx @@ -3,7 +3,7 @@ import { FormField, INPUT_CLASSES } from './form-field'; import { useFieldContext } from '.'; interface NumberFieldProps { - label: string; + label: React.ReactNode; placeholder?: string | undefined; disabled?: boolean | undefined; min?: number | undefined; diff --git a/assets/js/collaborative-editor/components/inspector/WorkflowSettings.tsx b/assets/js/collaborative-editor/components/inspector/WorkflowSettings.tsx index be293c00b1..d1544810f1 100644 --- a/assets/js/collaborative-editor/components/inspector/WorkflowSettings.tsx +++ b/assets/js/collaborative-editor/components/inspector/WorkflowSettings.tsx @@ -16,6 +16,7 @@ import { createWorkflowSchema } from '#/collaborative-editor/types/workflow'; import { useURLState } from '#/react/lib/use-url-state'; import { AlertDialog } from '../AlertDialog'; +import { Tooltip } from '../Tooltip'; export function WorkflowSettings() { // Get workflow from store - LoadingBoundary guarantees it's non-null @@ -35,6 +36,11 @@ export function WorkflowSettings() { // Check if project has concurrency disabled (concurrency === 1) const isProjectConcurrencyDisabled = projectConcurrency === 1; + const triggers = useWorkflowState(state => state.triggers); + const isSyncMode = + triggers[0]?.type === 'webhook' && + triggers[0]?.webhook_reply === 'after_completion'; + const handleViewAsYAML = () => { updateSearchParams({ panel: 'code' }); }; @@ -135,16 +141,21 @@ export function WorkflowSettings() { {/* Concurrency Section */}
-

Concurrency

-

- Control how many of this workflow's Runs are executed at the - same time -

{field => ( <> + Max Concurrency + + + + + } placeholder="Unlimited (up to max available)" helpText={ field.state.value === null @@ -155,7 +166,20 @@ export function WorkflowSettings() { max={projectConcurrency ?? undefined} disabled={isReadOnly || isProjectConcurrencyDisabled} /> - {isProjectConcurrencyDisabled && ( + {isSyncMode && ( +
+
+ + This workflow uses a sync-mode trigger. Because sync-mode is + time sensitive, most OpenFn instances ignore concurrency + limits for these workflows and process as many as possible + at once. (You may set this setting, but as your OpenFn host + scales the workers and adjusts their priorities over time it + may not have any impact.) +
+
+ )} + {!isSyncMode && isProjectConcurrencyDisabled && (
Parallel execution of runs is disabled for this project.