Conversation
Signed-off-by: Stefan Wang <1fannnw@gmail.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe runtime Dockerfile now conditionally installs Flow diagram for conditional runtime timezone provisioningflowchart TD
A[Runtime base image] --> B{command -v apt-get}
B -->|available| C[apt-get update]
C --> D[apt-get install tzdata]
D --> E[rm -rf /var/lib/apt/lists/*]
E --> F[Velox resolves /usr/share/zoneinfo]
B -->|absent| G[Use existing zoneinfo database]
G --> F
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
On Ubuntu-based Prestissimo workers, even
SELECT 1 = 1fails withdiscover_tz_dir failed to find zoneinfo. The runtime image has no timezone database for Velox to load.The runtime stage now installs
tzdatawhen its base providesapt-get. The default CentOS Stream 9 path is unchanged because it already contains/usr/share/zoneinfo.Closes #25531.
The same packaging gap was fixed downstream in y-scope#26 and later restored in y-scope#154.
Testing
The probe compiles
__libcpp_tzdb_directory()from Velox commitb7be48aaa3a1300cbc2099d42d244ec42511297d, the submodule pinned by Presto master. The timezone lookup reached by the failing basic query errors in the current Ubuntu runtime and returns/usr/share/zoneinfowith this change.Self-contained probe and raw logs
$ curl -fsSL \ https://raw.githubusercontent.com/facebookincubator/velox/b7be48aaa3a1300cbc2099d42d244ec42511297d/velox/external/tzdb/tzdb.cpp \ -o tzdb.cpp $ { cat <<'CPP' #include <sys/stat.h> #include <unistd.h> #include <cstdlib> #include <iostream> #include <stdexcept> #include <string> #define CONSTDATA constexpr namespace facebook::velox::tzdb { CPP sed -n '/std::string __libcpp_tzdb_directory()/,/^}/p' tzdb.cpp cat <<'CPP' } int main() { try { std::cout << facebook::velox::tzdb::__libcpp_tzdb_directory() << '\n'; return 0; } catch (const std::exception& error) { std::cerr << error.what(); return 1; } } CPP } > probe.cppBoth images compile that probe in an Ubuntu build stage and copy it into a bare
ubuntu:22.04runtime stage. The second image includes the exactRUNblock from this PR.