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

feat: Modify billing for Team plan (#637) #225

Merged
merged 26 commits into from
Nov 10, 2023
Merged

feat: Modify billing for Team plan (#637) #225

merged 26 commits into from
Nov 10, 2023

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Nov 2, 2023

Purpose/Motivation

What is the feature? Why is this being done?

  • When signing up to a new paid plan, it will have Team plan choice, and checks for plan user limit.
  • Also update limit from 1000 to 2500 and refactor a variable name
  • Add isPublic option to measurements filter
  • Change marketing name of Pro Team to Pro

Links to relevant tickets

codecov/engineering-team#637
codecov/engineering-team#786
codecov/engineering-team#788

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-staging
Copy link

codecov-staging bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8d411a5) 95.67% compared to head (dfbf514) 95.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   95.67%   95.69%   +0.01%     
==========================================
  Files         605      605              
  Lines       15482    15505      +23     
==========================================
+ Hits        14813    14837      +24     
+ Misses        669      668       -1     
Flag Coverage Δ
unit 95.69% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 95.69% <100.00%> (+0.01%) ⬆️

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.

billing/helpers.py Outdated Show resolved Hide resolved
Copy link

codecov-public-qa bot commented Nov 2, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@8d411a5). Click here to learn what that means.
The diff coverage is 100.00%.

❗ Current head 73ca159 differs from pull request most recent head dfbf514. Consider uploading reports for the commit dfbf514 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #225   +/-   ##
=======================================
  Coverage        ?   95.61%           
=======================================
  Files           ?      602           
  Lines           ?    15310           
  Branches        ?        0           
=======================================
  Hits            ?    14638           
  Misses          ?      672           
  Partials        ?        0           
Flag Coverage Δ
unit 95.61% <100.00%> (?)
unit-latest-uploader 95.61% <100.00%> (?)

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

Files Coverage Δ
api/internal/owner/serializers.py 99.00% <100.00%> (ø)
billing/helpers.py 100.00% <100.00%> (ø)
billing/views.py 94.57% <100.00%> (ø)
codecov/settings_dev.py 100.00% <ø> (ø)
codecov/settings_prod.py 0.00% <ø> (ø)
codecov/settings_staging.py 0.00% <ø> (ø)
plan/constants.py 100.00% <100.00%> (ø)
services/billing.py 92.59% <100.00%> (ø)

Impacted file tree graph

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #225 (34093a3) into main (39d2b2c) will not change coverage.
The diff coverage is 90.90%.

@@          Coverage Diff          @@
##            main    #225   +/-   ##
=====================================
  Coverage   95.51   95.51           
=====================================
  Files        716     716           
  Lines      15713   15716    +3     
=====================================
+ Hits       15008   15010    +2     
- Misses       705     706    +1     
Flag Coverage Δ
unit 95.60% <90.90%> (-0.01%) ⬇️
unit-latest-uploader 95.60% <90.90%> (-0.01%) ⬇️

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

Files Coverage Δ
billing/helpers.py 100.00% <100.00%> (ø)
billing/views.py 94.57% <100.00%> (ø)
codecov/settings_dev.py 100.00% <ø> (ø)
codecov/settings_prod.py 0.00% <ø> (ø)
codecov/settings_staging.py 0.00% <ø> (ø)
plan/constants.py 100.00% <100.00%> (ø)
services/billing.py 92.59% <100.00%> (ø)
api/internal/owner/serializers.py 99.50% <80.00%> (-0.50%) ⬇️

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #225 (dfbf514) into main (8d411a5) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            main    #225     +/-   ##
=======================================
+ Coverage   95.58   95.59   +0.01     
=======================================
  Files        719     719             
  Lines      15888   15912     +24     
=======================================
+ Hits       15186   15211     +25     
+ Misses       702     701      -1     
Flag Coverage Δ
unit 95.69% <100.00%> (?)
unit-latest-uploader 95.69% <100.00%> (?)

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

Files Coverage Δ
api/internal/owner/serializers.py 100.00% <100.00%> (ø)
api/internal/owner/views.py 98.82% <100.00%> (+1.07%) ⬆️
api/internal/urls.py 97.22% <ø> (-0.15%) ⬇️
billing/helpers.py 100.00% <100.00%> (ø)
billing/views.py 94.57% <100.00%> (ø)
codecov/settings_dev.py 100.00% <ø> (ø)
codecov/settings_prod.py 0.00% <ø> (ø)
codecov/settings_staging.py 0.00% <ø> (ø)
graphql_api/types/owner/owner.py 92.24% <100.00%> (+0.18%) ⬆️
plan/constants.py 100.00% <100.00%> (ø)
... and 3 more

@JerrySentry
Copy link
Contributor Author

JerrySentry commented Nov 7, 2023

