CP-14164 - Backfill + normalize ATS-pointed webhooks#75
Open
bernardodsanderson wants to merge 1 commit into
Open
CP-14164 - Backfill + normalize ATS-pointed webhooks#75bernardodsanderson wants to merge 1 commit into
bernardodsanderson wants to merge 1 commit into
Conversation
What Adds a one-time, idempotent task that creates missing ATS-pointed WebhookUrls and normalizes stale ones for every Account and Partnership. Stale rows (notably the ~22 pre-existing rows missing submission.completed) are updated to the canonical event set so non-approval forms complete-sync again. Why The on-create provisioning callback only fires for records created after the CAREERPLUG_WEBHOOK_URL/SECRET env vars were set, so pre-existing DocuSeal accounts/partnerships were never covered, and migration-seeded rows carry an old event set missing submission.completed. This caused DocuSeal task completions to stop syncing to the ATS. Prod dry-run confirmed 22 stale rows (needing update), 18 accounts + 5 partnerships with no webhook (needing create), and zero URL drift. How to test DRY_RUN=1 bundle exec rake webhooks:backfill_careerplug bundle exec rake webhooks:backfill_careerplug
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.
CP-14164
What
Adds a one-time, idempotent task that creates missing ATS-pointed WebhookUrls and normalizes stale ones for every Account and Partnership. Stale rows (notably the ~22 pre-existing rows missing submission.completed) are updated to the canonical event set so non-approval forms complete-sync again.
Why
The on-create provisioning callback only fires for records created after the CAREERPLUG_WEBHOOK_URL/SECRET env vars were set, so pre-existing DocuSeal accounts/partnerships were never covered, and migration-seeded rows carry an old event set missing submission.completed. This caused DocuSeal task completions to stop syncing to the ATS. Prod dry-run confirmed 22 stale rows (needing update), 18 accounts + 5 partnerships with no webhook (needing create), and zero URL drift.
How to test
DRY_RUN=1 bundle exec rake webhooks:backfill_careerplug bundle exec rake webhooks:backfill_careerplug