The GitHub Actions job "Tests" on airflow.git/iss has failed. Run started by GitHub user SakshamSinghal20 (triggered by SakshamSinghal20).
Head commit for run: c6108f887a918e0f79b6c9b17fbf6afb3124d2a4 / username <[email protected]> Fix nullable dag_version for scheduler callbacks (AIP-66) Replace silent skip-on-None guards with a proper fallback strategy for all four TaskCallbackRequest / EmailRequest creation sites in scheduler_job_runner.py. Problem: When ti.dag_version is None (tasks migrated from Airflow 2 to 3), the scheduler crashed with AttributeError when accessing ti.dag_version.bundle_name / bundle_version, and the previous fix silently suppressed callbacks entirely for legacy tasks. Fix: Use an inline ternary fallback, mirroring the existing pattern in dagrun.py (DagCallbackRequest): bundle_name <- dag_version.bundle_name OR dag_model.bundle_name bundle_version <- dag_version.bundle_version OR dag_run.bundle_version DagModel.bundle_name is NOT NULL so the fallback is always safe. DagRun.bundle_version is nullable (str | None), matching the type expected by BaseCallbackRequest. Affected sites: 1. process_executor_events - TaskCallbackRequest (externally killed) 2. process_executor_events - EmailRequest (email on failure/retry) 3. _maybe_requeue_stuck_ti - TaskCallbackRequest (stuck-in-queued) 4. _purge_task_instances_without_heartbeats - TaskCallbackRequest Tests: Added TestSchedulerCallbackBundleInfoDagVersionNullable to test_scheduler_job.py with parameterized cases covering: - dag_version present -> bundle info from dag_version - dag_version None -> bundle info from dag_model / dag_run - no AttributeError crash in either case - correct precedence of dag_version over fallback values Report URL: https://github.com/apache/airflow/actions/runs/22319527380 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
