Repository navigation
Wait for running jobs on shutdown, and take OS security fixes in image builds - #41
Merged
Merged
Conversation
A catch-up run started when the server starts runs in the background and records its result when it ends. When the app stopped first, as tests do as soon as they finish, that write hit a closed app and crashed the test run now and then. Each job now tracks its runs, and the app waits for them on terminate; runs that would start after that are skipped.
The released image still has zlib 1.3.2-r1 (CVE-2026-4738), so the Security workflow's image scan fails. Upgrade the runtime stage's packages and build that stage without the cache when publishing, as plasto and the other apps do. The scan passes once the next release is published.
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.
Requested by Yannis · project thread
Background jobs writing after shutdown
backend/jobstests crashed now and then: the catch-up run thatMustAddstarts on serve runs in the background and saves its result when it ends, and the test had already cleaned up the app by then.go test -race -count=40 -run TestMustAdd ./jobs/crashed locally before this change and passes after it.Each job now tracks its runs (the catch-up run and cron runs), and
OnTerminatewaits for them before the app closes; runs that would start after that are skipped. In production this means a stopping server lets a running job finish and record itself. New test:TestShutdownWaitsForARunningJob.Security workflow's image scan
The released image still has zlib 1.3.2-r1 (CVE-2026-4738, critical), so Grype fails. Like plasto and the other apps, the app image now runs
apk upgradeand the worker imageapt-get upgradein the runtime stage, and publishing builds that stage without the cache (no-cache-filters: runtime). The scan goes green once the next release is published after merge.Checks
make check,make testandgo test -race -count=3 ./jobs/pass locally.Generated by Claude Code