fix: send webhooks the DB post id via post.workflow.v1.1.2 - #1994
Closed
giladresisi wants to merge 3 commits into
Closed
giladresisi wants to merge 3 commits into
giladresisi wants to merge 3 commits into
Conversation
v1.1.0 passed the platform post id to sendWebhooks, so the webhook lookup matched nothing and every delivery body was [].
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…payload # Conflicts: # apps/orchestrator/src/workflows/post-workflows/post.workflow.v1.1.1.ts
v1.1.1 shipped from staging without the webhook fix and is already deployed, so it is frozen; v1.1.2 carries the DB-post-id argument. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JkiuuMQcG1QRkbagfSkBtb
10 tasks
Collaborator
Author
|
Superseded by #2087, which fixes the same empty-payload bug inside the sendWebhooks activity (releaseId fallback) instead of a new workflow version, so it also covers in-flight and repeat-post runs and avoids further workflow version collisions. |
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.
What kind of change does this PR introduce?
Bug fix (orchestrator, post workflow / organization webhooks). Every post-publish webhook (Settings → Webhooks) delivered a body of literally
[]instead of the published post: the post workflow passedpostsResults[0].postId— the id the platform returned (e.g. a Telegram message number) — to thesendWebhooksactivity, whilegetPostByForWebhookIdmatches on our DBPost.id, so the lookup always returned an empty array. Since deployed workflow files are frozen, this addspost.workflow.v1.1.2— an exact copy of the deployed v1.1.1 except the webhook call now passespostsList[0].id(the DB id already used bychangeState/updatePost) and the repeat-poststartChildpoints at itself — and flips all start sites (posts.service.tsstart call +workflow_typelog labels,post.activity.tssignalWithStart,workflows/index.tsexport) topostWorkflowV112. ThesendWebhooksactivity, its signature, and all older workflow versions (v1.1.1 included) are untouched, so in-flight workflows keep running.Originally this PR introduced v1.1.1, but v1.1.1 was since taken by the heartbeat-timeout work on staging (#1996) and is already deployed without the webhook fix, so the branch was merged with staging (adopting its v1.1.1 as-is) and the fix re-cut as v1.1.2.
Why was this change needed?
A customer reported their webhook endpoint receiving "the same webhook again and again", each delivery an empty array, and never a real post payload. The bug affects every workflow version to date, so no org webhook has ever received actual post data. Fixing it in a new workflow version follows the repo rule that deployed workflow files are frozen.
Other information:
Same file set and pattern as previous version bumps. The repeated deliveries the customer saw are the activity's normal retries; the payload being
[]on every attempt was the actual bug.QA
DISABLE_SSRF_PROTECTION=true; a cloudflared/ngrok tunnel works).[].postWorkflowV112and that older in-flight runs still complete.Tested end to end against a real connected Telegram channel (as the v1.1.1 cut of this fix; v1.1.2 is the identical 3-line change re-applied on top of the deployed v1.1.1): drove the old and fixed workflows on identical posts; the pre-fix run delivered
[]to the listener and the post-fix run delivered the full post JSON. Also verified via Temporal workflow history that thesendWebhooksinput changed from the platform id to the DB post id, and that backend + orchestrator builds pass after the staging merge.Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;
🤖 Generated with Claude Code
https://claude.ai/code/session_01JkiuuMQcG1QRkbagfSkBtb