-
Notifications
You must be signed in to change notification settings - Fork 10
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
ref: Remove BillingPlan enum and update references #510
Conversation
@@ -48,8 +48,8 @@ def route_tasks_based_on_user_plan(task_name: str, user_plan: str): | |||
default_task_queue = ( | |||
route(task_name) or dict(queue=BaseCeleryConfig.task_default_queue) | |||
)["queue"] | |||
billing_plan = BillingPlan.from_str(user_plan) | |||
if is_enterprise_cloud_plan(billing_plan): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does user_plan
come from PlanService? it has the logic that gets the "correct" plan if owner has GL or Account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not from plan service but rather these helpers depending on the task: https://github.com/codecov/codecov-api/blob/258b8cba496f2aeaf6a8c11ae05c8b6c2a085c8c/services/task/task_router.py#L13
which seems kinda messy but I didn't wanna unwind it more than I had to haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #510 +/- ##
==========================================
- Coverage 90.49% 89.94% -0.55%
==========================================
Files 463 324 -139
Lines 13263 9014 -4249
Branches 2116 1597 -519
==========================================
- Hits 12002 8108 -3894
+ Misses 1138 845 -293
+ Partials 123 61 -62
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
✅ Sentry found no issues in your recent changes ✅ |
This PR aims to remove the deprecated BillingPlan enum and it's associated references throughout. I double checked worker and API and didn't see either used directly there so this seemed safe to me.
One thing that I couldn't quite figure out (maybe a SQLalchemy / Django ORM thing that was messing up) was on the test_router.py file duplicating the mock_all_plans_and_tiers() call vs. having a single one at the top of the file. I tried the setupClass and different fixture stuff but couldn't get it to work, figured it's a nice to have and not a dealbreaker
Depends on codecov/codecov-api#1150
Closes codecov/engineering-team#3346
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.