Skip to content

fix: DateTimeSensorAsync.__init__ called - #70459

Closed
singlaamitesh wants to merge 1 commit into
apache:mainfrom
singlaamitesh:fix/70284-airflow-70284
Closed

singlaamitesh wants to merge 1 commit into
apache:mainfrom
singlaamitesh:fix/70284-airflow-70284

Conversation

@singlaamitesh

@singlaamitesh singlaamitesh commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #70284


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

DateTimeSensorAsync.init called timezone.parse(self.target_time) eagerly at Dag-parse time whenever start_from_trigger=True, crashing the whole Dag file if target_time was a Jinja template (the documented, normal usage of this templated field) since there's no rendering step before the trigger-kwargs are computed. Wrapped the parse in a try/except ParserError and raise a clear ValueError explaining that target_time must be a static datetime when start_from_trigger=True, leaving normal templated usage without start_from_trigger unaffected; added a changelog entry per the verification gate.

How this was tested: airflow dags test


Important

🛠️ Maintainer triage note for @singlaamitesh · by @potiuk · 2026-08-13 12:55 UTC

Helpful heads-up from the maintainers — please address before this PR can be reviewed:

  • ❌ Merge conflicts. See docs.
  • ❌ Pre-commit / static checks. See docs.

Full list of what we check: Pull Request quality criteria.

The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.

Automated triage — may be imperfect; a maintainer takes the next look.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Oct 28, 2026
@github-actions github-actions Bot closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:standard stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DateTimeSensorAsync crashes Dag parsing with templated target_time + start_from_trigger=True

2 participants