Skip to content

fix: handle timezone-aware --until filtering in fetch-workflow-logs#1237

Draft
github-actions[bot] wants to merge 2 commits into
mainfrom
fix-issue-1236-until-timezone-filter-c55568145a7f650e
Draft

fix: handle timezone-aware --until filtering in fetch-workflow-logs#1237
github-actions[bot] wants to merge 2 commits into
mainfrom
fix-issue-1236-until-timezone-filter-c55568145a7f650e

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This fixes incorrect workflow run filtering when scripts/fetch-workflow-logs.py is called with a timezone-aware --until value (for example 2025-01-01T00:00:00+01:00).

The previous implementation compared created_at and boundary values as raw strings, which can misorder valid ISO-8601 timestamps with different timezone forms (Z vs +HH:MM).

Changes

  • Parse run and boundary timestamps as datetimes and normalize comparisons in UTC.
  • Keep date-only --until behavior inclusive by preserving end-of-day normalization.
  • Treat empty timestamp strings as missing values to avoid boundary-check crashes.
  • Add regression tests for:
    • timezone-aware --until cutoff behavior
    • empty created_at handling with an --until filter

Validation

  • python -m pytest tests/test_fetch_workflow_logs.py -v
  • python -m pytest tests/ -q

Closes #1236.


What is this? | From workflow: Trigger Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

github-actions Bot and others added 2 commits June 8, 2026 12:58
Compare workflow run timestamps as parsed UTC datetimes instead of lexicographic strings so timezone offsets are handled correctly. Add regression test for an --until value with +01:00 offset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat empty timestamp strings as missing values to avoid crashing boundary checks, and add regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug-hunter] fetch-workflow-logs --until misfilters timezone-aware timestamps

0 participants