openfaas-function-dev: add custom readiness check guidance#2
Conversation
Handlers that initialize state (model load, cache warm-up, DB pools) mark the Pod Ready before they can actually serve, causing the first request after a cold start or scale-from-zero to fail. Document the custom /ready endpoint pattern so functions can signal true readiness. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
AI Pull Request OverviewDisclaimer: This review was generated by automated AI and may contain errors. Do not trust its outputs without human verification. Summary
Approval rating (1-10)7 — Content is accurate and fills a real gap; two issues in the code examples reduce reliability for implementors copying the patterns directly. Summary per fileSummary per file
Overall AssessmentThe documentation additions are well-scoped and address a genuine operational gap. The annotation table is complete, the Detailed ReviewDetailed Review
|
Description
Adds guidance to the
openfaas-function-devskill on configuring a customHTTP readiness endpoint for functions whose handlers perform initialization
(model load, cache warm-up, opening DB / SDK clients), with per-language
handler patterns and the required
com.openfaas.ready.http.*annotations.Motivation and context
Without a custom readiness endpoint, the first request after a cold start
or scale-from-zero can hit a Pod that is up but not yet able to serve. The
skill had no guidance for this.
How has this been tested
Testing is in progress by scaffolding several functions using the updated
skill.