vasyharan opened a new issue #15685:
URL: https://github.com/apache/airflow/issues/15685


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the 
context.
   
   -->
   
   **Apache Airflow version**: 2.2.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl 
version`): 1.19 (server), 1.21 (client)
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: AWS EKS
   - **OS** (e.g. from /etc/os-release): Docker image 
(apache/airflow:2.0.2-python3.7)
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**: 
   
   `airflow` bin fails during configuration initialization (stack below). I see 
a similar issue reported here: https://github.com/apache/airflow/issues/13254, 
but my error is slightly different. 
   
   ```
     File "/home/airflow/.local/bin/airflow", line 5, in <module>
       from airflow.__main__ import main
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/__init__.py", line 
34, in <module>
       from airflow import settings
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/settings.py", line 
37, in <module>
       from airflow.configuration import AIRFLOW_HOME, WEBSERVER_CONFIG, conf  
# NOQA F401
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 1098, in <module>
       conf = initialize_config()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 860, in initialize_config
       conf.validate()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 199, in validate
       self._validate_config_dependencies()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 227, in _validate_config_dependencies
       is_sqlite = "sqlite" in self.get('core', 'sql_alchemy_conn')
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 328, in get
       option = self._get_environment_variables(deprecated_key, 
deprecated_section, key, section)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 394, in _get_environment_variables
       option = self._get_env_var_option(section, key)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 298, in _get_env_var_option
       return 
_get_config_value_from_secret_backend(os.environ[env_var_secret_path])
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 83, in _get_config_value_from_secret_backend
       secrets_client = get_custom_secret_backend()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py", 
line 999, in get_custom_secret_backend
       secrets_backend_cls = conf.getimport(section='secrets', key='backend')
   NameError: name 'conf' is not defined
   ```
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   
   `airflow` to correctly initialize the configuration.
   
   **How to reproduce it**:
   `airflow.cfg`
   ```
   [core]
   # ...
   sql_alchemy_conn_secret = some-key
   
   # ...
   [secrets]
   backend = airflow.contrib.secrets.aws_secrets_manager.SecretsManagerBackend
   backend_kwargs = {config_prefix: 'airflow/config', connections_prefix: 
'airflow/connections', variables_prefix: 'airflow/variables'}
   ```
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


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