Skip to content

fix: Update tzdb to 2026e for the Canadian DST changes - #12466

Merged
waralexrom merged 6 commits into
masterfrom
deps-bump-tzdb
Oct 28, 2026
Merged

waralexrom merged 6 commits into
masterfrom
deps-bump-tzdb

Conversation

@waralexrom

Copy link
Copy Markdown
Member

Summary

tzdb 2026b–2026e cancel the November 1, 2026 fall-back for British Columbia, Alberta, Inuvik (NWT) and Manitoba. The bundled tz databases (moment-timezone 0.5.48 = 2025b, chrono-tz up to 0.10.4 = 2025b) predate that, so every conversion in America/Vancouver, America/Edmonton, America/Inuvik and America/Winnipeg after 2026-11-01 02:00 is an hour off. For example, the bounds of a dateRange on 2026-11-02 in Vancouver were 08:00Z instead of 07:00Z.

Fixes #12431

Changes

  • JS: moment-timezone ^0.5.48 → ^0.6.5 (tzdb 2026e) in schema-compiler, api-gateway and backend-shared.
  • Rust: no chrono-tz release ships 2026 data, and upstream has deprecated the crate, so every workspace (rust/cube, rust/cubestore, rust/cubesql, cubejs-backend-native) patches it via [patch.crates-io] with the new cube-js/chrono-tz fork:
    • cube-0.10.4 (2026e data, Update data to 2026e chrono-tz#1) for Tesseract, Cube Store (incl. arrow 54) and pg-srv; their direct dependencies are bumped to 0.10.4 so one patch covers them.
    • cube-0.6.3 (2026e data, Update data to 2026e chrono-tz#2) for the arrow 13 fork under CubeSQL.
    • Drops CubeSQL's unused direct chrono-tz = "0.6" dependency.
  • Regression tests that fail on the stale data: date range bounds in schema-compiler, QueryDateTime in Tesseract, CONVERT_TZ_KSQL in Cube Store.

Testing

  • The new tests fail on the old data and pass with 2026e.
  • schema-compiler, api-gateway and backend-shared unit tests pass.
  • cubesqlplanner --lib (1743), pg-srv (35), CubeSQL timestamp/timezone tests, Cube Store streaming tests pass against the git fork; cargo tree confirms arrow 13 and arrow 54 resolve chrono-tz to the fork.

🤖 Generated with Claude Code

waralexrom and others added 4 commits October 26, 2026 21:33
tzdb 2026b-2026e cancel the 2026-11-01 fall-back for America/Vancouver,
Edmonton, Inuvik and Winnipeg. The bundled tz databases (moment-timezone,
chrono-tz) predate that, so these tests fail until the data is bumped:
date range bounds in schema-compiler, QueryDateTime in Tesseract and
CONVERT_TZ_KSQL in Cube Store.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tzdb 2026b-2026e cancel the November 1, 2026 fall-back for
America/Vancouver, Edmonton, Inuvik and Winnipeg. moment-timezone 0.5.48
ships 2025b, so date range bounds in these zones after that date were
one hour off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No chrono-tz release ships 2026 data, so every workspace patches it
with the cube-js/chrono-tz fork: branch cube-0.10.4 for direct and
arrow 54 users, cube-0.6.3 for the arrow 13 fork under CubeSQL.

Also drops CubeSQL's unused direct chrono-tz dependency.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@waralexrom
waralexrom requested review from a team as code owners October 28, 2026 12:54
@github-actions github-actions Bot added cube store Issues relating to Cube Store rust Pull requests that update Rust code javascript Pull requests that update Javascript code labels Oct 28, 2026
@claude

claude Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @waralexrom's task in 3m 12s —— View job


Changes requested — 1 medium (plausible), 1 low.

Review details

Findings

Severity Location Issue
Medium (plausible) packages/cubejs-backend-shared/package.json:50 The tree still contains moment-timezone 0.5.48 (tzdb 2025b), pulled in by snowflake-sdk and by post-installer's @cubejs-backend/shared@1.7.42. Both copies patch the same moment instance, so loading the Snowflake driver later can bring back the one-hour shift. Fix: add a resolutions entry in the root and cubejs-docker package.json.
Low rust/cube/Cargo.toml:14 (and the 3 other workspaces) [patch.crates-io] tracks a mutable branch on the fork. Pin it with rev.

Verified as fine

  • Every Cargo lockfile in the repo (rust/cube, rust/cubestore, rust/cubesql, cubejs-backend-native) now resolves chrono-tz only to the fork. The chrono-tz-06 renamed patch key correctly covers arrow 13's 0.6.x.
  • The JS regression test checks moment-timezone under both planners, because Tesseract computes date-range params through the JS inDbTimeZone (rust/cube/cubesqlplanner/cubesqlplanner/src/planner/sql_templates/plan.rs:111). The Rust QueryDateTime test covers chrono-tz directly. Each test includes a 2025 control case.
  • Removing CubeSQL's direct chrono-tz = "0.6" dependency is safe: no chrono_tz:: uses remain in rust/cubesql/cubesql.
  • Docs: none needed. This is a bug fix that makes behaviour match the documented timezone semantics.
  • Test comments are 1–2 lines, and each explains why the 2026 dates are significant.

Not done

  • I couldn't reproduce the medium finding: dependencies aren't installed and the sandbox blocks npm/web access. The inline comment includes a one-line node -e check that confirms or rules it out.
  • I didn't run the Rust or JS test suites. I relied on the results the author reported.

Review threads

No prior threads: the listing returned 0 of my own threads, so none were resolved or re-affirmed.

Comment thread rust/cube/Cargo.toml Resolved
snowflake-sdk still pulled moment-timezone 0.5.48. Loading it attaches
its own zone registry to the shared moment instance, so after the first
Snowflake query every moment.tz call ran on tzdb 2025b again.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.89%. Comparing base (f37f2d1) to head (a569c5d).
⚠️ Report is 25 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12466      +/-   ##
==========================================
+ Coverage   82.79%   82.89%   +0.10%     
==========================================
  Files         525      525              
  Lines      121596   122095     +499     
  Branches     5138     5143       +5     
==========================================
+ Hits       100672   101214     +542     
+ Misses      20155    20111      -44     
- Partials      769      770       +1     
Flag Coverage Δ
cube-backend 65.42% <ø> (+0.04%) ⬆️
cubesql 86.61% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @waralexrom's task in 2m 7s —— View job


LGTM — 0 issues. Both earlier threads are fixed and resolved.

Review details

What I checked

  • Issue coverage. The expected bounds in Stale bundled timezone data produces wrong Canadian date-range bounds after Nov 1, 2026 #12431 match the new it.each cases in packages/cubejs-schema-compiler/test/unit/base-query.test.ts:162. The control case uses Vancouver 2025.
    • The unit job in CI runs only with Tesseract on (push.yml:139).
    • With Tesseract on, filter bounds still go through DriverTools::in_db_time_zone, which is BaseQuery.inDbTimeZone and uses moment (filter_sql_context.rs:193).
    • So the test exercises the JS tzdb under both planners.
  • Rust coverage. Each Cargo workspace that pulls in chrono-tz now resolves it to the fork in its lockfile:
    • rust/cube, rust/cubestore, rust/cubesql and packages/cubejs-backend-native resolve 0.10.4 to eec5a8c.
    • rust/cubesql and backend-native also resolve arrow 13's 0.6.3 to ee0827f.
    • rust/cube-cli has no chrono-tz dependency.
    • Nothing in cubesql/src uses chrono_tz directly, so dropping the direct 0.6 dependency is safe.
    • No build uses --offline or cargo vendor that a git patch would break.
  • JS coverage. Every package that imports moment-timezone declares ^0.6.5: schema-compiler, backend-shared and api-gateway. yarn.lock dedupes everything to 0.6.5, including snowflake-sdk's ^0.5.15.
    • The root and docker resolutions don't reach npm consumers. That only affects snowflake-sdk's own copy of moment-timezone, not Cube's date bounds.
  • Expected values. I checked the offsets by hand: PDT −7, MDT −6 for Edmonton and Inuvik, CDT −5. The Cube Store CONVERT_TZ_KSQL case (12:00Z → 05:00 Vancouver) is also correct.
  • Docs. None needed. This is a tz data bump that brings behaviour in line with IANA, and it adds no user-facing options.
  • Not verified. I couldn't run gh pr checks or npm view moment-timezone@0.6.0 in this environment, so I didn't check CI status or 0.6.x breaking changes myself. I'm relying on the PR's statement that the unit suites pass.

Review threads

The listing returned 2 of my own threads. I resolved both and re-affirmed none:

  • PRRT_kwDOCOH19M6xIJ9s: the duplicate moment-timezone copies are now deduped via resolutions.
  • PRRT_kwDOCOH19M6xIKD6: the chrono-tz patches are now pinned by rev.

@waralexrom
waralexrom merged commit b837c02 into master Oct 28, 2026
199 of 201 checks passed
@waralexrom
waralexrom deleted the deps-bump-tzdb branch October 28, 2026 15:32
waralexrom added a commit that referenced this pull request Oct 29, 2026
… to v1.6)

tzdb 2026b-2026e cancel the November 1, 2026 fall-back for
America/Vancouver, Edmonton, Inuvik and Winnipeg. The bundled tz databases
predated that, so every conversion in these zones after 2026-11-01 was an
hour off (e.g. date range bounds in both planners).

- moment-timezone 0.5.48 -> 0.6.5 (tzdb 2026e), deduped through
  `resolutions` so snowflake-sdk no longer loads a 0.5.x copy that takes
  over `moment.tz` on the shared moment instance.
- chrono-tz has no release with 2026 data, so every Rust workspace patches
  it with the cube-js/chrono-tz fork pinned by rev: 0.10.4 for Tesseract,
  Cube Store and pg-srv, 0.6.3 for the arrow 13 fork under CubeSQL.
- Regression tests for date range bounds, Tesseract QueryDateTime and
  Cube Store CONVERT_TZ_KSQL.

Fixes #12431

(cherry picked from commit b837c02)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
waralexrom added a commit that referenced this pull request Oct 29, 2026
… to v1.6) (#12471)

## Summary

Backport of #12466 to `lts/v1.6`. tzdb 2026b–2026e cancel the November
1, 2026 fall-back for British Columbia, Alberta, Inuvik (NWT) and
Manitoba; with the bundled 2025b data every conversion in
`America/Vancouver`, `America/Edmonton`, `America/Inuvik` and
`America/Winnipeg` after 2026-11-01 is an hour off.

Fixes #12431 for 1.6.

## Changes

Same as #12466:
- `moment-timezone` → `^0.6.5` in schema-compiler, api-gateway and
backend-shared, plus a `resolutions` entry in the root and
`cubejs-docker` `package.json` so `snowflake-sdk` no longer loads a
0.5.x copy that replaces `moment.tz` on the shared moment instance.
- `[patch.crates-io]` with the
[cube-js/chrono-tz](https://github.com/cube-js/chrono-tz) fork pinned by
rev in every Rust workspace: 0.10.4 for Tesseract, Cube Store (its
direct `0.8.2` is bumped to `0.10.4`) and pg-srv, 0.6.3 for the arrow 13
fork under CubeSQL. Drops CubeSQL's unused direct `chrono-tz`
dependency.
- Regression tests for date range bounds, Tesseract `QueryDateTime` and
Cube Store `CONVERT_TZ_KSQL`.

Differences from master: the schema-compiler test uses the 1.6 test
helpers (`compilers.compiler.compile()`, `new PostgresQuery(...)`);
lockfiles are regenerated from `lts/v1.6`.

## Testing

- `yarn tsc` is clean; `base-query.test` (121), backend-shared
`time`/`timezone`, api-gateway date tests pass.
- After loading `snowflake-sdk`, `moment.tz.dataVersion` stays `2026e`.
- cubesqlplanner `--lib` (1075), pg-srv (35), CubeSQL timestamp/timezone
tests, Cube Store streaming tests (18) pass; `cubejs-backend-native`
builds.
- The `node:22.23.4-bookworm-slim` base image already ships ICU tzdb
2026e.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ovr pushed a commit that referenced this pull request Nov 9, 2026
… to v1.4)

Backport of #12466 / #12471 to lts/v1.4. tzdb 2026b–2026e cancel the
November 1, 2026 fall-back for British Columbia, Alberta, Inuvik (NWT)
and Manitoba; with the bundled 2025b data every conversion in
America/Vancouver, America/Edmonton, America/Inuvik and America/Winnipeg
after 2026-11-01 is an hour off.

Fixes #12431 for 1.4.

- moment-timezone → ^0.6.5 (resolves to 0.6.6, tzdb 2026f) in
  schema-compiler, api-gateway and backend-shared, plus a `resolutions`
  entry in the root and cubejs-docker package.json so snowflake-sdk
  does not load a 0.5.x copy that replaces moment.tz on the shared
  moment instance.
- `[patch.crates-io]` with the cube-js/chrono-tz fork (0.10.4) pinned by
  rev in every Rust workspace; Tesseract, Cube Store and pg-srv move to
  chrono-tz 0.10.4. Drops CubeSQL's unused direct `chrono-tz` 0.6
  dependency.
- Regression tests for date range bounds, Tesseract QueryDateTime and
  Cube Store CONVERT_TZ_KSQL.

Differences from lts/v1.6: no `rust/cube` workspace here, so the patch
goes into `rust/cubesqlplanner/Cargo.toml`; the arrow fork on this
branch does not depend on chrono-tz, so the 0.6.3 fork patch is not
needed; Cube Store's chrono moves 0.4.20 → 0.4.45 (required by
chrono-tz 0.10); the unrelated Cube Store test-fixture changes
(local CSV server) are not included. Lockfiles regenerated from
lts/v1.4.

(cherry picked from commit 26b4813)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cube store Issues relating to Cube Store javascript Pull requests that update Javascript code rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale bundled timezone data produces wrong Canadian date-range bounds after Nov 1, 2026

2 participants

⌂ Proxy