potiuk opened a new issue #17226:
URL: https://github.com/apache/airflow/issues/17226
The TestSchedulerJob.test_verify_integrity_if_dag_changed fails occasionally
and I mark it as Quarantined
```
____________ TestSchedulerJob.test_verify_integrity_if_dag_changed
_____________
self = <tests.jobs.test_scheduler_job.TestSchedulerJob object at
0x7f6e63a1cee0>
def test_verify_integrity_if_dag_changed(self):
# CleanUp
with create_session() as session:
session.query(SerializedDagModel).filter(
SerializedDagModel.dag_id ==
'test_verify_integrity_if_dag_changed'
).delete(synchronize_session=False)
dag = DAG(dag_id='test_verify_integrity_if_dag_changed',
start_date=DEFAULT_DATE)
BashOperator(task_id='dummy', dag=dag, owner='airflow',
bash_command='echo hi')
self.scheduler_job = SchedulerJob(subdir=os.devnull)
self.scheduler_job.dagbag.bag_dag(dag, root_dag=dag)
self.scheduler_job.dagbag.sync_to_db()
session = settings.Session()
orm_dag = session.query(DagModel).get(dag.dag_id)
assert orm_dag is not None
self.scheduler_job = SchedulerJob(subdir=os.devnull)
self.scheduler_job.processor_agent = mock.MagicMock()
> dag =
self.scheduler_job.dagbag.get_dag('test_verify_integrity_if_dag_changed',
session=session)
tests/jobs/test_scheduler_job.py:2418:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _
airflow/utils/session.py:67: in wrapper
return func(*args, **kwargs)
airflow/models/dagbag.py:186: in get_dag
self._add_dag_from_db(dag_id=dag_id, session=session)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _
self = <airflow.models.dagbag.DagBag object at 0x7f6e82670a30>
dag_id = 'test_verify_integrity_if_dag_changed'
session = <sqlalchemy.orm.session.Session object at 0x7f6e63aca0d0>
def _add_dag_from_db(self, dag_id: str, session: Session):
"""Add DAG to DagBag from DB"""
from airflow.models.serialized_dag import SerializedDagModel
row = SerializedDagModel.get(dag_id, session)
if not row:
> raise SerializedDagNotFound(f"DAG '{dag_id}' not found in
serialized_dag table")
E airflow.exceptions.SerializedDagNotFound: DAG
'test_verify_integrity_if_dag_changed' not found in serialized_dag table
```
--
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]