github-actions[bot] opened a new pull request, #76089:
URL: https://github.com/apache/airflow/pull/76089

   When a generated airflowctl command such as `connections create` is run
   without a datamodel field that the API requires, the unset option reaches
   pydantic as None and the CLI crashes with a raw ValidationError traceback
   ("Input should be a valid string ... input_value=None").
   
   Catch the ValidationError when the request body is built, use pydantic's
   FieldInfo.is_required() to tell missing required fields from invalid values,
   and exit with a message naming the flags, e.g.
   "the following arguments are required: --conn-type". Invalid values are
   reported against their flag. No request is sent in either case.
   
   Part of #57633, addresses #57721.
   (cherry picked from commit fbc18bccfb71b0532f343fddbe9569610758433d)
   
   Co-authored-by: Rishabh <[email protected]>


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

  • [PR] [airflow-ctl/v0-1-test] ... github-actions[bot] (via GitHub) via commits

Reply via email to