Skip to content

fix: abort non-retryable Klaviyo upload errors instead of retrying#7085

Open
shekhar-rudder wants to merge 1 commit into
masterfrom
fix/INT-6539-klaviyo-abort-non-retryable-errors
Open

fix: abort non-retryable Klaviyo upload errors instead of retrying#7085
shekhar-rudder wants to merge 1 commit into
masterfrom
fix/INT-6539-klaviyo-abort-non-retryable-errors

Conversation

@shekhar-rudder

Copy link
Copy Markdown
Member

Summary

  • Klaviyo 4xx errors (except 429) were incorrectly marked as retryable (FailedJobIDs), causing invalid profiles to retry indefinitely, fill batch slots, and push valid events into "prescribed limit" overflow until they were permanently aborted
  • UploadProfiles now captures the HTTP status code from Klaviyo's response
  • Upload routes errors by retryability: 4xx (except 429) → AbortJobIDs (terminal), 429/5xx/network errors → FailedJobIDs (retryable)
  • FailedReason is now populated in the upload output for better observability

Test plan

  • TestUpload/Successful_Upload — all jobs import successfully, no failures
  • TestUpload/Unsuccessful_Upload — nil response (network error) → jobs retried with FailedReason
  • TestUpload/UploadThreeChunksWithMixedFailures — chunk 1 gets 429 (retried), chunk 2 gets 400 (aborted), chunk 3 succeeds — validates both paths in single test
  • Existing Poll and GetUploadStats tests unaffected

Linear ticket

INT-6539

🤖 Generated with Claude Code

@shekhar-rudder shekhar-rudder force-pushed the fix/INT-6539-klaviyo-abort-non-retryable-errors branch from be160f6 to 97b3ba5 Compare June 12, 2026 13:16
@shekhar-rudder shekhar-rudder requested review from ItsSudip and achettyiitr and removed request for ItsSudip June 12, 2026 13:19
…NT-6539)

Klaviyo 4xx errors (except 429) were incorrectly marked as retryable,
causing invalid profiles to retry indefinitely, fill batch slots, and
push valid events into "prescribed limit" overflow until they were
permanently aborted.

Now 4xx (except 429) errors are routed to AbortJobIDs, while 429/5xx
and network errors remain in FailedJobIDs for retry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shekhar-rudder shekhar-rudder force-pushed the fix/INT-6539-klaviyo-abort-non-retryable-errors branch from 97b3ba5 to e22441f Compare June 12, 2026 13:26
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.92%. Comparing base (ff02fe8) to head (e22441f).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...destinationmanager/klaviyobulkupload/apiService.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7085      +/-   ##
==========================================
+ Coverage   79.88%   79.92%   +0.04%     
==========================================
  Files         583      583              
  Lines       65088    65099      +11     
==========================================
+ Hits        51993    52031      +38     
+ Misses      10001     9970      -31     
- Partials     3094     3098       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant