icu: graceful fallback when unavailable + version-agnostic multi-version staging (consolidates #136/#141)#184
Open
estebanzimanyi wants to merge 1 commit into
Conversation
Make the single-timezone model resilient and multi-version-ready, consolidating the ICU test-staging work of MobilityDB#136 and MobilityDB#141. LoadInternal auto-loads ICU and sets the session TimeZone to Europe/Brussels. When ICU is unavailable (no on-disk copy AND no network egress: CI docker images, edge/musl deployments, offline installs) the TimeZone set threw out of LoadInternal and failed the whole extension load. Wrap the ICU autoload + TimeZone set so it degrades gracefully to the session default instead; the extension now always loads and only bare TIMESTAMPTZ display falls back to UTC when ICU is absent. Make the test-time ICU staging version- and platform-agnostic: derive the DuckDB version tag and platform from the freshly-built duckdb binary instead of hardcoding v1.4.4 + a uname map, so staging follows the v1.4.x LTS line and the v1.5.x multi-version matrix (the analog of MobilityDB's PostgreSQL 13-18 support).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the single-timezone model resilient and multi-version-ready, and consolidates the ICU test-staging work of #136 and #141 into one durable change.
1. Load resilience (graceful UTC fallback)
LoadInternalauto-loads ICU and sets the sessionTimeZonetoEurope/Brussels(needed for the named zone). When ICU is unavailable — no on-disk copy AND no network egress (CI docker images, edge/musl deployments, offline installs) — theSetOptionByNamepreviously threw out ofLoadInternaland failed the whole extension load. This wraps the ICU autoload + TimeZone set so it degrades gracefully to the session default: the extension always loads, and only bareTIMESTAMPTZdisplay falls back to UTC when ICU is absent. Mirrors the MEOS-side timezone guard.2. Version- and platform-agnostic ICU staging
DuckDB autoloads ICU from
$HOME/.duckdb/extensions/<version>/<platform>/. The test harness stages the locally-built ICU there. Previously the version tag was hardcodedv1.4.4+ aunamemap. This derives both the version tag and platform from the freshly-builtduckdbbinary (--version+PRAGMA platform), with the hardcode/uname as fallbacks only — so staging follows whatever DuckDB is under test across the v1.4.x LTS line and the v1.5.x multi-version matrix (the analog of MobilityDB's PostgreSQL 13-18 support).Supersedes
Consolidates and supersedes #136 (amd64 docker ICU staging) and #141 (macOS osx_arm64 staging); recommend closing both once this lands.
Verification
v1.4.4/linux_amd64dynamically.