Skip to content

Treat an empty Dag run config as no config in the UI - #74083

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:fix-empty-dag-run-conf
Oct 2, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
astronomer:fix-empty-dag-run-conf

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

What was the issue

A Dag run triggered without a config comes back from the API as an empty object {}, not null or undefined. The UI decided "does this run have a config?" by comparing against undefined, so a configless run was treated as if it had one:

  • the Trigger button opened a config dropdown menu (costing an extra click) for runs that had no config, and
  • the run Details page showed Conf: {} for them.

Raised in a review comment on #74039.

The change

A small shared type guard hasDagRunConfig(conf) that treats null, undefined, and {} as "no config", used at every config-presence site so they agree:

  • TriggerDAGButton — the menu now appears only for runs with a real config (the fix).
  • Run/Details — the Conf row is empty for configless runs instead of showing {}.
  • DagRuns table — switched its existing inline empty-object check to the same helper (behaviour unchanged).

Screenshots

Trigger button — configless run opens the form in one click; a run with config still gets the options menu:

Empty config ({}) → form opens directly Has config → options menu

Run Details Conf row — empty for a configless run, JSON for a run with config:

Empty config ({}) → no Conf value Has config → JSON shown

This overlaps the TriggerDAGButton area of #74039 and will conflict with it once one of them merges; that is expected and fine (the config-presence check is the shared piece).


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

🤖 Generated with Claude Code

A Dag run triggered without a config comes back from the API as an empty
object `{}`, not null or undefined, so presence checks that compared against
`undefined` treated those runs as if they carried a config: the trigger
button opened a config menu and the run details showed `{}` for runs that
had none. Check for a non-empty object instead, through a shared helper so
every config-presence site agrees.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 2, 2026
@pierrejeambrun
pierrejeambrun marked this pull request as ready for review October 2, 2026 10:57
@pierrejeambrun

Copy link
Copy Markdown
Member Author

After

Screen.Recording.2026-10-02.at.12.59.16.mov

@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 2, 2026
@bbovenzi
bbovenzi merged commit 3045451 into apache:main Oct 2, 2026
125 of 149 checks passed
@bbovenzi
bbovenzi deleted the fix-empty-dag-run-conf branch October 2, 2026 14:27
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.

2 participants