redhat-et / redhat-et/docsclaw
feat: add graceful shutdown to dashboard and document-service
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 1
Description
From PR #66 review (GLM 5.1, finding #10):
Both demo/batch/dashboard/main.go and demo/batch/document-service/main.go
use http.ListenAndServe which doesn't handle SIGTERM. In Kubernetes this
can cause request drops during pod termination.
Fix: use http.Server.Shutdown() with signal.NotifyContext.
Low priority — K8s sends SIGTERM with a 30s grace period, and these
are short-lived demo services with no long-running connections beyond
the active A2A call (which has its own timeout).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with demo/batch/dashboard/main.go and demo/batch/document-service/main.go, focusing on their http.ListenAndServe calls. Replace the serving flow with http.Server.Shutdown() coordinated by signal.NotifyContext, while preserving the existing service behavior. Done means both services handle SIGTERM gracefully within Kubernetes termination and no longer rely on http.ListenAndServe directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100