@JerrySentry JerrySentry changed the title [WIP] feat: Modify billing for Team plan feat: Modify billing for Team plan Nov 7, 2023
@JerrySentry JerrySentry changed the title feat: Modify billing for Team plan feat: Modify billing for Team plan (#637) Nov 8, 2023
Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Great man thanks! Is every test you made here https://www.notion.so/sentry/Testing-Team-Plan-963236763fc54b0c837279cca3b7d395 represented in code?

@JerrySentry
Copy link
Contributor Author

Great man thanks! Is every test you made here https://www.notion.so/sentry/Testing-Team-Plan-963236763fc54b0c837279cca3b7d395 represented in code?

I re-tested all the scenarios on that table, though there is an interesting scenario I comment on in the table.
https://www.notion.so/Testing-Team-Plan-963236763fc54b0c837279cca3b7d395?d=dab40afdb78a4850a1c64263b3bcbeb4&pvs=4#3e85dc26091e4fa5b2e2b3b6582b0617
Do you think that's how it should be?

plan/constants.py Outdated Show resolved Hide resolved
plan/service.py Outdated Show resolved Hide resolved
@JerrySentry JerrySentry merged commit 4c398ae into main Nov 10, 2023
16 of 17 checks passed
@JerrySentry JerrySentry deleted the api_637 branch November 10, 2023 13:36
trent-codecov added a commit that referenced this pull request Nov 14, 2023
* Test ats run (#229)

* Test ats run

* Test ats run

* Test ats run

* Test ats run

* Test ats run

* Test ats run

* Test ats run

* Test ats run

* feat: Emit sync repo message to Shelter on repo update (#215)

* feat: add prometheus instrumentation to requests, db accesses, and models (#202)

* feat: add prometheus instrumentation to requests, db accesses, and models

* switch to multiprocessing mode

* add nullchecking for gunicorn worker/pid

* only call multiprocess.mark_process_dead if prometheus multiprocess is enabled

* add comment about public prometheus route

---------

Co-authored-by: Trent Schmidt <trent@codecov.io>

* fix: make GraphQL types matches nullability with django models (#220)


Audit all the GraphQL API types to make sure that the nullabilitity (nullable or not nullable) matches that of the database columns (via Django ORM).

* feat: Add index on pulls (repoid, id) (#217)

* feat: Add index on pulls (repoid, id)

* Fix migration conflict

* Fix XSS vulnerability by removing ref_type from Response (#211)

* fix: available plans for users while trialing (#731) (#230)


Fix a bug where a user while trialing does not have Team plans available to upgrade to.
This happens because while trialing we set plan_user_count to 1000 while trialing, so we will check plan_activated_users while user is trialing.

* fix: Skip login if GitHub OAuth does not return access_token (#236)

* Send github oauth access token expiry with cookie (#237)

* initial commit

* remove method

* lint

* sort imports

* reintroduce variable

* Update small badge (#238)

* chore: Moves the small badge mask over to leave space for 100% while still looking good with 2 digits

* fix small badge expected svg util

* fix small badge tests

* fix: Upgrade Django version to fix security vulnerabilities (#239)


Fixes Django security vulnerabilities by updating to the fix version:

Django Denial-of-service in django.utils.text.Truncator
Django potential denial of service vulnerability in UsernameField on Windows
Django Denial of service vulnerability in django.utils.encoding.uri_to_iri

* feat: Modify billing for Team plan (#637) (#225)


- When signing up to a new paid plan, it will have Team plan choice, and checks for plan user limit.
- Also update limit from 1000 to 2500 and refactor a variable name
- Add isPublic option to measurements filter
- Change marketing name of Pro Team to Pro

* fix: Handle Shelter storage paths in upload download handler (#234)

* fix: Handle shetler storage paths in upload download handler

* fix: Handle shetler storage paths in upload download handler

* Add test for shelter storage path

* Updating workflows (#242)

* Fix urllib and opentelemetry-instrumentation dependencies (#213)

* Update urllib3 dependency
* Fix opentelementry-instrumentation dependency

Fixes: codecov/internal-issues#103
Fixes: codecov/internal-issues#104

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>

* Make migration info log less confusing (#221)

Clearly state whether migrations failed or succeded.

Co-authored-by: Trent Schmidt <trent@codecov.io>

* Use alpine 3.18

---------

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Co-authored-by: scott-codecov <scott@codecov.io>
Co-authored-by: matt-codecov <137832199+matt-codecov@users.noreply.github.com>
Co-authored-by: JerrySentry <142266253+JerrySentry@users.noreply.github.com>
Co-authored-by: joseph-sentry <136376984+joseph-sentry@users.noreply.github.com>
Co-authored-by: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com>
Co-authored-by: Terry <87824812+terry-codecov@users.noreply.github.com>
Co-authored-by: Andreas Bergmeier <51448674+AndreasBergmeier6176@users.noreply.github.com>
scott-codecov added a commit that referenced this pull request Nov 17, 2023
* main:
  feat: Emit pubsub event when org token is updated (#241)
  perf: use new get_file_totals() report method for BranchContents (#252)
  feat: adjust benefits for team plan (#253)
  fix: Adjust Team plan pricing (#805) (#243)
  feat: Add Sentry user to admin panel (#702) (#232)
  metrics: update shared + add sentry traces to BranchContents GraphQL query path (#251)
  Use the same sentry version (#247)
  feat(logging): change access logging format to JSON (#249)
  Use alpine 3.18 (#245)
  fix(launchscripts): delete contents of prometheus multiproc dir, not dir itself (#244)
  Make migration info log less confusing (#221)
  Fix urllib and opentelemetry-instrumentation dependencies (#213)
  Updating workflows (#242)
  fix: Handle Shelter storage paths in upload download handler (#234)
  feat: Modify billing for Team plan (#637) (#225)
  fix: Upgrade Django version to fix security vulnerabilities (#239)
  Update small badge (#238)
  Send github oauth access token expiry with cookie (#237)
  fix: Skip login if GitHub OAuth does not return access_token (#236)
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

3 participants