The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-mysql-downgrade-deadline-interval-json has failed.
Run started by GitHub user vatsrahul1001 (triggered by vatsrahul1001).

Head commit for run:
d7da3dfd10249e5ae6bbcf31ef45dfbcf455b861 / Rahul Vats <[email protected]>
Fix MySQL downgrade from 3.3.0 on deadline_alert.interval JSON conversion

The 3.3.0 migration 0117 (8812eb67b63c) converts deadline_alert.interval
to JSON on upgrade and back to FLOAT on downgrade. On MySQL the downgrade
unwrapped the value with CAST(... AS DOUBLE) inside an UPDATE that runs
while the column is still typed JSON. Writing a non-JSON DOUBLE into a JSON
column makes MySQL reject the whole statement with ER_INVALID_JSON_TEXT
(3140), so `airflow db downgrade` fails for any deployment that has at
least one deadline_alert row.

Keep the unwrapped value as a JSON number in the UPDATE and let the
subsequent column retype to FLOAT perform the cast, mirroring how the
PostgreSQL branch defers the cast to its ALTER ... USING clause. The
offline-mode MySQL instructions had the same defect and are corrected too.

Adds a MySQL-backend regression test that seeds rows and runs the
migration's conversion SQL; the existing migration stairway missed this
because it runs against an empty schema (zero rows updated never trips
MySQL's per-row JSON validation).

Report URL: https://github.com/apache/airflow/actions/runs/27327066236

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to