Repository navigation
ci(docker): verify production image starts and serves health checks (WCN-3794) #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 nit (optional): The smoke test's 30-second limit per health check does not hold. A container that accepts a connection but never answers can stall the PR job for hours. The curl call in
wait_forhas no--max-time, so one hung request blocks the loop with no limit. Nothing else bounds the step: there is notimeout-minutes, so GitHub's 360-minute job default applies. Fix: pass--max-time(for example--connect-timeout 2 --max-time 5) to the curl inwait_for, and add atimeout-minuteson the step so every check stays bounded.Why this was flagged
The trigger is a container whose port is open while the app never responds. Two examples are an event loop blocked during startup, and master-express hanging while it waits on an unresponsive AWM (its configured timeout defaults to 305 * 1000 ms in src/initConfig.ts). In
wait_for,curl -s -o /dev/null -w '%{http_code}' -X POST "${url}"(pull_request.yaml:177) runs with no--max-timeor--connect-timeout, and curl sets no total timeout by default. So thefor _ in $(seq 1 30)loop never moves to its next iteration, and the "Timed out waiting" branch and the log dump are never reached. The PR description says each check is "polled up to 30s" and that a timeout fails the job. In fact the job runs until the GitHub default limit (notimeout-minutesis set on the step or job), using up runner minutes and leaving the check unresolved without the logs thatcleanupwould print. The base branch has no run step, so this hang is new.Verification: Trigger: a PR's image accepts TCP connections but does not answer a health request. In
wait_for, the call iscurl -s -o /dev/null -w '%{http_code}' -X POST "${url}"with no--max-timeand no--connect-timeout. Nothing else bounds the step: thebuild-docker-imagejob and the new step set notimeout-minutes, so GitHub's 360-minute default applies.