viragtripathi opened a new pull request, #69640:
URL: https://github.com/apache/airflow/pull/69640
Airflow 3.3.0 introduced build_upsert_stmt (utils/sqlalchemy.py) for atomic
INSERT ... ON CONFLICT writes, used by the execution API when tasks start
(rendered task instance fields, variables, metastore state). The helper
dispatches on the dialect name and raises ValueError for anything outside
postgresql/mysql/sqlite, so on a cockroachdb connection every task start fails
with a 500 from the execution API:
`ValueError: Unsupported database dialect 'cockroachdb' for upsert.`
The cockroachdb SQLAlchemy dialect subclasses the postgresql one and
supports the same INSERT ... ON CONFLICT DO UPDATE construct, so this adds it
to the postgresql arm of the dispatch. Other dialects are unaffected. Includes
unit tests for the postgres-family dispatch and the unsupported-dialect error.
Verified end to end against CockroachDB v26.3: without this change, task
runs fail at startup on Airflow 3.3.0; with it, a two-scheduler stress run
completes normally.
Related PRs from the same devlist proposal: #69260, #69555, #69556, #69557.
Discussed on the devlist:
https://lists.apache.org/thread/t6jo4th3sn23jmr34m6gcxzw4k8mo4pc
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes - Claude Code
Generated-by: Claude Code following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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]