dilnazanlid commented on code in PR #72474:
URL: https://github.com/apache/airflow/pull/72474#discussion_r4102985585
##########
airflow-core/src/airflow/models/errors.py:
##########
@@ -34,12 +35,17 @@ class ParseImportError(Base):
id: Mapped[int] = mapped_column(Integer, primary_key=True)
timestamp: Mapped[datetime | None] = mapped_column(UtcDateTime,
nullable=True)
filename: Mapped[str | None] = mapped_column(String(1024), nullable=True)
+ source_reference: Mapped[str | None] = mapped_column(String(1024),
nullable=True)
Review Comment:
changed
##########
airflow-core/src/airflow/api/common/delete_dag.py:
##########
@@ -82,7 +82,10 @@ def delete_dag(dag_id: str, keep_records_in_log: bool =
True, *, session: Sessio
# This handles the case when the dag_id is changed in the file
session.execute(
delete(ParseImportError).where(
- ParseImportError.filename == dag.relative_fileloc,
+ or_(
+ ParseImportError.source_reference == dag.relative_fileloc,
+ ParseImportError.filename == dag.fileloc,
+ ),
Review Comment:
addressed, 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]