avieth commented on pull request #15013:
URL: https://github.com/apache/airflow/pull/15013#issuecomment-810480452


   In the documentation of the `Connection` class, it is stated that `extra` 
should be encoded JSON.
   
   
https://github.com/apache/airflow/blob/6b9b0675c5ece22a1c382ebb9b904fb18f486211/airflow/models/connection.py#L87
   
   However, AFAICT, the constructor will not check this, and will not fail when 
`extra` is not JSON. But `get_uri` _does_ check this (implicitly, by trying to 
decode then urlencode), and so we have the very weird case in which we can 
construct a `Connection` object for which `get_uri` fails, as @davlum has 
shown. I'd say that's fairly counterintuitive and surprising.
   
   Is there a good reason why `extra` must be encoded JSON? Seems like a nice 
solution would be to allow for any string there.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to