bramhanandlingala opened a new pull request, #68392:
URL: https://github.com/apache/airflow/pull/68392

   
   Improves the invalid JSON warning shown in the Variable edit form.
   
   When a variable value appears to be JSON but contains invalid syntax, the UI 
now displays a more prominent warning message along with the JSON parsing error 
details to help users identify and fix the issue more quickly.
   
   Previously, the UI only displayed a small "Invalid JSON" message, which was 
easy to overlook. This could lead to operators saving malformed JSON values and 
discovering the problem later through downstream DAG failures.
   
   This change improves visibility of the warning while still allowing 
non-JSON/plain-text variables to be saved, since Airflow Variables are not 
required to contain JSON.
   
   Changes
   Added a more prominent invalid JSON warning in the Variable edit form.
   Added an alert icon to draw attention to the warning.
   Displayed JSON parser error details to help users locate and fix syntax 
issues.
   Preserved support for plain-text variables.
   Did not block saving variables based solely on client-side JSON validation.
   Testing
   
   Tested with:
   
   Valid JSON value → no warning displayed.
   Invalid JSON value → warning and parser error displayed.
   Plain text value → no warning displayed and save works normally.


-- 
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]

Reply via email to