samraj2k commented on code in PR #74915:
URL: https://github.com/apache/airflow/pull/74915#discussion_r4507736120
##########
airflow-core/src/airflow/dag_processing/bundles/manager.py:
##########
@@ -464,11 +607,12 @@ def _extract_and_sign_template(bundle_name: str) ->
tuple[str | None, dict]:
from airflow.models.errors import ParseImportError
for name, bundle in stored.items():
- bundle.active = False
- bundle.teams = []
- self.log.warning("DAG bundle %s is no longer found in config and
has been disabled", name)
+ if bundle.active is not False:
+ bundle.active = False
+ bundle.teams = []
+ self.log.warning("DAG bundle %s is no longer found in config
and has been disabled", name)
+
session.execute(delete(ParseImportError).where(ParseImportError.bundle_name ==
name))
Review Comment:
Thanks for the comment.
I have resolved this, though i have gone with your first suggestion. The
periodic check will delete import errors only for the bundles which it marks
inactive.
One thing to note is, uf another Dag processor has not seen the removal yet,
and it writes an import error for that bundle after the bundle is marked
inactive, that error will stay until an unfiltered Dag processor restarts. I
have documented this as well. This does not cause regression to current users
at all, but for keeping the PR scoped i have done this, else import error
convergence was making the PR more complex. Thanks!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]