Skip to content

Conversation

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Jun 9, 2025

Why

The original syntax will ignore the whole batch if a ValueError is encountered. The migration process will work, but wrongly.
In this example, dag_run.created_at will not be created for SQLite, which will cause an error when running Airflow.
This was wrongly fixed in #51336

What

Only ignore ValueError when interacting with constraints in SQLite


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@Lee-W Lee-W requested a review from ephraimbuddy as a code owner June 9, 2025 11:20
@boring-cyborg boring-cyborg bot added the area:db-migrations PRs with DB migration label Jun 9, 2025
@Lee-W Lee-W force-pushed the fix-3-0-0-migration branch from 6251dd7 to f25b5d5 Compare June 9, 2025 11:20
@Lee-W Lee-W changed the title fix(migrations): only ignore value error when interacting with constraints in sqlite fix(migrations): only ignore ValueError when interacting with constraints in sqlite Jun 9, 2025
@Lee-W Lee-W added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jun 9, 2025
@Lee-W Lee-W force-pushed the fix-3-0-0-migration branch from f25b5d5 to dd97079 Compare June 9, 2025 13:35
…aints in sqlite

The original syntax will ignore the whole batch if a ValueError is encountered. The migration process will work, but wrongly.
In this example, dag_run.created_at will not be created for SQLite, which will cause an error when running Airflow.
@Lee-W Lee-W force-pushed the fix-3-0-0-migration branch from dd97079 to 3e99069 Compare June 11, 2025 02:51
@Lee-W Lee-W merged commit c74ecd4 into apache:main Jun 11, 2025
51 checks passed
@Lee-W Lee-W deleted the fix-3-0-0-migration branch June 11, 2025 08:06
@github-actions
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker c74ecd4 v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

@Lee-W Lee-W removed the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jun 11, 2025
Lee-W added a commit to astronomer/airflow that referenced this pull request Jun 12, 2025
… with constraints in sqlite (apache#51529)

The original syntax will ignore the whole batch if a ValueError is encountered. The migration process will work, but wrongly.
In this example, dag_run.created_at will not be created for SQLite, which will cause an error when running Airflow.
(cherry picked from commit c74ecd4)

Co-authored-by: Wei Lee <weilee.rx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:db-migrations PRs with DB migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants