UI: Add Select Recent Configurations dropdown to Trigger Dag form - #70413
UI: Add Select Recent Configurations dropdown to Trigger Dag form#70413josix wants to merge 1 commit into
Conversation
c95038e to
632e715
Compare
Reusing a past run's config currently requires leaving the trigger flow to hunt for the right run in the run list and use "Trigger again with this config". Restoring the Airflow 2 in-form dropdown lets users pick any distinct config from the recent runs in a scrollable list while composing a run. The dropdown reuses the existing dagRuns list endpoint and the same conf-only prefill path as the menu item, so no new API surface is added. closes: apache#69820
632e715 to
1c782ec
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
Thanks a lot,
A couple suggestions before this can move forward :)
|
|
||
| setSelectedValue(value); | ||
| if (selected?.run.conf) { | ||
| onSelectConf(selected.run.conf); |
There was a problem hiding this comment.
This will reset user defined logicalDate, runId, and note to defaults.
But here it fires interactively: a user who sets a logical date / custom run ID / manual data interval / note and then picks a recent config to reuse its params loses all of those to defaults. The dropdown is meant to apply a past run's conf, not reset the run's scheduling fields.
Either fix that or move this config selector at the top of the form, so we know that all fields are affected and will be reset to
| return ( | ||
| <Select.Root | ||
| collection={recentConfigOptions} | ||
| data-testid="recent-config-select" | ||
| disabled={isLoading || options.length === 0} | ||
| onValueChange={handleValueChange} | ||
| size="sm" | ||
| value={selectedValue} | ||
| > | ||
| <Select.Label fontSize="xs">{translate("triggerDag.recentConfig")}</Select.Label> | ||
| <Select.Control> | ||
| <Select.Trigger> | ||
| <Select.ValueText placeholder={translate("triggerDag.recentConfigPlaceholder")} /> | ||
| </Select.Trigger> |
There was a problem hiding this comment.
When we run through 'trigger again with this conf button', this drop down probably shouldn't be there at all.
It's confusing to have it (with nothing selected), but actually a conf is passed down. And if it's to change the run conf to another run, there's no point running through that 'trigger again with this conf' button.
Context
According to the #69820's description, reusing a past run's config currently requires leaving the trigger flow to hunt for the right run in the run list and use "Trigger again with this config". In this PR, I'm going to restore the Airflow 2 in-form dropdown lets users pick any distinct config from the recent runs in a scrollable list while composing a run. The dropdown reuses the existing dagRuns list endpoint and the same conf-only prefill path as the menu item, so no new API surface is added.
closes: #69820
Verification
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.