Uh oh!
There was an error while loading. Please reload this page.
Update models to use SQLA2 annotations and synced model nullable constraints - #56330
Conversation
ae7a557 to
98e7933Comparevincbeck
commented
Oct 3, 2025
@pierrejeambrun@Dev-iL, I need your help here. In this PR I update all the models to use sqlalchemy 2 annotations. As part of this migration I also had to fix the different mismtaches between the database and models regarding the non-null constraints. But anyway, long story short is, I updated all the models to use sqlalchemy 2 annotations. All tests are passing but 3, only with python 3.13: See the full stack trace here. I do not quite understand the root cause. Surprisingly it fails only with patch APIs. If you have a bit of time, I'd appreciate if you can take a look and maybe you'll find out something I did not. |
98e7933 to
830e070Compare830e070 to
ba53b14CompareUh oh!
There was an error while loading. Please reload this page.
ba53b14 to
34829b9CompareUh oh!
There was an error while loading. Please reload this page.
potiuk
commented
Oct 15, 2025
I also added "all versions" to make sure that all python versions are tested. Closed/reopened to trigger it |
vincbeck
commented
Oct 15, 2025
Green 🟢 |
Uh oh!
There was an error while loading. Please reload this page.
…traints (apache#56330) * Update all models to use `sqlalchemy` 2 annotations (apache#55954) * Fix NULL constraints
…traints (apache#56330) * Update all models to use `sqlalchemy` 2 annotations (apache#55954) * Fix NULL constraints
PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior.
PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior.
PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior.
PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior.
PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior.
…63899) * Restore nullable ORM fields and drop unreleased corrective migration PR #56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR #62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR #56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior. * Return some not nullable fixes * fixup! Return some not nullable fixes
…pache#63899) * Restore nullable ORM fields and drop unreleased corrective migration PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior. * Return some not nullable fixes * fixup! Return some not nullable fixes
…pache#63899) * Restore nullable ORM fields and drop unreleased corrective migration PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior. * Return some not nullable fixes * fixup! Return some not nullable fixes
…pache#63899) * Restore nullable ORM fields and drop unreleased corrective migration PR apache#56330 mistakenly changed several ORM-backed columns from nullable to non-nullable. I later added a corrective migration in PR apache#62234 to backfill existing NULLs, but after revisiting the issue we found the migration was only compensating for the nullability mistake introduced by PR apache#56330 itself, which has not been released. Instead of shipping a large corrective migration for an unreleased regression, delete the migration file and restore the affected ORM fields to nullable so the models stay aligned with the actual schema and intended pre-release behavior. * Return some not nullable fixes * fixup! Return some not nullable fixes
This PR includes 2 changes (hence 2 commits):
sqlalchemy2 annotations #55954 before it got reverted in Revert "Update all models to usesqlalchemy2 annotations (#55954)" #56296nullableparameter with the annotation. That's the root cause why the CI started to fail after Update all models to usesqlalchemy2 annotations #55954 got merged.If you have already reviewed #55954, you need to review only the 2nd commit of this PR.
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.