[GitHub] [airflow] dstandish edited a comment on pull request #15100: Add support for arbitrary json in conn uri format

2021-03-31 Thread GitBox


dstandish edited a comment on pull request #15100:
URL: https://github.com/apache/airflow/pull/15100#issuecomment-811659712


   ok so to be clear @mik-laj you are in support of supporting arbitrary dict 
under `extra`, just not primative or list?
   
   OR, you do _not_ support this PR at all and you think extra should just be 
dict of strings i.e `'key1':'val1'` and so on, e.g. _not_ 
`'key1':{'key3':'key4'}`
   
   if you support this i'll remove the tests for primitive and list, so that 
the codebase does not explicitly endorse them.


-- 
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:
us...@infra.apache.org




[GitHub] [airflow] dstandish edited a comment on pull request #15100: Add support for arbitrary json in conn uri format

2021-03-31 Thread GitBox


dstandish edited a comment on pull request #15100:
URL: https://github.com/apache/airflow/pull/15100#issuecomment-811659712


   ok so to be clear @mik-laj you are in support of supporting arbitrary dict 
under `extra`, just not primative or list?
   
   OR, you do _not_ support this PR at all and you think extra should just be 
dict of strings i.e `'key1':'val1'` and so on, e.g. _not_ 
`'key1':{'key3':'key4'}`
   
   if you support this i'll remove the tests for primitive and list, so the 
codebase does not explicitly endorse them.


-- 
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:
us...@infra.apache.org




[GitHub] [airflow] dstandish edited a comment on pull request #15100: Add support for arbitrary json in conn uri format

2021-03-31 Thread GitBox


dstandish edited a comment on pull request #15100:
URL: https://github.com/apache/airflow/pull/15100#issuecomment-811659712


   ok so to be clear @mik-laj you are in support of supporting arbitrary dict 
under `extra`, just not primative or list?
   
   OR, you do _not_ support this PR at all and you think extra should just be 
dict of strings i.e `'key1':'val1'` and so on, e.g. _not_ 
`'key1':{'key3':'key4'}`
   
   if you support this i'll go ahead and remove primitive and list but keep 
arbitrary dict.


-- 
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:
us...@infra.apache.org




[GitHub] [airflow] dstandish edited a comment on pull request #15100: Add support for arbitrary json in conn uri format

2021-03-30 Thread GitBox


dstandish edited a comment on pull request #15100:
URL: https://github.com/apache/airflow/pull/15100#issuecomment-810654779


   > I like this solution with the use of a special key. I don't understand the 
role of base64 here. Is it necessary? It seems to me that the pure value will 
be easier to use, e.g. you will be able to check the connection configuration 
by looking at the environment variables.
   
   Yep you are right.  base64 isn't necessary.  i have removed it.  but still 
the uri remains equally indecipherable to the human eye.
   
   > As for supporting other types, I'm not sure we want to support it. We 
expect the extra field to be a Web UI dictionary. The use of primitive types 
also causes a problem with extending a given connection ie. it is not 
future-proff.
   
   I agree with this.  I like the idea of supporting nested dictionaries, but 
lists and primatives are not useful and probably a bad idea.  You might be 
interested in the discussion on #15013; the inability to serialize a primitive 
extra is cited as a primary motivator for the PR.  In the present PR I included 
support for primative / list because they make a valid point that it's not 
technically forbidden by `Connection`, and adding support in get_uri at least 
allows us to properly serialize allowed values.  But yeah I'd be happy to 
forbid primitive and list.
   
   What do you think we should do?
   
   


-- 
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:
us...@infra.apache.org




[GitHub] [airflow] dstandish edited a comment on pull request #15100: Add support for arbitrary json in conn uri format

2021-03-30 Thread GitBox


dstandish edited a comment on pull request #15100:
URL: https://github.com/apache/airflow/pull/15100#issuecomment-810654779


   > I like this solution with the use of a special key. I don't understand the 
role of base64 here. Is it necessary? It seems to me that the pure value will 
be easier to use, e.g. you will be able to check the connection configuration 
by looking at the environment variables.
   
   Yep you are right.  base64 isn't necessary.  i have removed it.  but still 
the uri remains equally indecipherable to the human eye.
   
   > As for supporting other types, I'm not sure we want to support it. We 
expect the extra field to be a Web UI dictionary. The use of primitive types 
also causes a problem with extending a given connection ie. it is not 
future-proff.
   
   I agree with this.  I like the idea of supporting nested dictionaries, but 
lists and primatives are not useful and probably a bad idea.  You might be 
interested in the discussion on #15013; the inability to serialize a primitive 
extra is cited as a primary motivator for the PR.  In the present PR I included 
support for primative / list because they make a valid point that it's not 
technically forbidden by `Connection`, and adding support in get_uri at least 
allows us to properly serialize allowed values.  But yeah I'd be happy to 
forbid primative and list.
   
   What do you think we should do?
   
   


-- 
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:
us...@infra.apache.org