Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Conversation

@ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Feb 11, 2025

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.

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):
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajay-sentry ajay-sentry added this pull request to the merge queue Feb 11, 2025
Merged via the queue into main with commit 016a756 Feb 11, 2025
6 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/remove-billing-plan branch February 11, 2025 22:53
@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.94%. Comparing base (33b9af9) to head (e26d49c).
Report is 1 commits behind head on main.

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     
Flag Coverage Δ
shared-docker-uploader ?

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.

@JerrySentry JerrySentry restored the Ajay/remove-billing-plan branch March 11, 2025 21:06
JerrySentry added a commit that referenced this pull request Mar 11, 2025
@overwatch-beta
Copy link

overwatch-beta bot commented Mar 11, 2025

✅ Sentry found no issues in your recent changes ✅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TechDebt] Remove Billing Plan References in Shared

3 participants