pindge opened a new issue #17219:
URL: https://github.com/apache/airflow/issues/17219


   **Apache Airflow version**: 2.1.2
   
   **Environment**:
   - github workflow
   - 
   **What happened**:
   
   in our code base, we provide VARS from terraform, and allows dags owner to 
get via Variable
   ```
   INDEXING_USER_SECRET = Variable.get(
       "processing_user_secret", default_var="indexing-aws-creds-sandbox"
   )
   ```
   since upgrading to v2.1.2, we are noticing following issues, in v1.10.15 it 
didnt have variable.description columns, its doesnt appear to be breaking 
anything just eye sore to see
   ```
   [SQL: SELECT variable.val AS variable_val, variable.id AS variable_id, 
variable."key" AS variable_key, variable.description AS variable_description, 
variable.is_encrypted AS variable_is_encrypted 
   FROM variable 
   WHERE variable."key" = ?
    LIMIT ? OFFSET ?]
   [parameters: ('processing_user_secret', 1, 0)]
   (Background on this error at: http://sqlalche.me/e/13/e3q8)
   ERROR [airflow.models.dagbag.DagBag] Failed to import: 
/home/runner/work/dea-airflow/dea-airflow/dags/utility/utility_explorer_summary.py
   Traceback (most recent call last):
     File 
"/usr/share/miniconda/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1276, in _execute_context
       self.dialect.do_execute(
     File 
"/usr/share/miniconda/lib/python3.8/site-packages/sqlalchemy/engine/default.py",
 line 608, in do_execute
       cursor.execute(statement, parameters)
   sqlite3.OperationalError: no such column: variable.description
   ```
   **What you expected to happen**:
   when `default_var` is passed to `Variable.get` no error message displays.
   
   **How to reproduce it**:
   1. have code contain `Variable.get` in an environment and database that 
doesnt have this VAR defined.
   2.  `airflow db init`
   3. `airflow dag list`
   
   **Anything else we need to know**:
   
https://github.com/GeoscienceAustralia/dea-airflow/runs/3158865646?check_suite_focus=true
 expland `setup airflow and check dags list` section
   


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