Skip to content

fix: restore the response envelope Amplitude's production parser reads - #8402

Open
gagantrivedi wants to merge 2 commits into
mainfrom
fix/amplitude-list-response-envelope
Open

fix: restore the response envelope Amplitude's production parser reads#8402
gagantrivedi wants to merge 2 commits into
mainfrom
fix/amplitude-list-response-envelope

Conversation

@gagantrivedi

Copy link
Copy Markdown
Member
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Reverts the wrong half of #8400. Staging verification shows Amplitude applies the portal-configured ID path (response.list_id) on both sides, but to different objects: the Testing tab wraps our body in a {"response": ...} envelope first, while the production worker reads the raw body. The create response therefore carries the ID both flat and nested:

{"list_id": X, "response": {"list_id": X}}

The camelCase listId copy from #8399 was never read by either side and stays gone.

How did you test this code?

Unit tests assert both copies. Verified against staging: the production sync failed with only listId present and succeeded when the nested response.list_id copy existed.

@gagantrivedi
gagantrivedi requested review from a team as code owners August 28, 2026 12:04
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Aug 28, 2026 12:06pm
flagsmith-frontend-preview Ignored Ignored Preview Aug 28, 2026 12:06pm
flagsmith-frontend-staging Ignored Ignored Preview Aug 28, 2026 12:06pm

Request Review

@gagantrivedi
gagantrivedi requested review from khvn26 and removed request for a team August 28, 2026 12:04
@github-actions github-actions Bot added api Issue related to the REST API docs Documentation updates labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ba43d638-f332-4dec-9251-60b1d1ee564f

📥 Commits

Reviewing files that changed from the base of the PR and between a84ba89 and dcd30fb.

📒 Files selected for processing (1)
  • openapi.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The Amplitude create response schema replaces listId with list_id at the root and inside response. The endpoint returns the cohort UUID in both locations. The OpenAPI schema defines both fields as required. Unit tests use the renamed field and verify both values. The observability documentation updates the source line for the rejected webhook event.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to dcd30

This localized change restores the response fields required by Amplitude and adds matching test coverage; no actionable merge-blocking risk remains after normal checks and review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added fix and removed docs Documentation updates labels Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-8402 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-8402 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-8402 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-8402 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8402 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8402 Finished ✅ Results

@flagsmith-engineering
flagsmith-engineering Bot requested a review from a team as a code owner August 28, 2026 12:06
@github-actions github-actions Bot added the docs Documentation updates label Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19920 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.9 seconds
commit  a84ba89
info  🔄 Run: #19920 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #19920 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  10.5 seconds
commit  a84ba89
info  🔄 Run: #19920 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #19920 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.7 seconds
commit  a84ba89
info  🔄 Run: #19920 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #19921 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40 seconds
commit  dcd30fb
info  🔄 Run: #19921 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19920 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.5 seconds
commit  a84ba89
info  🔄 Run: #19920 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19921 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.3 seconds
commit  dcd30fb
info  🔄 Run: #19921 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (e252a36) to head (dcd30fb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8402   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files        1621     1621           
  Lines       66102    66104    +2     
=======================================
+ Hits        65318    65320    +2     
  Misses        784      784           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

api Issue related to the REST API docs Documentation updates fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants