feat(dataplane,dashboard): configurable outbound request ID header per project#2665
feat(dataplane,dashboard): configurable outbound request ID header per project#2665olamilekan000 wants to merge 1 commit into
Conversation
65c0e2d to
dc48c4b
Compare
mekilis
left a comment
There was a problem hiding this comment.
Looks ok, but added a few comments. Also, please check the CI; one of the checks failed.
| int64(cfg.MaxResponseSize), | ||
| eventDelivery.Headers, | ||
| project.Config.GetRequestIDHeader().String(), | ||
| eventDelivery.IdempotencyKey, |
There was a problem hiding this comment.
Two problems. The header only goes out when the event has an idempotency key, so deliveries without one get no Split-Request-ID at all. And when it is sent, the value is that key (usually a ULID), not the UUID their contract specifies. As-is this doesn't meet the contract, which is a stable UUID on every delivery. The value and always-present pieces still need handling.
| }, | ||
| "host": "http://localhost:5011", | ||
| "root_path": "/testing", | ||
| "root_path": "", |
There was a problem hiding this comment.
root_path flips from /testing to "", which looks like a local debug tweak that got swept in. Unrelated to the feature. Can we drop debug.json from the diff?
8582815 to
94875b1
Compare
94875b1 to
bee1acd
Compare
mekilis
left a comment
There was a problem hiding this comment.
Added comments but please fix the failing tests.
| }, | ||
| "host": "http://localhost:5011", | ||
| "root_path": "/testing", | ||
| "root_path": "", |
There was a problem hiding this comment.
Still in the diff. Can we revert debug.json to match main?
| header, | ||
| int64(cfg.MaxResponseSize), | ||
| eventDelivery.Headers, | ||
| project.Config.GetRequestIDHeader().String(), |
There was a problem hiding this comment.
This works, thanks. Validating at publish with a 400 across the create paths, plus the dispatcher backstop, is the right call. One ask: add a code comment noting the producer must supply the UUID as the idempotency key, since that's the contract now.
bee1acd to
a3de853
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a3de853. Configure here.
a3de853 to
a3df423
Compare

Note
Medium Risk
Changes webhook HTTP headers and tightens event ingestion when custom headers are set; misconfiguration or missing idempotency keys can break subscriber integrations.
Overview
Adds per-project
request_id_header(defaultX-Convoy-Idempotency-Key) so outbound webhook deliveries can expose the event idempotency key under a configurable header name, with dashboard support per the PR description.API & validation: Project config accepts
request_id_headerthrough the API model and persistence layer; test seeds set the default header. Create endpoint event now rejects requests when an outgoing project uses a non-default header name but the event omitsidempotency_key(same rule applies in other outgoing event services in this branch).Tooling: Makefile adds
ui-buildandui-build-freshtargets for building the dashboard viascripts/build-ui.sh.Reviewed by Cursor Bugbot for commit a3df423. Bugbot is set up for automated code reviews on this repo. Configure here.