jsnb-devoted opened a new issue, #30630: URL: https://github.com/apache/airflow/issues/30630
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
In the UI when I want to rerun a task I'll clear the task and downstream
dependencies and let the scheduler pick it up. Now when I do that I get a 500
error in the UI. An excerpt from the web server log looks like it is an issue
with the value coming from the metadb:
```
│ File "/usr/local/lib/python3.10/site-packages/airflow/utils/session.py",
line 72, in wrapper
│
│ return func(*args, **kwargs)
│
│ File "/usr/local/lib/python3.10/site-packages/airflow/models/dag.py",
line 2051, in clear
│
│ clear_task_instances(
│
│ File
"/usr/local/lib/python3.10/site-packages/airflow/models/taskinstance.py", line
193, in clear_task_instances
│
│ ti.max_tries = ti.try_number + task_retries - 1
│
│ TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
```
I get a similar 500 when I try to run the task with "Ignore deps" set and
the web server log looks like:
```
│ util.raise_(
│
│ File
"/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211,
in raise_
│
│ raise exception
│
│ File
"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900,
in _execute_context
│
│ self.dialect.do_execute(
│
│ File
"/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line
736, in do_execute
│
│ cursor.execute(statement, parameters)
│
│ sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation)
invalid input syntax for type integer: "manual"
│
│ LINE 3: ...ate = 'queued' AND task_instance.queued_by_job_id = 'manual'
```

These tasks happen to be part of task groups. I can't find any regular ones
to test on at the moment.
### What you think should happen instead
I could go dig in to the metadb and see what those values are and try to
surmise what I would expect them to be but functionality wise I just expect to
be able to clear a task from the UI so that I can rerun it.
### How to reproduce
Clear task from the UI or Run the task with "Ignore Task State"
### Operating System
Ubuntu
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon==7.2.1
apache-airflow-providers-cncf-kubernetes==5.2.1
apache-airflow-providers-common-sql==1.3.3
apache-airflow-providers-datadog==3.1.0
apache-airflow-providers-facebook==3.1.0
apache-airflow-providers-ftp==3.3.1
apache-airflow-providers-http==4.2.0
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-jdbc==3.3.0
apache-airflow-providers-postgres==5.4.0
apache-airflow-providers-snowflake==4.0.4
apache-airflow-providers-sqlite==3.3.1
apache-airflow-providers-ssh==3.4.0
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
k8s on EKS with k8s executor, postgres metadb
### Anything else
I looked in the most recent CHANGELOG entries and I tried to find if someone
had raised this already. Apologies if it has already been fixed.
### Are you willing to submit PR?
- [X] 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]
