You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2025/06/16 17:02:24 UTC

[PR] Delete import error when a dag bundle becomes inactive [airflow]

ephraimbuddy opened a new pull request, #51800:
URL: https://github.com/apache/airflow/pull/51800

   Currently, when a bundle is marked as inactive, its associated import errors continue to appear. To resolve this, we delete the import errors at the moment the bundle is deactivated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Delete import error when a dag bundle becomes inactive [airflow]

Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #51800:
URL: https://github.com/apache/airflow/pull/51800#discussion_r2150626607


##########
airflow-core/src/airflow/dag_processing/bundles/manager.py:
##########
@@ -136,6 +138,10 @@ def sync_bundles_to_db(self, *, session: Session = NEW_SESSION) -> None:
             bundle.active = False
             inactive_bundle_names.append(name)
             self.log.warning("DAG bundle %s is no longer found in config and has been disabled", name)
+            from airflow.models.errors import ParseImportError
+
+            session.execute(delete(ParseImportError).where(ParseImportError.bundle_name == name))
+            self.log.info("Deleted import errors for bundle %s which no longer exists", name)

Review Comment:
   ```suggestion
               self.log.info("Deleted import errors for bundle %s which is no longer configured", name)
   ```
   
   nit



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Delete import error when a dag bundle becomes inactive [airflow]

Posted by "ephraimbuddy (via GitHub)" <gi...@apache.org>.
ephraimbuddy merged PR #51800:
URL: https://github.com/apache/airflow/pull/51800


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org