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: Some uncaught exceptions related to billing #604

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Jun 5, 2024

Purpose/Motivation

Want to prevent some noisy sentry exceptions from occurring if we can help it. This PR fixes the following:

  • Subscription Deletion error when user subscription has already been deleted. This may occur when a webhook gets retried after a subscription has already been deleted off a user
  • Subscription schedule created/updated failing to grab obo_organization:
    • This occurs when we're pulling obo_organization off metadata in an unsafe way. We want to use .get() to protect in the event it is null.
    • Because those are only being used in the logs, I'm not too worried about any unintended behavior.

Sentry Links:
https://codecov.sentry.io/issues/4271768168/?project=5215654&project=4165036&project=4505562661847040&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+billing&referrer=issue-stream&statsPeriod=14d&stream_index=3&utc=true
https://codecov.sentry.io/issues/5420354835/?project=5215654&project=4165036&project=4505562661847040&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+billing&referrer=issue-stream&statsPeriod=14d&stream_index=5&utc=true
https://codecov.sentry.io/issues/5420354806/?project=5215654&project=4165036&project=4505562661847040&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+billing&referrer=issue-stream&statsPeriod=14d&stream_index=6&utc=true

Links to relevant tickets

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@codecov-notifications
Copy link

codecov-notifications bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.53%. Comparing base (557388d) to head (9f50eb2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   91.51%   91.53%   +0.02%     
==========================================
  Files         612      615       +3     
  Lines       16282    16323      +41     
==========================================
+ Hits        14901    14942      +41     
  Misses       1381     1381              
Flag Coverage Δ
unit 91.53% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.53% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
billing/views.py 97.01% <100.00%> (+0.06%) ⬆️

... and 6 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

codecov-public-qa bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.53%. Comparing base (557388d) to head (9f50eb2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   91.51%   91.53%   +0.02%     
==========================================
  Files         612      615       +3     
  Lines       16282    16323      +41     
==========================================
+ Hits        14901    14942      +41     
  Misses       1381     1381              
Flag Coverage Δ
unit 91.53% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.53% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
billing/views.py 97.01% <100.00%> (+0.06%) ⬆️

... and 6 files with indirect coverage changes

Impacted file tree graph

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (557388d) to head (9f50eb2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff                @@
##               main       #604        +/-   ##
================================================
+ Coverage   95.90000   95.92000   +0.02000     
================================================
  Files           790        793         +3     
  Lines         17600      17664        +64     
================================================
+ Hits          16880      16944        +64     
  Misses          720        720                
Flag Coverage Δ
unit 91.53% <100.00%> (+0.02%) ⬆️
unit-latest-uploader 91.53% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ajay-sentry ajay-sentry added this pull request to the merge queue Jun 5, 2024
Merged via the queue into main with commit 86fd9b1 Jun 5, 2024
21 of 22 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/some-billing-error-cleanup branch June 5, 2024 17:21
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.

None yet

2 participants