Skip to content

fix(schedules): include timezone data in backend image - #370

Merged
jromualdez-scale merged 1 commit into
mainfrom
jerome/add-backend-tzdata
Jul 22, 2026
Merged

fix(schedules): include timezone data in backend image#370
jromualdez-scale merged 1 commit into
mainfrom
jerome/add-backend-tzdata

Conversation

@jromualdez-scale

@jromualdez-scale jromualdez-scale commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Named schedule timezones rely on Python's zoneinfo module. The slim production backend image contains neither system timezone files nor the Python tzdata package, so resolving values such as America/New_York raises ZoneInfoNotFoundError.

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 tzdata as a direct backend runtime dependency so Python can resolve IANA timezone names consistently in slim production containers.

Test plan

  • uv lock --check
  • Named-timezone Temporal schedule unit tests (7 passed)
  • Build the production Docker target
  • Run ZoneInfo("America/New_York") successfully inside the built production image

Made with Cursor

Greptile Summary

This PR fixes a ZoneInfoNotFoundError in slim production Docker images by adding tzdata as an explicit Python runtime dependency, ensuring Python's zoneinfo module can resolve IANA timezone names (e.g. America/New_York) without relying on host system timezone files.

  • agentex/pyproject.toml: Adds tzdata>=2025.2 to the dependencies list — the standard fix for slim containers that lack /usr/share/zoneinfo.
  • uv.lock: Pins tzdata 2025.2 with verified hashes for the sdist and pure-Python wheel; the sys_platform marker (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 described ZoneInfoNotFoundError in 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

Filename Overview
agentex/pyproject.toml Adds tzdata>=2025.2 as a direct runtime dependency so Python's zoneinfo module can resolve IANA timezone names in slim production containers that lack system timezone files.
uv.lock Lock file updated to pin tzdata 2025.2 with hashes for both the sdist and pure-Python wheel; dependency marker correctly restricts installation to darwin or linux, 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
Loading
%%{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
    end
Loading

Reviews (1): Last reviewed commit: "fix(schedules): include timezone data in..." | Re-trigger Greptile

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
jromualdez-scale marked this pull request as ready for review July 22, 2026 01:40
@jromualdez-scale
jromualdez-scale requested a review from a team as a code owner July 22, 2026 01:40
@jromualdez-scale
jromualdez-scale merged commit 2c4f061 into main Jul 22, 2026
31 checks passed
@jromualdez-scale
jromualdez-scale deleted the jerome/add-backend-tzdata branch July 22, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants