Skip to content

ci: install tzdata in the Alpine CI image - #5818

Merged
jamescrosswell merged 2 commits into
getsentry:mainfrom
schalkpienaar:ci/add-tzdata-to-alpine
Oct 27, 2026
Merged

jamescrosswell merged 2 commits into
getsentry:mainfrom
schalkpienaar:ci/add-tzdata-to-alpine

Conversation

@schalkpienaar

Copy link
Copy Markdown
Contributor

Installs tzdata in the Alpine image the linux-musl CI jobs run in (ghcr.io/getsentry/sentry-dotnet-alpine:3.21). Without it, /usr/share/zoneinfo doesn't exist, only UTC resolves, and tests that need a real IANA zone are skipped on musl via TestEnvironment.HasTimeZone.

This is the first of two PRs for the issue. alpine.yml only rebuilds and pushes the image after a change to .github/alpine/* lands on main, so CI on this PR still runs against the old image. A follow-up PR will remove the HasTimeZone skips once the new image is published.

Refs #5756

Testing

Built the image locally and checked the zone database is present:

docker build --build-arg BASE=alpine:3.21 -t sentry-dotnet-alpine:tzdata .github/alpine
docker run --rm sentry-dotnet-alpine:tzdata -c 'ls /usr/share/zoneinfo/America/New_York && TZ=America/New_York date'

Then ran Sentry.Hangfire.Tests (net10.0, NO_MOBILE=true) inside the image: 59 passed, 0 skipped. That includes the tests currently skipped on musl:

  • HangfireTests.ExecuteRecurringJob_SendMonitorConfigEnabled_CapturesCheckInWithMonitorConfig
  • ServerFilterTests.OnPerforming_RecurringJobWithSendMonitorConfigEnabled_SendsMonitorConfig (Europe/Berlin)
  • ServerFilterTests.ToIanaTimeZoneId_HangfireTimeZoneId_ReturnsIanaIdOrNull (Europe/Berlin, W. Europe Standard Time)

#skip-changelog

🤖 Generated with Claude Code

The linux-musl CI image has no time zone database, so only UTC resolves
and tests that need a real IANA zone are skipped on musl.

Refs getsentry#5756

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schalkpienaar
schalkpienaar marked this pull request as ready for review October 27, 2026 03:45
@github-actions github-actions Bot added the risk: low PR risk score: low label Oct 27, 2026
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.12%. Comparing base (b21628f) to head (4d18075).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5818   +/-   ##
=======================================
  Coverage   76.12%   76.12%           
=======================================
  Files         528      528           
  Lines       19579    19579           
  Branches     3829     3829           
=======================================
+ Hits        14904    14905    +1     
  Misses       3792     3792           
+ Partials      883      882    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/alpine/Dockerfile Resolved
@jamescrosswell
jamescrosswell self-requested a review October 27, 2026 08:15

@jamescrosswell jamescrosswell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you!

@jamescrosswell
jamescrosswell merged commit 14c086d into getsentry:main Oct 27, 2026
32 checks passed
@schalkpienaar
schalkpienaar deleted the ci/add-tzdata-to-alpine branch October 27, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants