[pull] main from hookdeck:main#163
Merged
Merged
Conversation
* feat(webhook): cap stored response body size
A large destination response can make the attempt LogEntry exceed the log
queue's per-message size limit. Publishing then fails, the attempt never
lands in the logstore, and the event retries forever ("no prior attempt
found in logstore, will retry").
Add an opt-in cap (default 0 = no limit) on the response body stored on the
attempt, threaded through both webhook modes via WithMaxResponseBodyBytes.
When exceeded, the body is replaced wholesale with a placeholder rather than
truncated, so consumers never see a partial body. Reading uses a maxBytes+1
LimitReader to detect overflow without buffering the whole body.
Refs: #974
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(config): add DESTINATIONS_WEBHOOK_MAX_RESPONSE_BODY_BYTES
Expose the webhook response body cap as config. Unset (0) keeps the current
behavior of storing the full response body.
Refs: #974
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): webhook response body cap regression
Drives the full path — config -> provider option -> response capture ->
logstore -> /attempts — with a destination returning a 200 KB body against a
1 KB cap, asserting the stored body is the placeholder; a second destination
under the cap confirms verbatim storage.
Refs: #974
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: document webhook max response body size
Refs: #974
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* style: gofmt webhook standard publisher struct literal
Align fields after adding maxResponseBodyBytes in 56f8bf4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(webhook): correct 128 KB to 128 KiB for 131072 byte example
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(webhook): default max response body to 128 KiB
Conservative default sized against the strictest per-message limits of
supported queues (SQS default queue attribute and Azure Service Bus
standard tier, both 256 Ki/KB), leaving half for the event payload and
envelope. Considered per-MQ defaults but the real limit is deployment-side
config Outpost can't see for three of the four backends, so one
conservative value keeps it simple. Explicit 0 disables the cap.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )