eliskovets opened a new issue, #36110: URL: https://github.com/apache/airflow/issues/36110
### Apache Airflow version 2.7.3 ### What happened After upgrade to 2.7.3 I noticed that webserver returns 500 for POST requests with a `note` field. After some investigation it seems that None in [user_id](https://github.com/apache/airflow/blob/main/airflow/models/dagrun.py#L1524) converted to str causing it: ``` [SQL: INSERT INTO dag_run_note (user_id, dag_run_id, content, created_at, updated_at) VALUES (%(user_id)s, %(dag_run_id)s, %(content)s, %(created_at)s, %(updated_at)s)] [parameters: {'user_id': 'None', 'dag_run_id': 2944, 'content': 'test', 'created_at': datetime.datetime(2023, 12, 7, 17, 42, 15, 390085, tzinfo=Timezone('UTC')), 'updated_at': datetime.datetime(2023, 12, 7, 17, 42, 15, 390096, tzinfo=Timezone('UTC'))}] rundag [07/Dec/2023:17:42:15 +0000] "POST /api/v1/dags/*/dagRuns HTTP/1.1" 500 1539 "-" "python-requests/2.31.0" ``` That's probably not an issue of Airflow itself, but SQLAlchemy 1.4. it's probably fixed in 2.0. ### What you think should happen instead Dagrun should be successfully registered by airflow and note should be saved into `dag_run_note` table. ### How to reproduce ```python import requests dag_run_url="https://airflow/api/v1/dags/test/dagRuns" r = requests.post( url=dag_run_url, json={"dag_run_id": "test_me", "note":"note", "conf": {}} ) assert r.status_code == 500 print(r.text) ``` ### Operating System Debian GNU/Linux 11 (bullseye) ### Versions of Apache Airflow Providers _No response_ ### Deployment Other Docker-based deployment ### Deployment details Docker image: apache/airflow:2.7.3-python3.9 DB: Postgresql ### Anything else _No response_ ### 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org