Update models to use SQLA2 annotations and synced model nullable constraints#56330
Merged
potiuk merged 2 commits intoapache:mainfrom Oct 15, 2025
Merged
Update models to use SQLA2 annotations and synced model nullable constraints#56330potiuk merged 2 commits intoapache:mainfrom
potiuk merged 2 commits intoapache:mainfrom
Conversation
ae7a557 to
98e7933
Compare
Contributor
Author
|
@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
830e070
Compare
830e070 to
ba53b14
Compare
ba53b14 to
34829b9
Compare
potiuk
reviewed
Oct 15, 2025
potiuk
approved these changes
Oct 15, 2025
Member
|
I also added "all versions" to make sure that all python versions are tested. Closed/reopened to trigger it |
Contributor
Author
|
Green 🟢 |
snreddygopu
pushed a commit
to Teradata/airflow
that referenced
this pull request
Oct 16, 2025
…traints (apache#56330) * Update all models to use `sqlalchemy` 2 annotations (apache#55954) * Fix NULL constraints
TyrellHaywood
pushed a commit
to TyrellHaywood/airflow
that referenced
this pull request
Oct 22, 2025
…traints (apache#56330) * Update all models to use `sqlalchemy` 2 annotations (apache#55954) * Fix NULL constraints
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 18, 2026
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.
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 18, 2026
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.
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 19, 2026
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.
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 19, 2026
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.
ephraimbuddy
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 19, 2026
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.
ephraimbuddy
added a commit
that referenced
this pull request
Mar 19, 2026
…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
fat-catTW
pushed a commit
to fat-catTW/airflow
that referenced
this pull request
Mar 22, 2026
…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
Suraj-kumar00
pushed a commit
to Suraj-kumar00/airflow
that referenced
this pull request
Apr 7, 2026
…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
abhijeets25012-tech
pushed a commit
to abhijeets25012-tech/airflow
that referenced
this pull request
Apr 9, 2026
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.