Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Jun 6, 2025

This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field doesn't get cleared after migration. The processor manager's clear_orphaned_import_errors method filters by bundle_name and that makes the import errors with null bundle_name not to be included in the method's result

Tested this manually

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a utility function to clean up old import errors from the ParseImportError table (specifically, entries lacking a bundle_name) after the DB migration, addressing a bug where such errors would not be cleared by existing logic.

  • Added delete_import_errors function in db.py
  • Updated the upgradedb workflow to invoke the cleanup function

@ephraimbuddy ephraimbuddy force-pushed the delete-import-errors-after-upgrade branch 2 times, most recently from 68a035d to 5b8b026 Compare June 6, 2025 18:25
@ephraimbuddy ephraimbuddy changed the title Clean up old import errors without bundle_name after DB migration Clean up import error records during DB migration Jun 6, 2025
This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field
doesn't get cleared after migration. The processor manager's `clear_orphaned_import_errors` method
filters by bundle_name and that makes the import errors with null bundle_name not to be included
in the method's result
@ephraimbuddy ephraimbuddy force-pushed the delete-import-errors-after-upgrade branch from 5b8b026 to 0fd1ce8 Compare June 7, 2025 07:00
@ephraimbuddy ephraimbuddy merged commit 7ed78dc into apache:main Jun 7, 2025
52 checks passed
@ephraimbuddy ephraimbuddy deleted the delete-import-errors-after-upgrade branch June 7, 2025 10:07
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
* Clean up import error records during DB migration

This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field
doesn't get cleared after migration. The processor manager's `clear_orphaned_import_errors` method
filters by bundle_name and that makes the import errors with null bundle_name not to be included
in the method's result

* fixup! Clean up import error records during DB migration
kevinhongzl pushed a commit to kevinhongzl/airflow that referenced this pull request Jun 7, 2025
* Clean up import error records during DB migration

This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field
doesn't get cleared after migration. The processor manager's `clear_orphaned_import_errors` method
filters by bundle_name and that makes the import errors with null bundle_name not to be included
in the method's result

* fixup! Clean up import error records during DB migration
ephraimbuddy added a commit to astronomer/airflow that referenced this pull request Jun 19, 2025
* Clean up import error records during DB migration

This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field
doesn't get cleared after migration. The processor manager's `clear_orphaned_import_errors` method
filters by bundle_name and that makes the import errors with null bundle_name not to be included
in the method's result

* fixup! Clean up import error records during DB migration

(cherry picked from commit 7ed78dc)
potiuk pushed a commit that referenced this pull request Jun 21, 2025
* Clean up import error records during DB migration (#51472)

* Clean up import error records during DB migration

This PR adds an SQL to clean up import errors during add bundle migration

The bug we found was that import errors with null bundle_name field
doesn't get cleared after migration. The processor manager's `clear_orphaned_import_errors` method
filters by bundle_name and that makes the import errors with null bundle_name not to be included
in the method's result

* fixup! Clean up import error records during DB migration

(cherry picked from commit 7ed78dc)

* Move import error deletion migration to separate file (#51565)

(cherry picked from commit 95a1e77)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants