You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "arose26 (via GitHub)" <gi...@apache.org> on 2026/08/17 11:14:32 UTC
[PR] UI: Show an empty object for object params with no value [airflow]
arose26 opened a new pull request, #71710:
URL: https://github.com/apache/airflow/pull/71710
`FieldObject` renders the JSON editor for params whose declared type is `object` — `FieldSelector` routes arrays to `FieldStringArray`, `FieldAdvancedArray` and `FieldMultiSelect`, so an array never reaches it. It nonetheless falls back to an empty **array** when the param has no value:
```tsx
value={JSON.stringify(param.value ?? [], undefined, 2)}
```
So a param declared as an object but left unset opens the trigger form's editor showing `[]`, and anyone editing it starts from the wrong JSON literal for the field's declared type.
The submitted `conf` is built from `param.value` rather than the editor text, so an untouched field still submits `null` — this is about what the user is shown and edits from, not about the value sent when the field is left alone.
related: #55213
### Tests
Adds `FieldObject.test.tsx` covering both branches of the fallback — a param with no value, and one with an existing value. The first fails before this change (`Expected {} / Received []`) and passes after.
`pnpm lint` (eslint + tsc) is clean and the full `ui` suite passes — 935 tests across 121 files.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5)
Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5354779558
### Backport successfully created: v3-3-test
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-3-test</td>
<td><a href="https://github.com/apache/airflow/pull/71876"><img src="https://img.shields.io/badge/PR-71876-blue" alt="PR Link"></a></td>
</tr>
</table>
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "choo121600 (via GitHub)" <gi...@apache.org>.
choo121600 commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5322505463
Could you also attach screenshots showing the UI before and after the changes?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "arose26 (via GitHub)" <gi...@apache.org>.
arose26 commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5331242048
Thanks for the review — screenshots below.
Both show the trigger form's Run Parameters section for a DAG param declared as type: ["object", "null"] that has not been given a value. Only the one line in FieldObject.tsx differs between them.
Before — the editor opens on [], an array literal, for a param whose declared type is object:
<img width="1520" height="748" alt="image" src="https://github.com/user-attachments/assets/a8f59ce9-1005-4f44-a72a-c63075d7b3c1" />
After — it opens on {}, matching the declared type:
<img width="1520" height="748" alt="image" src="https://github.com/user-attachments/assets/8d149640-0f45-4f94-8df0-9b72b67f51b2" />
The rest of the field is unchanged: same label, same description, same editor.
For transparency about how these were produced: rather than stand up a full Airflow instance, I rendered the real FlexibleForm in a local Vite page, mounted the same way ConfigForm mounts it in the trigger dialog (same Accordion.Root props, no noAccordion), seeded with a single object param. So the accordion section, the Row layout and the Monaco editor are the actual components with the actual styling — nothing mocked or redrawn. What is not pictured is the surrounding dialog chrome, since that comes from the modal rather than from this field.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "arose26 (via GitHub)" <gi...@apache.org>.
arose26 commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5331251580
Thanks for the review — screenshots below.
Both show the trigger form's Run Parameters section for a DAG param declared as type: ["object", "null"] that has not been given a value. Only the one line in FieldObject.tsx differs between them.
Before — the editor opens on [], an array literal, for a param whose declared type is object:
<img width="1520" height="748" alt="image" src="https://github.com/user-attachments/assets/a8f59ce9-1005-4f44-a72a-c63075d7b3c1" />
After — it opens on {}, matching the declared type:
<img width="1520" height="748" alt="image" src="https://github.com/user-attachments/assets/8d149640-0f45-4f94-8df0-9b72b67f51b2" />
The rest of the field is unchanged: same label, same description, same editor.
For transparency about how these were produced: rather than stand up a full Airflow instance, I rendered the real FlexibleForm in a local Vite page, mounted the same way ConfigForm mounts it in the trigger dialog (same Accordion.Root props, no noAccordion), seeded with a single object param. So the accordion section, the Row layout and the Monaco editor are the actual components with the actual styling — nothing mocked or redrawn. What is not pictured is the surrounding dialog chrome, since that comes from the modal rather than from this field.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5315304264
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our [Contributors' Guide](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example Dag that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #71710:
URL: https://github.com/apache/airflow/pull/71710#issuecomment-5354767242
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Show an empty object for object params with no value [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #71710:
URL: https://github.com/apache/airflow/pull/71710
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org