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 2021/01/05 11:52:42 UTC
[GitHub] [airflow] JCoder01 edited a comment on issue #13099: Unable to start scheduler after stopped
JCoder01 edited a comment on issue #13099:
URL: https://github.com/apache/airflow/issues/13099#issuecomment-754589174
Happy New Year @ashb
There is a little bit of both. There is an outstanding issue where use of Variables (or probably anything that interacts with the backed db in the global scope) in a plugin raises the `UNEXPECTED COMMIT` RunTime error.
The problem I reported with being unable to restart the scheduler seems to have been caused by wrapping my `Variable.get` in an overly generous try/except, hiding the run time error and causing things in the db to get out of sync.
Running the below should recreate the issue, I did this on python 3.7
```
mkdir airflow_scheduler_test
cd airflow_scheduler_test
export AIRFLOW_HOME=$(pwd)
virtualenv pyenv
source pyenv/bin/activate
pip install apache-airflow==2.0.0
airflow db init
airflow variables set test TEST
mkdir plugins
cat << EOF > plugins/test.py
from airflow.models.variable import Variable
print(Variable.get('test'))
EOF
airflow dags unpause example_bash_operator
airflow scheduler
```
----------------------------------------------------------------
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