Pushkal-Gupta opened a new pull request, #77008:
URL: https://github.com/apache/airflow/pull/77008
A Dag run created by one task triggering another Dag has `run_type`
`operator_triggered`. The en locale has a label for the other five run types
but not that one, so the UI renders the key itself and the user reads the
literal text `runTypes.operator_triggered`.
Three places show it:
| Where | Shown |
| --- | --- |
| Dag Runs table, Run Type column | `runTypes.operator_triggered` |
| Run header | `runTypes.operator_triggered` |
| Run details | `runTypes.operator_triggered` |
All three do `translate(`common:runTypes.${dagRun.run_type}`)`. The key is
built at runtime, so the existing check in `locales.test.ts` that every static
key resolves in en cannot see it, which is why this has stayed in.
The run type is not a rare one. `/execution/dag-runs` sets
`DagRunType.OPERATOR_TRIGGERED` whenever a task triggers another Dag, so any
deployment using that pattern hits it.
The legend has the same hole. `RunTypeIcon` already draws a lightning bolt
for `operator_triggered`, but `RunTypeLegend` listed five run types by hand and
left that one out, so the icon appears in the grid with no row explaining it.
## What this changes
One new en key, `common:runTypes.operator_triggered`, and one more entry in
the legend list. No other locale is touched, so they fall back to en as usual.
Both lists are now held to the generated schema rather than to a
hand-written copy of it. `$DagRunType.enum` in
`openapi-gen/requests/schemas.gen.ts` comes from the backend enum, so adding a
run type there fails these tests until the label and the legend catch up:
- `locales.test.ts` asserts en labels every value of `$DagRunType.enum`
- `RunTypeLegend.test.tsx` asserts the legend lists every value
The legend's array is exported for that second test. It keeps its display
order rather than taking the enum's, since the order is a deliberate one and
the grid draws no icon for `scheduled`.
## Verification
Removing either fix fails its own test, and the failure names
`operator_triggered` rather than something vague.
`eslint --quiet` and `tsc` exit 0, prettier is clean, and the full vitest
run is 279 files passing. The prek hooks on the changed files pass, including
`Compile / format / lint UI` and `Check i18n files validity`.
No newsfragment: this is an ordinary bug fix.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes - Claude Code (Opus 5)
--
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]