The GitHub Actions job "Tests (AMD)" on airflow.git/fix/dagproc-duplicate-key-race has succeeded. Run started by GitHub user 1fanwang (triggered by 1fanwang).
Head commit for run: 48f51b621da1490fb97b64ee71d36b16c3745e70 / 1fanwang <[email protected]> Treat duplicate-key Dag-write race as no-op, not import error When multiple Dag processors race to INSERT the same brand-new Dag row, the loser's transaction raises ``IntegrityError`` (1062 / UNIQUE constraint failed / unique violation). The current handler in ``_serialize_dag_capturing_errors`` records that as an import error and leaves the SQLAlchemy session in a state that causes ``PendingRollbackError`` on the next per-Dag write in the same parsing cycle. The user sees a healthy Dag file flagged as broken in the UI even though the peer processor's INSERT succeeded. Detect unique-constraint violations across SQLite, MySQL, and Postgres using the same message-prefix approach as ``_UniqueConstraintErrorHandler`` in the public API. On a hit, roll the session back, log at INFO, and return an empty import-error list — the row exists, so the write is a no-op and there's no value in retrying. Other IntegrityErrors (e.g. NOT-NULL violations from genuinely malformed Dags) still flow into the generic exception arm and surface as import errors. Closes: #66786 Signed-off-by: 1fanwang <[email protected]> Report URL: https://github.com/apache/airflow/actions/runs/25745171664 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
