Add ForwardE2bWebhook endpoint for sandbox lifecycle webhooks#2567
Add ForwardE2bWebhook endpoint for sandbox lifecycle webhooks#2567hosekpeter merged 11 commits intomainfrom
Conversation
ce07c3a to
9d05433
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new public appsproxy endpoint to forward E2B sandbox lifecycle webhook requests to the keboola-operator webhook server, controlled via new appsproxy configuration.
Changes:
- Add
POST /_proxy/api/v1/e2b-webhookendpoint (Goa design + generated server/client) to forward webhook body ande2b-*headers upstream. - Introduce
e2bWebhook.upstreamUrlconfig to enable/disable forwarding. - Add tests validating forwarding behavior and generated OpenAPI spec updates.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/pkg/service/appsproxy/proxy/e2bwebhook_test.go | Adds tests covering webhook forwarding and basic failure scenarios. |
| internal/pkg/service/appsproxy/config/config.go | Adds E2bWebhook config section with UpstreamURL. |
| internal/pkg/service/appsproxy/api/service/service.go | Implements ForwardE2bWebhook forwarding logic. |
| internal/pkg/service/appsproxy/api/openapi/openapi3.yaml | Documents new endpoint in OpenAPI v3 YAML. |
| internal/pkg/service/appsproxy/api/openapi/openapi3.json | Documents new endpoint in OpenAPI v3 JSON. |
| internal/pkg/service/appsproxy/api/openapi/openapi.yaml | Documents new endpoint in Swagger v2 YAML. |
| internal/pkg/service/appsproxy/api/openapi/openapi.json | Documents new endpoint in Swagger v2 JSON. |
| internal/pkg/service/appsproxy/api/gen/http/apps_proxy/server/server.go | Generated HTTP server wiring for new endpoint + CORS mount. |
| internal/pkg/service/appsproxy/api/gen/http/apps_proxy/server/paths.go | Generated helper path for new endpoint. |
| internal/pkg/service/appsproxy/api/gen/http/apps_proxy/server/encode_decode.go | Generated response encoder for empty 200 response. |
| internal/pkg/service/appsproxy/api/gen/apps_proxy/service.go | Generated service interface includes ForwardE2bWebhook. |
| internal/pkg/service/appsproxy/api/gen/apps_proxy/endpoints.go | Generated endpoint + request data wiring for body passthrough. |
| internal/pkg/service/appsproxy/api/gen/apps_proxy/client.go | Generated client method for new endpoint. |
| api/appsproxy/design.go | Goa design adds ForwardE2bWebhook method and HTTP mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pepamartinec
left a comment
There was a problem hiding this comment.
S routingem v Go/Goa jsem zatim moc nepracoval, tam mozna strilim uplne vedle, ale nejak se mi nezda/nelibi to, ze musis ruco rekonstruovat cely request znovu. Predstavoval jsem si, ze se pouzije jednoduse neco jako httputil.ReverseProxy.
Zkusil jsem to loopnout s Claudem a pochopil jsem, ze tam je pak problem, ze je to mimo Goa a takze to neni pokryte v API docs. Osobne bych se tim nejak netrapil 🙂 nebo se to da "hacknout" stub endpointem. Zkus mrknout na tohle #2576, co by si na to rekl. Za me to ma jednu major vyhodu - proste to forwardne ten request, jak je - zadny cusotm handling body, headeru atp. (a to je to, co chceme - proste forwardnout request)
8770bee to
3a4e24e
Compare
Release Notes
Plans for customer communication
None.
Impact analysis
Introduces a new endpoint to handle E2B sandbox lifecycle webhooks. No breaking changes expected.
Change type
Feature addition.
Justification
Enables handling of E2B sandbox lifecycle webhook events.
Deployment
Merge & automatic deploy.
Rollback plan
Revert of this PR.
Post release support plan
None.