pierrejeambrun opened a new pull request, #74083:
URL: https://github.com/apache/airflow/pull/74083
### 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](https://github.com/apache/airflow/pull/74039#discussion_r4158415352).
### 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 |
| --- | --- |
| <img
src="https://raw.githubusercontent.com/astronomer/airflow/4743a366a28c1c234672b85bd90edad04e1f1c31/screenshots/trigger-empty-modal.png"
width="360"> | <img
src="https://raw.githubusercontent.com/astronomer/airflow/4743a366a28c1c234672b85bd90edad04e1f1c31/screenshots/trigger-full-menu.png"
width="300"> |
**Run Details `Conf` row** — empty for a configless run, JSON for a run with
config:
| Empty config (`{}`) → no `Conf` value | Has config → JSON shown |
| --- | --- |
| <img
src="https://raw.githubusercontent.com/astronomer/airflow/4743a366a28c1c234672b85bd90edad04e1f1c31/screenshots/details-empty-conf.png"
width="420"> | <img
src="https://raw.githubusercontent.com/astronomer/airflow/4743a366a28c1c234672b85bd90edad04e1f1c31/screenshots/details-full-conf.png"
width="420"> |
---
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?
- [X] Yes — Claude Code (Opus 4.8)
Generated-by: Claude Code (Opus 4.8) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]