BeauDevCode opened a new pull request, #68268:
URL: https://github.com/apache/airflow/pull/68268
closes: #68262
## Why
The Variables edit form currently shows invalid JSON-like values as a subtle
warning while still allowing the form to be submitted. That makes it easy to
save malformed object or array values accidentally.
## What changed
- Turned the existing JSON warning into a form validation error for values
that begin with `{` or `[`.
- Reused the existing invalid form state so the Save button is disabled
while malformed JSON is present.
- Preserved support for plain string variable values.
- Added component tests for blocking malformed JSON object values and
allowing plain string values.
This is intentionally narrower than draft PR #62882: it does not add JSON
prettifying or submit-time minification, it only makes the current invalid JSON
warning prominent and guarded by validation.
## Tests
- `git diff --check`
- Source sanity checks for the changed TS/TSX files
Not run locally: `pnpm test` / UI lint. This checkout does not have
`node_modules`, and this environment does not have `pnpm`, `npm`, or `corepack`
available in PATH.
--
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]