You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "deepujain (via GitHub)" <gi...@apache.org> on 2026/09/20 06:38:32 UTC
[PR] Clear error when branch operators lack logical date and dag run [airflow]
deepujain opened a new pull request, #73396:
URL: https://github.com/apache/airflow/pull/73396
**Title:** Clear error when branch operators lack logical date and dag run
When `use_task_logical_date=True`, `BranchDayOfWeekOperator` and
`BranchDateTimeOperator` crashed with `AttributeError: 'NoneType' object
has no attribute 'run_after'` whenever the task context contained neither
`logical_date` nor a `dag_run`. This raises a `ValueError` with an
actionable message instead, mirroring the existing behavior of
`DayOfWeekSensor`:
> Either `logical_date` or `run_after` should be provided in the task context when `use_task_logical_date` is True
Fixes #72031
**Testing done**
- Added `test_choose_branch_should_raise_when_neither_logical_date_nor_run_after`
to `test_weekday.py` and `test_datetime.py`. Verified both fail on the
old code and pass with the fix.
- Full operator test files pass (58 passed):
`providers/standard/tests/unit/standard/operators/test_weekday.py` and
`test_datetime.py`.
- `ruff format` and `ruff check` clean on all touched files.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Muse Spark (Meta) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-6057442606
Ready for review at `4def4ad`, fixing #72031.
CI are green on this head and no review threads are open.
Not passed yet:
- Commit signatures: 1 of 2 commits are not verified.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain closed pull request #73396: Clear error when branch operators lack logical date and dag run
URL: https://github.com/apache/airflow/pull/73396
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-6306778639
Thanks for maintaining this project. I've kept this PR rebased and up to date, but it hasn't found a reviewer yet, so I'm closing it to keep your queue tidy. Happy to reopen and rebase anytime if it's still useful.
Effort: open since Sep 20, 2026, rebased 2 times, 5 updates posted, 2 commits, +68 −8 across 4 files, checks green on the latest commit, fixes #72031.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-5779933896
Rebased the branch-operator error handling onto current main. The weekday and datetime operator test files pass in Breeze; Ruff lint and formatting checks pass. CI is running again on the rebased head.
---
Drafted-by: OpenAI Codex (no human review before posting)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-5789151219
Rebased the branch-operator fix onto main at b6538c32. Both affected operator test files pass in Breeze (58 tests), and Ruff lint and formatting checks pass. Fresh hosted CI is starting on the updated head.
---
Drafted-by: OpenAI Codex (no human review before posting)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-5789769728
Refreshed CI once with an empty commit after the LatestBoto core job failed the triggerer logging test. The triggerer test and runner are unchanged by this PR, and the same-head Pendulum2 core job passed. Direct job rerun was unavailable to this contributor account; the source tree is unchanged.
---
Drafted-by: OpenAI Codex (no human review before posting)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clear error when branch operators lack logical date and dag run [airflow]
Posted by "deepujain (via GitHub)" <gi...@apache.org>.
deepujain commented on PR #73396:
URL: https://github.com/apache/airflow/pull/73396#issuecomment-6229886431
Checks are green on the latest commit. Could a maintainer review this when you have a chance?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org