fix(schedules): include timezone data in backend image - #370
Merged
Conversation
Ensure named schedule timezones resolve in slim production containers so live enrichment and skip actions work outside local development. Co-authored-by: Cursor <cursoragent@cursor.com>
jromualdez-scale
marked this pull request as ready for review
July 22, 2026 01:40
vineetvora-scale
approved these changes
Jul 22, 2026
danielmillerp
approved these changes
Jul 22, 2026
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.
Problem
Named schedule timezones rely on Python's
zoneinfomodule. The slim production backend image contains neither system timezone files nor the Pythontzdatapackage, so resolving values such asAmerica/New_YorkraisesZoneInfoNotFoundError.This makes live schedule enrichment unavailable and prevents timezone-aware skip operations, while local development continues to work because the host provides timezone data.
Solution
Add
tzdataas a direct backend runtime dependency so Python can resolve IANA timezone names consistently in slim production containers.Test plan
uv lock --checkZoneInfo("America/New_York")successfully inside the built production imageMade with Cursor
Greptile Summary
This PR fixes a
ZoneInfoNotFoundErrorin slim production Docker images by addingtzdataas an explicit Python runtime dependency, ensuring Python'szoneinfomodule can resolve IANA timezone names (e.g.America/New_York) without relying on host system timezone files.agentex/pyproject.toml: Addstzdata>=2025.2to thedependencieslist — the standard fix for slim containers that lack/usr/share/zoneinfo.uv.lock: Pinstzdata 2025.2with verified hashes for the sdist and pure-Python wheel; thesys_platformmarker (darwin/linux) is consistent with all other backend dependencies.Confidence Score: 5/5
Safe to merge — a one-line dependency addition with a verified lock file entry and no logic changes.
The change is a single dependency addition (
tzdata>=2025.2) that directly addresses the describedZoneInfoNotFoundErrorin slim containers. The lock file is consistent, hashes are present, the platform marker matches the rest of the project, and no application logic was touched.No files require special attention.
Important Files Changed
tzdata>=2025.2as a direct runtime dependency so Python'szoneinfomodule can resolve IANA timezone names in slim production containers that lack system timezone files.tzdata 2025.2with hashes for both the sdist and pure-Python wheel; dependency marker correctly restricts installation todarwinorlinux, consistent with all other backend dependencies.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant App as Backend App participant ZI as zoneinfo (stdlib) participant TZD as tzdata (PyPI package) participant SYS as System /usr/share/zoneinfo App->>ZI: ZoneInfo("America/New_York") ZI->>SYS: Look up timezone file alt Slim container (no system tz files) SYS-->>ZI: Not found ZI->>TZD: Fall back to tzdata package TZD-->>ZI: Timezone data found ✓ ZI-->>App: ZoneInfo object returned else Full OS / dev machine SYS-->>ZI: Timezone data found ✓ ZI-->>App: ZoneInfo object returned end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant App as Backend App participant ZI as zoneinfo (stdlib) participant TZD as tzdata (PyPI package) participant SYS as System /usr/share/zoneinfo App->>ZI: ZoneInfo("America/New_York") ZI->>SYS: Look up timezone file alt Slim container (no system tz files) SYS-->>ZI: Not found ZI->>TZD: Fall back to tzdata package TZD-->>ZI: Timezone data found ✓ ZI-->>App: ZoneInfo object returned else Full OS / dev machine SYS-->>ZI: Timezone data found ✓ ZI-->>App: ZoneInfo object returned endReviews (1): Last reviewed commit: "fix(schedules): include timezone data in..." | Re-trigger Greptile