You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/23 08:48:44 UTC

[GitHub] [airflow] potiuk edited a comment on issue #13254: Import error when using custom backend and sql_alchemy_conn_secret

potiuk edited a comment on issue #13254:
URL: https://github.com/apache/airflow/issues/13254#issuecomment-750015222


   But the question is if  moving get_custom_secret_backend before conf.read() is a good idea ? The problem is that the 'get_custom_secret_backend' uses the conf variable and reads the configuration from it:  
   
   ```
   conf.getimport(section='secrets', key='backend')
   conf.get(section='secrets', key='backend_kwargs', fallback='{}')
   ```
   
   Then the `get_custom_secret_backend` can be actually called BEFORE 'secrets' section is parsed via conf! 
   
   This is the 'chicken-egg' problem I mentioned before. 
   
   We might assume of course that the 'secret' versions of the variables should be defined after [secrets] section in the conf. Which might make sense, but then it opens the doors to problems: 
   
   The behaviour will be different if  someone defines '[core'] section with `sql_aclhemy_conn' before the [secrets] or after.
   


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