Repository navigation
ci(k8s): record why the uwsgi container restarted when the deployment test fails - #16398
Merged
Merged
Conversation
… test fails The k8s deployment job intermittently fails its API auth check because the uwsgi container restarts on the first POST to /api/v2/api-token-auth/. The failure logs never showed why it terminated. Print each django container's last termination state and the previous uwsgi container's logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blakeaowens
approved these changes
Oct 17, 2026
devGregA
approved these changes
Oct 17, 2026
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.
Shortcut: sc-16687
Description
The
test-k8s / Kubernetes Deploymentjob failed 10 times in the merge queue over the last three weeks with curl exit code 7 (once 28). The logs show the same pattern each time:kubectl waitand the login page returns 200;POST /api/v2/api-token-auth/getsupstream prematurely closed connectionfrom nginx;CrashLoopBackOff).So the uwsgi container dies while it handles the token request. One guess is an OOM kill during password hashing (the container is limited to 512Mi and runs 4 processes × 4 threads), but nothing confirms it: the failure output never says why the container terminated.
This PR changes no behavior. It only adds two things to the
Failed Logsstep:lastState(this showsOOMKilledor the exit code/signal);The next failure should show the cause, and the real fix (resources, uwsgi settings, or code) can follow from that.
Test results
The workflow YAML parses, and the label selector
defectdojo.org/component=djangoand container nameuwsgimatchhelm/defectdojo/templates/django-deployment.yaml. The new commands only run in the failure path, so they have not run in CI yet.Documentation
None needed.
🤖 Generated with Claude Code