Skip to content

Improve Dark Hours Calculation Reliability - #317

Merged
chvvkumar merged 1 commit into
devfrom
snd
Oct 13, 2026
Merged

chvvkumar merged 1 commit into
devfrom
snd

Conversation

@chvvkumar

@chvvkumar chvvkumar commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

What's fixed:

  • Fixed dark hours calculation failing due to outdated astronomical data.

The app container has no outbound DNS, so astropy's IERS_Auto can never
download a fresh Earth-orientation table and always falls back to the copy
bundled with astropy-iers-data at image build. Once that copy's predictive
data passed 30 days old, any date beyond it raised ValueError, and because
backfill_dark_hours deliberately computes 35 days ahead, every run failed.

astro_night now configures astropy to skip the download and accept the aged
table. Dark hours only need the sun's altitude to a fraction of a degree,
and the bundled UT1-UTC predictions are good to milliseconds, so the computed
values are unchanged. Verified by reproducing the production error locally
with downloads disabled and comparing against the online baseline.

Users see the stats timeline efficiency keep rendering for the current month
and the recurring task_failure event in the job monitor goes away.
@github-actions github-actions Bot changed the title Stop dark-hours backfill failing on stale bundled IERS data Improve Dark Hours Calculation Reliability Oct 13, 2026
@chvvkumar
chvvkumar merged commit 40879d5 into dev Oct 13, 2026
1 check passed
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.

1 participant