fix(extension): skip MEOS timezone init when no zoneinfo on system (unblocks musl probe) - #182
Merged
estebanzimanyi merged 1 commit intoJul 29, 2026
Conversation
This was referenced May 21, 2026
Closed
meos_initialize_timezone loads /usr/share/zoneinfo through MEOS's pgtz code, which fails on opendir when the zoneinfo database is absent (Alpine/musl images, minimal containers, edge devices), erroring the whole extension load. Guard the call on the presence of /usr/share/zoneinfo so the extension loads against UTC instead of failing at startup.
estebanzimanyi
force-pushed
the
fix/meos-tz-init-resilient
branch
from
July 29, 2026 07:29
4ce3492 to
93cc2de
Compare
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
Skip the MEOS
meos_initialize_timezone("Europe/Brussels")call when/usr/share/zoneinfoisn't present on the system. This unblocks the musl probe (PR #172) without requiring a separate fix to the upstreamextension-ci-toolsDockerfile.Background
meos_initialize_timezone(...)calls into MEOS'spgtzcode which opens/usr/share/zoneinfoto load the timezone database. On minimal containers (Alpine/musl, edge-device runtimes)tzdatais not installed by default, so the call surfaces:…and the test runner downstream then errors. This was the exact failure mode on the musl probe (#172,
linux_amd64_muslrow) — MEOS C compiled+linked green, but the runtime timezone init failed.The fix
Guard the
meos_initialize_timezonecall with a portablestat+S_IFDIRcheck on the canonical zoneinfo directory:If zoneinfo isn't present, the extension loads against MEOS's default (UTC) instead of erroring at startup.
Behaviour matrix
Alternative: upstream Dockerfile fix
The complementary fix is
apk add tzdatainextension-ci-tools/docker/linux_amd64_musl/Dockerfile. Both unblock the musl probe; having both gives belt-and-suspenders coverage and lets the extension load on any tzdata-less host (not just the CI image).The extension-side fix in this PR has the additional benefit that it makes MobilityDuck deployable on edge devices and minimal containers without requiring the operator to install tzdata.
Verification
Linux x86_64 build green (4 polyfills inherited from the substrate stack + 1 TZ-resilient commit):
The Brussels TZ output is preserved on a host with zoneinfo present.
Refs
[[duckdb-extension-ci-env]]— the CI Docker env documentation