Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow unknown attrs from cb json meta #4509

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Aug 19, 2024

Changes

This PR fixes an issue where adding elements to the metadata in a chargebee plan / add on causes an unhandled exception.

I'd like to move the SubscriptionMetadata classes to e.g. pydantic, but this is a quick solution to avoid too many conflicts with my other PR - #4433.

Resolves this sentry issue.

How did you test this code?

Updated an existing test to include an unknown key for both a plan and an addon.

@matthewelwell matthewelwell marked this pull request as ready for review August 19, 2024 10:06
@matthewelwell matthewelwell requested a review from a team as a code owner August 19, 2024 10:06
@matthewelwell matthewelwell requested review from zachaysan and removed request for a team August 19, 2024 10:06
Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Aug 19, 2024 10:08am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 10:08am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 10:08am

@github-actions github-actions bot added the api Issue related to the REST API label Aug 19, 2024
Copy link
Contributor

github-actions bot commented Aug 19, 2024

Docker builds report

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

Copy link
Contributor

github-actions bot commented Aug 19, 2024

Uffizzi Preview deployment-55340 was deleted.

@matthewelwell matthewelwell changed the title Allow unknown attrs from cb json meta fix: allow unknown attrs from cb json meta Aug 19, 2024
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.92%. Comparing base (174d437) to head (15cf6c5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4509   +/-   ##
=======================================
  Coverage   96.92%   96.92%           
=======================================
  Files        1178     1178           
  Lines       39490    39492    +2     
=======================================
+ Hits        38276    38278    +2     
  Misses       1214     1214           

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

@matthewelwell matthewelwell added this pull request to the merge queue Aug 19, 2024
Merged via the queue into main with commit 1e3888a Aug 19, 2024
35 checks passed
@matthewelwell matthewelwell deleted the fix/allow-unknown-attrs-from-cb-meta branch August 19, 2024 12:52
Copy link

sentry-io bot commented Aug 19, 2024

Sentry Issue: FLAGSMITH-API-4XK

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants