Skip to content

AIENG-379: stop resolving timezones client-side; send raw suite timestamp + agent offset - #1410

Closed
ItIsUday wants to merge 1 commit into
mainfrom
AIENG-379-elapsed-build-option2
Closed

ItIsUday wants to merge 1 commit into
mainfrom
AIENG-379-elapsed-build-option2

Conversation

@ItIsUday

Copy link
Copy Markdown
Contributor

Why

The CLI resolves JUnit <testsuite timestamp> timezones itself with a blanket tzlocal(). That's correct for offset-aware and genuinely-local frameworks, but wrong for "looks-naive-but-UTC" runners (jest, cypress), corrupting test_cases.created_at on non-UTC agents and breaking cross-machine elapsed-time aggregation (AIENG-379, Option 2). Mirroring the framework-timezone policy in every client is also unmaintainable.

What

Move timezone resolution to the server (single source of truth). The CLI now:

  • sends the raw <testsuite timestamp> string as suiteTimestamp (unresolved);
  • sends the agent's UTC offset once per record tests request (agentUtcOffset) — only the client knows it, and the server needs it to resolve naive local timestamps.

_timestamp()/tzlocal() and the framework-TZ imports are removed — the CLI holds zero timezone knowledge. Requires the paired mothership change that accepts these fields and resolves them.

Tests

Full suite green except one pre-existing, unrelated subset failure (test_maven.test_scan_test_compile_lst, fails on clean main). Updated golden payloads to the raw-passthrough format; comparator now excludes the machine-dependent agentUtcOffset.

…g timezones client-side

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ono-max

ono-max commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

@ItIsUday

A lot of customers are still on CLI v1, so can we apply this change to v1 as well? Here is the process to apply the change to both versions: https://cloudbees.atlassian.net/wiki/x/u4FcUAE

@ItIsUday

Copy link
Copy Markdown
Contributor Author

Superseded: per the v1→main process this fix must land on v1 first (#1413) and reach main via forward-port (git merge v1), not as a direct main PR. Closing; the main side will be the forward-port of #1413.

@ItIsUday ItIsUday closed this Oct 26, 2026
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.

2 participants