Document common function patterns and examples - #436
Conversation
This comment has been minimized.
This comment has been minimized.
dbdd46a to
d42b2a1
Compare
This comment has been minimized.
This comment has been minimized.
7865ffc to
4645b26
Compare
This comment has been minimized.
This comment has been minimized.
4645b26 to
dcc9c5c
Compare
This comment has been minimized.
This comment has been minimized.
dcc9c5c to
0316aa8
Compare
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
0316aa8 to
e9bdba0
Compare
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/10. Strong addition overall, with copy/paste risks in the Singleton and Fan-out examples that should be addressed before merge. Summary per fileSummary per file
Overall AssessmentThe PR adds a coherent pattern reference with practical examples and generally good warnings around timeouts, retries, scaling, and SSRF. The main risk is that these pages are tutorial material readers will copy directly. The Go singleton example lacks the heartbeat behavior that the Python example includes, which makes it fragile for long-lived SSE subscriptions. The Fan-out cancellation wording also points readers at cancelling already accepted work without explaining the race with queue-worker execution, which can make the documented behavior look reliable when it is inherently best-effort. Detailed ReviewDetailed ReviewFindingsMedium: Add keep-alive writes to the Go SSE singleton example
The Go SSE example writes Low: Make async cancellation wording best-effort rather than deterministic
The "Track and cancel checks" section says each call ID identifies one queued check and then shows Content reviewNo blocking findings beyond the two issues above. The new pattern overview has a clear audience fit: it gives readers a short decision table before sending them into full examples. The Director page has the strongest narrative, moving from validation to parallel checks and then to timeout planning. The Fan-out page usefully calls out SSRF risk and callback ordering, but the cancellation section needs more precise lifecycle language. The Singleton page explains the one-replica tradeoff well and appropriately warns that in-memory state is not durable; adding Go heartbeats would make the implementation match that operational advice. AI agent details. |
| - Readiness checks for slow start-up: ./languages/python/examples/readiness.md | ||
| - Node: ./languages/node.md | ||
| - Go: ./languages/go.md | ||
| - Go: ./languages/go/index.md |
There was a problem hiding this comment.
Looks breaking.. same for Python?
Description
Document common function patterns and add examples for each pattern.
Motivation and Context
Provide a concise reference for common function patterns and demonstrate them with examples.
How Has This Been Tested?
Verified the pages render correctly and the examples have been tested end-to-end.
Types of changes
Checklist:
git commit -s