Skip to content

Raise exception if downgrade can't proceed due to no ab_user table - #50343

Merged
ephraimbuddy merged 3 commits into
apache:mainfrom
astronomer:raise-exception-vs-logging
May 8, 2025
Merged

ephraimbuddy merged 3 commits into
apache:mainfrom
astronomer:raise-exception-vs-logging

Conversation

@ephraimbuddy

Copy link
Copy Markdown
Contributor

We only log the error that the downgrade can't proceed if the ab_user table is not found, but we should raise an exception instead. Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell because it seems that's not happening, hence why downgrade is running correctly.

We only log the error that the downgrade can't proceed if the `ab_user`
table is not found, but we should raise an exception instead.
Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell
because it seems that's not happening, hence why downgrade is running correctly.
@ephraimbuddy
ephraimbuddy force-pushed the raise-exception-vs-logging branch from ae37785 to e8cc34b Compare May 8, 2025 13:21
@ephraimbuddy
ephraimbuddy merged commit 0f0fc02 into apache:main May 8, 2025
@ephraimbuddy
ephraimbuddy deleted the raise-exception-vs-logging branch May 8, 2025 14:07
github-actions Bot pushed a commit that referenced this pull request May 8, 2025
…user` table (#50343)

* Raise exception if downgrade can't proceed due to no `ab_user` table

We only log the error that the downgrade can't proceed if the `ab_user`
table is not found, but we should raise an exception instead.
Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell
because it seems that's not happening, hence why downgrade is running correctly.

* result can be none so check before accessing row_count

* dont raise in unittest mode
(cherry picked from commit 0f0fc02)

Co-authored-by: Ephraim Anierobi <[email protected]>
@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-0-test

Status Branch Result
✅ v3-0-test PR Link

@kaxil kaxil added this to the Airflow 3.0.2 milestone May 12, 2025
kaxil pushed a commit that referenced this pull request May 12, 2025
…user` table (#50343)

* Raise exception if downgrade can't proceed due to no `ab_user` table

We only log the error that the downgrade can't proceed if the `ab_user`
table is not found, but we should raise an exception instead.
Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell
because it seems that's not happening, hence why downgrade is running correctly.

* result can be none so check before accessing row_count

* dont raise in unittest mode
(cherry picked from commit 0f0fc02)

Co-authored-by: Ephraim Anierobi <[email protected]>
kaxil pushed a commit that referenced this pull request May 12, 2025
…user` table (#50343) (#50351)

* Raise exception if downgrade can't proceed due to no `ab_user` table

We only log the error that the downgrade can't proceed if the `ab_user`
table is not found, but we should raise an exception instead.
Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell
because it seems that's not happening, hence why downgrade is running correctly.

* result can be none so check before accessing row_count

* dont raise in unittest mode
(cherry picked from commit 0f0fc02)

Co-authored-by: Ephraim Anierobi <[email protected]>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
…user` table (#50343) (#50351)

* Raise exception if downgrade can't proceed due to no `ab_user` table

We only log the error that the downgrade can't proceed if the `ab_user`
table is not found, but we should raise an exception instead.
Currently, the CI migrations don't exit on error, which prevents the necessary tests from running.

Also updated the CI migration tests to export DB manager at the shell
because it seems that's not happening, hence why downgrade is running correctly.

* result can be none so check before accessing row_count

* dont raise in unittest mode
(cherry picked from commit 0f0fc02)

Co-authored-by: Ephraim Anierobi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants