Skip to content

feat(add_ons): add lifecycle webhooks - #6308

Open
avanish-garg wants to merge 1 commit into
getlago:mainfrom
avanish-garg:feature/add-on-lifecycle-webhooks
Open

feat(add_ons): add lifecycle webhooks#6308
avanish-garg wants to merge 1 commit into
getlago:mainfrom
avanish-garg:feature/add-on-lifecycle-webhooks

Conversation

@avanish-garg

@avanish-garg avanish-garg commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #6309

Problem

AddOn lifecycle (create/update/destroy) fires no webhooks and produces no activity logs at
all, unlike sibling catalog resources Plan, BillableMetric, and Coupon, which all fire
*.created/*.updated/*.deleted webhooks.

Change

  • Added Webhooks::AddOns::{Created,Updated,Deleted}Service, mirroring the existing
    Webhooks::BillableMetrics::*Service/Webhooks::Coupons::*Service classes exactly.
  • Registered the three new events in SendWebhookJob::WEBHOOK_SERVICES.
  • Wired SendWebhookJob.perform_after_commit calls into AddOns::CreateService,
    AddOns::UpdateService, and AddOns::DestroyService.
  • Added specs for the three new webhook services, webhook-enqueue assertions to the
    existing AddOns::{Create,Update,Destroy}Service specs, and a new context in the
    dispatcher-level send_webhook_job_spec.rb.

Purely additive wiring -- no billing/pricing math touched.

Verified

  • 74 RSpec examples passing (spec/services/add_ons/*_service_spec.rb,
    spec/services/webhooks/add_ons/*_spec.rb, spec/jobs/send_webhook_job_spec.rb) against a
    real Postgres (getlago/postgres-partman:15.0-alpine, matching CI) + Redis environment.
  • Rubocop clean across all 15 touched/new files.

AddOn create/update/destroy fired no webhooks and produced no activity
logs at all, unlike sibling catalog resources Plan/BillableMetric/
Coupon, which all fire *.created/*.updated/*.deleted webhooks.

Adds Webhooks::AddOns::{Created,Updated,Deleted}Service mirroring the
existing BillableMetrics/Coupons webhook services, registers them in
SendWebhookJob::WEBHOOK_SERVICES, and wires the SendWebhookJob calls
into AddOns::{Create,Update,Destroy}Service.
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.

[FEAT]: AddOn lifecycle (create/update/destroy) fires no webhooks or activity logs

1 participant