Repository navigation
fix(pubsub): map daprd bulk publish entryId into failedMessages - #937
Open
ParthKadam11 wants to merge 5 commits into
Open
ParthKadam11 wants to merge 5 commits into
ParthKadam11 wants to merge 5 commits into
Conversation
daprd's HTTP bulk publish response uses json:"entryId", but the SDK only matched entryID, so real sidecar failures produced an empty failedMessages array. Accept both field names and cover the daprd-shaped response in tests. Signed-off-by: ParthKadam11 <parthkadamalt@gmail.com>
| failedMessages: | ||
| params.response.failedEntries.flatMap((entry) => { | ||
| const message = params.entries.find((message) => message.entryID === entry.entryID); | ||
| params.response.failedEntries?.flatMap((entry) => { |
WhitWaldo
requested changes
Nov 5, 2026
WhitWaldo
left a comment
Contributor
There was a problem hiding this comment.
Can you please address Copilot's feedback?
…s missing Updated the bulk publish response handling to throw an error if failedEntries is not present, ensuring that the HTTP error handling correctly marks all entries as failed. Added a test case to verify this behavior. Signed-off-by: ParthKadam11 <parthkadamalt@gmail.com>
ParthKadam11
force-pushed
the
fix/bulk-publish-entryid-mismatch
branch
from
November 5, 2026 16:06
0ed54a6 to
74f4295
Compare
Author
|
dropped the |
This branch has not been deployed
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.

Description
publishBulkcould return{ failedMessages: [] }when the sidecar reported failures.daprd's HTTP bulk publish response uses
json:"entryId"(pkg/api/http/responses.go), but the SDK only matchedentryID. Failed entry IDs never lined up with the request, so every failure was dropped.Fix: resolve
entry.entryId ?? entry.entryIDingetBulkPublishResponse, and accept both names on the API response type. Tests now cover the daprd-shaped payload (and HTTP pubsub mocks useentryId).Test: (92 passed)
Issue reference
Please reference the issue this PR will close: #703
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: