henry3260 opened a new pull request, #75178:
URL: https://github.com/apache/airflow/pull/75178
## Why
`next_run_assets` scopes the asset scheduling expression it serves to the
caller: an `asset` leaf
whose id is not readable keeps its place in the boolean tree, so the shape
of the schedule stays
honest, but its `uri`, `name` and `id` are blanked and `hidden` is set
(#72864).
The asset schedule popover never learned about that flag. `AssetNode` took
every non-alias leaf down
the same path, so a redacted leaf rendered `<RouterLink
to={`/assets/${null}`}>{null}</RouterLink>`:
a link with no visible text that navigates to `/assets/null`. The REST API
documents `hidden` and the
generated TypeScript client exposes it, so the contract existed on both
sides — only the UI side of it
was missing.
Deployments whose auth manager authorizes assets individually are the ones
affected. The FAB auth
manager returns every asset id and the simple auth manager grants all or
nothing above the lowest
role, so nothing is redacted there.
## What
- `airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx`
— derive `isHidden` from
the leaf's `hidden` field and give a hidden leaf its own branch: a lock
icon and a muted
`Hidden asset` label, with no link. Alias and readable-asset leaves render
exactly as before.
- `airflow-core/src/airflow/ui/public/i18n/locales/en/common.json` — add the
`expression.hiddenAsset`
key. Other locales fall back to English until translated.
-
`airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.test.tsx`
— new test that
renders a readable leaf and a hidden leaf together, asserting the hidden
one is labelled and
contributes no link while the readable one keeps its `/assets/1` link. It
fails against `main` and
passes with this change.
related: #72864
---
##### 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]