Skip to content

Add ForwardE2bWebhook endpoint for sandbox lifecycle webhooks#2567

Merged
hosekpeter merged 11 commits intomainfrom
hosan/PAT-1632
Apr 9, 2026
Merged

Add ForwardE2bWebhook endpoint for sandbox lifecycle webhooks#2567
hosekpeter merged 11 commits intomainfrom
hosan/PAT-1632

Conversation

@hosekpeter
Copy link
Copy Markdown
Contributor

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.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 2, 2026

@hosekpeter hosekpeter marked this pull request as ready for review April 7, 2026 12:33
@hosekpeter hosekpeter requested review from Copilot and pepamartinec and removed request for jachym-tousek-keboola April 7, 2026 12:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-webhook endpoint (Goa design + generated server/client) to forward webhook body and e2b-* headers upstream.
  • Introduce e2bWebhook.upstreamUrl config 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.

Comment thread internal/pkg/service/appsproxy/api/service/service.go Outdated
Comment thread internal/pkg/service/appsproxy/api/service/service.go Outdated
Comment thread internal/pkg/service/appsproxy/api/service/service.go Outdated
Comment thread internal/pkg/service/appsproxy/api/service/service.go Outdated
Comment thread internal/pkg/service/appsproxy/config/config.go Outdated
Comment thread api/appsproxy/design.go Outdated
Copy link
Copy Markdown
Contributor

@pepamartinec pepamartinec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@hosekpeter hosekpeter requested a review from pepamartinec April 8, 2026 11:54
Comment thread internal/pkg/service/appsproxy/proxy/server.go Outdated
Copy link
Copy Markdown
Contributor

@pepamartinec pepamartinec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hosekpeter hosekpeter merged commit 7c295f4 into main Apr 9, 2026
38 of 43 checks passed
@hosekpeter hosekpeter deleted the hosan/PAT-1632 branch April 9, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants