-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Display static asset metadata (extra) in Asset details page #57710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi 👋, I wanted to mention that I wasn’t able to fully run the UI locally due to environment limitations, I’d really appreciate any guidance or help verifying the UI behavior. |
|
Running locally especially for UI changes is important. Can you tell us whether it is your PC as environment or do you have struggles in getting development environment working? Alongside of UI changes it is also always good to post a "Before" and "After" screenshot, that makes reviews easier. |
|
Hi @jscheffl 👋 Thanks for following up! I tried setting up the full UI environment locally to test the change but ran into some issues. Here’s what I’ve done so far: Installed and configured Breeze successfully. Ran breeze start-airflow — backend services started fine. In another terminal, I ran npm run dev inside airflow-core/src/airflow/ui. Both commands started successfully, but when I opened the localhost links (e.g., http://localhost:8080 and the Vite dev port like 5173), the pages were blank (no UI rendered). After that, I tried a separate docker-compose setup (with an .env file and Airflow folder). The UI build (npm run build) completes successfully, so I think my frontend code is fine — I’m just struggling to get the dev environment to render the UI. Could you please help me understand what I might be missing, or if there’s a specific step to make the frontend appear correctly when using Breeze? Any guidance would mean a lot 🙏 |
|
You should use |
|
I want to deprecate and remove it, but as long as the value is there (it will be until Airflow 4) it should be shown in the UI. Looks like the implementation hides it when the extra is empty so I’m fine with this. Instead of just plain JSON, should we show the dict as a table instead? (What do we do for AssetEvent.extra?) |
| {asset?.extra && Object.keys(asset.extra).length > 0 && ( | ||
| <Box mt={3} mb={3} px={3}> | ||
| <Text fontWeight="bold" mb={2}> | ||
| Static Asset Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this in airflow-core/src/airflow/ui/public/i18n/locales/en since we have i18n support.
|
Thanks @Lee-W, @uranusjr, and @guan404ming for reviewing this! |
|
IMO asset extra and asset event extra should be displayed in the same way. Since the latter is JSON now, the former should be JSON too. Let’s get this done first, and then work on changing both to tables (if viable). |
|
Thanks @uranusjr! Got it — I’ll keep the asset.extra displayed as JSON for now to stay consistent with asset_event.extra. |
2addb1e to
3ff1253
Compare
| {asset?.extra && Object.keys(asset.extra).length > 0 && ( | ||
| <Box mt={3} mb={3} px={3}> | ||
| <Text fontWeight="bold" mb={2}> | ||
| {translate("assets:static_asset_metadata")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {translate("assets:static_asset_metadata")} | |
| {translate("assets:additional_data")} |
maybe let's try additional data? the reason why I don't want to use extra is because of #55200, but suggestion is welcome. Naming is hard 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Lee-W — that makes sense! I’ve updated the label to use Additional Data to stay consistent with the naming direction and avoid confusion with extra. 👍
cb497b3 to
1fe26e9
Compare
|
Thanks so much @Lee-W, @uranusjr, @guan404ming, @jscheffl, and @potiuk for all your guidance and patience throughout this PR 🙏 I finally got the development environment fully working locally (with both assets and DAGs loaded!) and verified that the static asset metadata — now labeled as “Additional Data” — renders correctly in the UI. I’ve also added the i18n translations across all locale files and ensured all static and formatting checks pass successfully ✅ I’ve updated the PR description with the latest details and added before/after screenshots for better clarity. If any further changes or refinements are needed, please let me know — I’m happy to make updates. Really appreciate all your support and feedback — this has been an incredible learning experience so far! 😊 |
|
Looks like there are unrelated (language) changes here. The PR should likely be rebased to latest main and those changes removed. |
1fe26e9 to
767c32c
Compare

Description
This PR adds a new section in the Asset Details page to display the Additional Data (asset.extra) associated with each asset.
This enhancement allows users to easily view contextual information (such as owner, path, or other custom fields) defined alongside the asset.
Before
Additional data (asset.extra) was not visible in the UI.
Users had no way to inspect the additional information stored with each asset.
After
Added an "Additional Data" section below the asset header on the Asset Details page.
The additional data is displayed as a formatted JSON block, consistent with how asset_event.extra is shown.
Added i18n translation support by including the "additional_data" key in all locale assets.json files.
Screenshots
Before
(No section for Additional data)
After
Additional data is now clearly visible:
Implementation Details
Updated file:
airflow-core/src/airflow/ui/src/pages/Asset/AssetLayout.tsx
Added i18n key "additional_data" to all locale files under:
airflow-core/src/airflow/ui/public/i18n/locales/*/assets.json
Verified in Breeze dev mode using:
breeze start-airflow --dev-mode
Tested with sample assets having additional data
Summary
This improvement enhances the clarity and usability of the Airflow UI by displaying Additional Data directly within the Asset Details page, ensuring consistency with how asset events are represented.