Add webhook notification publisher for step/workflow status change events#228
Open
nikhiln64 wants to merge 1 commit into
Open
Add webhook notification publisher for step/workflow status change events#228nikhiln64 wants to merge 1 commit into
nikhiln64 wants to merge 1 commit into
Conversation
nikhiln64
force-pushed
the
feat/webhook-notification-publisher
branch
from
July 14, 2026 14:01
71a6a89 to
2da85a7
Compare
nikhiln64
force-pushed
the
feat/webhook-notification-publisher
branch
from
July 21, 2026 19:33
2da85a7 to
9f775f7
Compare
…ents Implements the webhook support requested in Netflix#111. A new WebhookNotificationPublisher POSTs the JSON-serialized MaestroEvent to a configured endpoint, following the same error-classification contract as the SNS publisher: 4xx responses are non-retryable (the receiver rejected the payload), 5xx and I/O failures throw MaestroRetryableError so the queue system retries delivery. Features: - event-type allowlist (empty = all event types) - optional HMAC-SHA256 request signing via X-Maestro-Signature-256 (GitHub-webhook style, sha256=<hex>), so receivers can authenticate the sender - X-Maestro-Event-Type header for cheap receiver-side routing - built on the JDK HttpClient: no new dependencies Wired behind maestro.notifier.type=webhook with a maestro.notifier.webhook.* properties block, mirroring the existing noop/sns conditional wiring.
nikhiln64
force-pushed
the
feat/webhook-notification-publisher
branch
from
July 21, 2026 20:25
9f775f7 to
b288579
Compare
Author
|
@jun-he the workflow run here is also waiting for approval. The branch is up to date with main and the full engine and server suites pass locally. Happy to adjust anything about the approach if you have thoughts on the webhook design. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request type
./gradlew build --write-locksto refresh dependencies)NOTE: Please remember to run
./gradlew spotlessApplyto fix any format violations.Changes in this PR
Implements webhook support for step/workflow status change events, as requested in #111.
What it does: a new
WebhookNotificationPublisher(maestro-engine, next to the existing publishers) POSTs the JSON-serializedMaestroEventto a configured HTTP endpoint whenever the engine dispatches a notification job event. It plugs into the existingMaestroNotificationPublisherextension point, soNotificationJobEventProcessorand the event flow are untouched.Configuration (mirrors the existing noop/sns conditional wiring):
Design decisions:
MaestroUnprocessableEntityException(receiver rejected the payload; retrying the same request cannot help), 5xx and I/O failures throwMaestroRetryableErrorso the queue system drives retries. No second retry mechanism inside the publisher.signing-secretis set, requests carryX-Maestro-Signature-256: sha256=<hex>computed over the exact body bytes (GitHub-webhook style), so receivers can authenticate the sender. Without a secret the header is absent.X-Maestro-Event-Typeheader lets receivers route cheaply without parsing the body.HttpClient: no new dependencies.Testing:
WebhookNotificationPublisherTest(6 tests) runs a real round-trip against a JDKHttpServeron an ephemeral port and verifies: payload round-trips as the same event, the signature matches the HMAC of the exact received bytes, no signature header without a secret, event-type filtering, 4xx → non-retryable, 5xx and connection failure → retryable. Full:maestro-engine:testand:maestro-server:testpass;spotlessApplyrun.Developed with AI assistance (Claude Code), reviewed and driven by a human.