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

[Worker] - Adjust Monthly Upload Limitations Based on Tier #639

Closed
Tracked by #604
adrian-codecov opened this issue Oct 4, 2023 · 0 comments
Closed
Tracked by #604

[Worker] - Adjust Monthly Upload Limitations Based on Tier #639

adrian-codecov opened this issue Oct 4, 2023 · 0 comments
Assignees
Labels

Comments

@adrian-codecov
Copy link

adrian-codecov commented Oct 4, 2023

Codecov has the notion of upload limitation for certain plans, historically only users-basic, for a flat value of 250 rolling upload limitations. With the introduction of the team plan, we want to ensure we make a dynamic selection of monthly uploads to applicable plans.

This change involves mostly adjusting logic in this file https://github.com/codecov/worker/blob/main/services/decoration.py#L157 and revolving logic to determine upload limitation taking into account the plan name. There's not a plan representation object equivalent to the one we have in API, so I'd suggest creating some basic dictionary with plans that can have upload limitations and they're respective values, something like

plans_with_upload_limitations = {
  users-basic: 250
  users-teamm: 2500
  users-teamy: 2500
}

And using some logic along the lines of if plan in plans_with_upload_limitations then upload_limitations = plans_with_upload_limitations[plan_name] and ensure tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants