rjgoyln commented on PR #65047:
URL: https://github.com/apache/airflow/pull/65047#issuecomment-4231945797

   > Maybe just keeping the JSON part to see if it is valid JSON, or not, but 
that was already handled above.
   > 
   > ```python
   > ...
   >     if not os.path.exists(args.file):
   >         rich.print(f"[red]Missing variable file: {args.file}")
   >         sys.exit(1)
   >     with open(args.file) as var_file:
   >         try:
   >             var_json = json.load(var_file)
   >         except json.JSONDecodeError:
   >             rich.print(f"[red]Invalid variable file: {args.file}")
   >             sys.exit(1)
   > ...
   > ```
   > 
   > I would say let's merge the generic solution for everything and close 
this. Many thanks for the PR! This could cause confusion, double validation of 
fields, etc. Or if you think we can somehow combine, open to any ideas :)
   
   Thanks for the feedback! I agree that avoiding double validation and keeping 
the logic unified is better for the codebase. I’ll close this PR.


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