tothandor opened a new issue #17879:
URL: https://github.com/apache/airflow/issues/17879
### Apache Airflow version
2.1.3 (latest released)
### Operating System
CentOS Stream release 8
### Versions of Apache Airflow Providers
None of them are relevant
### Deployment
Virtualenv installation
### Deployment details
mkdir /srv/airflow
cd /srv/airflow
virtualenv venv
source venv/bin/activate
pip install apache-airflow==2.1.3
AIRFLOW_HOME and AIRFLOW_CONFIG is specified via environment variables in
/etc/sysconfig/airflow, which is in turn used as EnvironmentFile in systemd
service files.
systemctl start airflow-{scheduler,webserver,kerberos}
Python version: 3.9.2
LocalExecutors are used
### What happened
On the Web UI, I had cleared failed tasks, which have been cleared properly,
but the DagRun became black with a literal value of "DagRunState.QUEUED",
therefore it can't be scheduled again.
### What you expected to happen
DagRun state should be 'queued'.
### How to reproduce
Just clear any tasks on the Web UI. I wonder how could it be that nobody
noticed this issue.
### Anything else
Here's a patch to fix it. Maybe the __str__ method should be different, or
the database/persistence layer should handle this, but for now, this solves the
problem.
```patch
--- airflow/models/dag.py.orig 2021-08-28 09:48:05.465542450 +0200
+++ airflow/models/dag.py 2021-08-28 09:47:34.272639960 +0200
@@ -1153,7 +1153,7 @@
confirm_prompt=False,
include_subdags=True,
include_parentdag=True,
- dag_run_state: DagRunState = DagRunState.QUEUED,
+ dag_run_state: DagRunState = DagRunState.QUEUED.value,
dry_run=False,
session=None,
get_tis=False,
@@ -1369,7 +1369,7 @@
confirm_prompt=False,
include_subdags=True,
include_parentdag=False,
- dag_run_state=DagRunState.QUEUED,
+ dag_run_state=DagRunState.QUEUED.value,
dry_run=False,
):
```
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]