The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/dag-version-checker-nested-with-exits-dag-context has failed.
Run started by GitHub user kalluripradeep (triggered by kalluripradeep).

Head commit for run:
2247e268692faa7d49f575ed2128d90af61a830b / Pradeep Kalluri 
<[email protected]>
fix: nested non-DAG with-statement prematurely exits DAG context in version 
inflation checker

AirflowRuntimeVaryingValueChecker.visit_With() called exit_dag_context()
unconditionally at the end of every with-statement. When a non-DAG
with-statement (e.g. `with open(...) as f`) was nested inside a DAG
with-block, it would set is_in_dag_context=False, causing any tasks
constructed AFTER the nested with — but still inside the DAG block —
to be invisible to the checker. Those tasks were never flagged for
runtime-varying values even when they used datetime.now(), random(), etc.

Fix: guard the exit_dag_context() call with `if is_with_dag_context`
so only the with-statement that actually entered the DAG context exits it.

Regression tests added for:
- nested non-DAG with followed by a task (primary case)
- multiple successive nested non-DAG withs
- task constructed inside a nested non-DAG with
- task outside the DAG block not over-flagged after the fix

Report URL: https://github.com/apache/airflow/actions/runs/27900646812

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to