Skip to content

Fix "Trigger again with this config" ignoring param changes made in the UI#67253

Open
shashbha14 wants to merge 2 commits into
apache:mainfrom
shashbha14:fix/trigger-again-config-params-67243
Open

Fix "Trigger again with this config" ignoring param changes made in the UI#67253
shashbha14 wants to merge 2 commits into
apache:mainfrom
shashbha14:fix/trigger-again-config-params-67243

Conversation

@shashbha14
Copy link
Copy Markdown
Contributor

Closes #67243

When using "Trigger again with this config", any changes made to params in the trigger form were ignored and the original conf from the previous run was submitted instead.

The useEffect that syncs the param store's conf back into the form field had a !prefillConfig guard, which blocked it from running when "Trigger again" was used. So editing a param via the UI updated the store but the form field stayed on the original value.
Removed the guard so the form always stays in sync with the store, and removed prefillConfig from the dependency array since it is no longer used inside that effect.

I used Claude (claude.ai) as an AI assistant for parts of this implementation..

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 20, 2026
@shashbha14 shashbha14 marked this pull request as ready for review May 20, 2026 18:05
Comment thread airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx Outdated
@shashbha14 shashbha14 force-pushed the fix/trigger-again-config-params-67243 branch from 584b564 to 13c28ef Compare May 21, 2026 14:21
@shashbha14 shashbha14 requested a review from bbovenzi May 21, 2026 14:23
Comment on lines 91 to 92
},
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  const { control, handleSubmit, watch } = useForm<DagRunTriggerParams>({
    defaultValues,
    values: { ...defaultValues, conf },
    resetOptions: { keepDirtyValues: true },
  });

Needing two useEffects shows us that there is a problem at the core of how we're handling this. Let's update our use of react-hook-form and then use just one useEffect to handle trigger again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "Trigger again with this config" behavior can be misleading

2 participants