feat(server): add outgoing webhook notifications for resource changes#2453
feat(server): add outgoing webhook notifications for resource changes#2453pilartomas merged 11 commits intomainfrom
Conversation
Add fire-and-forget outgoing webhooks so statically-configured callback URLs receive HTTP POST notifications when resources are created, updated, or deleted. Webhook endpoints are configured via Helm chart values. For security, payloads contain only event type, resource URL, resource ID, and user ID — no resource data. Each endpoint uses a Bearer token secret for authentication. Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new feature to the server that enables event-driven notifications via outgoing webhooks. It allows external systems to subscribe to changes in various resources (like providers, contexts, files, and users) by receiving lightweight, secure payloads. The implementation focuses on a fire-and-forget mechanism to ensure the server's performance is not impacted by slow or failing webhook deliveries, and provides a robust configuration method through Helm. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new webhook system, enabling the application to dispatch events for various resource lifecycle changes (create, update, delete) to configured external endpoints. This involves defining new configuration models for webhooks, implementing a dispatch_webhook_event utility, and integrating this dispatch mechanism across numerous service layer operations for resources such as configurations, connectors, contexts, files, model providers, provider builds, providers, user feedback, users, and vector stores. The deployment is also updated to support webhook configuration via Helm. Feedback includes ensuring the resource_id for configuration.updated events is semantically accurate by using configuration.id instead of user.id, and populating the user_id argument in the provider_build.updated webhook event from provider_build.created_by for consistency.
apps/agentstack-server/src/agentstack_server/service_layer/services/configurations.py
Outdated
Show resolved
Hide resolved
apps/agentstack-server/src/agentstack_server/service_layer/services/provider_build.py
Show resolved
Hide resolved
602e1d5 to
6a8b3d8
Compare
Signed-off-by: Tomas Pilar <thomas7pilar@gmail.com>
Summary
Authorization, custom headers) — no hardcoded header logic*,provider.*, and exactprovider.createdhttpx.AsyncClientfor connection pooling across webhook deliveriesWebhook payload
{ "event": "provider.created", "resource_type": "provider", "resource_id": "550e8400-e29b-41d4-a716-446655440000", "resource_url": "/api/v1/providers/550e8400-e29b-41d4-a716-446655440000", "user_id": "660e8400-e29b-41d4-a716-446655440000", "timestamp": "2026-03-26T12:00:00Z" }Helm configuration
Test plan
*,provider.*, exact match)closes #2454