Skip to content

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

Draft
github-actions[bot] wants to merge 3 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 3 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>
@v1v

v1v commented Aug 27, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. The conflict in scripts/fetch-workflow-logs.py was in list_workflow_runs — I merged both sides by keeping the datetime-based UTC comparisons from this branch while adopting the correct early-exit order (since-boundary check before conclusion filter) from main. All 6 tests pass.

Copilot finished work on behalf of v1v August 27, 2026 09:17
Copilot AI requested a review from v1v August 27, 2026 09:17
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

2 participants