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

Make uses_invoice field on Owner non-nullable #92

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

joseph-sentry
Copy link
Contributor

@joseph-sentry joseph-sentry commented Aug 28, 2023

Purpose/Motivation

This is a migration to create the uses_invoice field in order to keep track of which users are using invoice billing.

Links to relevant tickets

Fixes: codecov/engineering-team#131

What does this PR do?

  • Create migration to create uses_invoice nullable column in Owner table
  • Create migration to set default of uses_invoice column to false
  • Create migration to make uses_invoice field non-nullable

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #92 (a5e06a4) into main (441c49b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            main     #92     +/-   ##
=======================================
+ Coverage   95.28   95.29   +0.01     
=======================================
  Files        698     701      +3     
  Lines      14860   14876     +16     
=======================================
+ Hits       14159   14175     +16     
  Misses       701     701             
Flag Coverage Δ
unit 95.21% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 95.21% <100.00%> (+0.01%) ⬆️

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

Files Changed Coverage Δ
codecov_auth/migrations/0037_owner_uses_invoice.py 100.00% <100.00%> (ø)
...v_auth/migrations/0038_alter_owner_uses_invoice.py 100.00% <100.00%> (ø)
...v_auth/migrations/0039_alter_owner_uses_invoice.py 100.00% <100.00%> (ø)
codecov_auth/models.py 98.85% <100.00%> (+<0.01%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Sep 5, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
codecov_auth/migrations/0037_owner_uses_invoice.py 100.00%
...v_auth/migrations/0038_alter_owner_uses_invoice.py 100.00%
...v_auth/migrations/0039_alter_owner_uses_invoice.py 100.00%
codecov_auth/models.py 100.00%

📢 Thoughts on this report? Let us know!.

@joseph-sentry joseph-sentry marked this pull request as ready for review September 5, 2023 18:30
Copy link
Contributor

@scott-codecov scott-codecov left a comment

Choose a reason for hiding this comment

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

Just a note/reminder that since the code depends on the column existing (since it was defined in the model) make sure that these risky migrations are run before merging/deploying this PR.

@joseph-sentry
Copy link
Contributor Author

Just a note/reminder that since the code depends on the column existing (since it was defined in the model) make sure that these risky migrations are run before merging/deploying this PR.

Yes, the risky migrations have been run already!

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
@joseph-sentry joseph-sentry merged commit 1625024 into main Sep 6, 2023
9 of 10 checks passed
@joseph-sentry joseph-sentry deleted the joseph/invoice-checkbox-3 branch September 6, 2023 17:38
trent-codecov added a commit that referenced this pull request Sep 7, 2023
* ImportError: cannot import name should_write_data_to_storage_config_c… (#104)

* ImportError: cannot import name should_write_data_to_storage_config_check

* Update VERSION

* feat: Django command to enqueue commit backfill tasks (#102)

* feat: Django command to enqueue commit backfill tasks

* Fetch only commit id and commitid

* chore: Update Sentry config keys to be more consistent with other services (#103)

* Fix/config error enterprise (#107)

* Fix config error

* Fix config error

* Add RiskyAlterField to utils/migrations (#93)

* Add RiskyAlterField to utils/migrations

* Remove duplicate RiskyAddField class

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

* feat: support gh refresh tokens (#85)

Depends on codecov/shared#27


Adds support for github app refresh tokens

only include token refresh callback if token is from owner

* Make uses_invoice field on Owner(#92)

* Add uses_invoice field to Owner using RiskyAddField
* Set default to False for uses_invoice field on Owner
* Make uses_invoice field in Owner non-nullable
* Fix uses_invoice column migrations

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

* fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)

* Add 23.9.5 migration

* update to handle to redirects (#113)

* Adjust donwload_url link (#115)

* Add changes for monthly uploads to account for trialing customer (#101)

* Add changes for monthly uploads to account for trialing customer

* Adjust filtering logic when trialing

* Add 23.9.5 migration

---------

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Co-authored-by: scott-codecov <scott@codecov.io>
Co-authored-by: joseph-sentry <136376984+joseph-sentry@users.noreply.github.com>
Co-authored-by: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com>
Co-authored-by: Rula Abuhasna <91732700+RulaKhaled@users.noreply.github.com>
Co-authored-by: Adrian <adrian@codecov.io>
trent-codecov added a commit that referenced this pull request Sep 7, 2023
* ImportError: cannot import name should_write_data_to_storage_config_c… (#104)

* ImportError: cannot import name should_write_data_to_storage_config_check

* Update VERSION

* feat: Django command to enqueue commit backfill tasks (#102)

* feat: Django command to enqueue commit backfill tasks

* Fetch only commit id and commitid

* chore: Update Sentry config keys to be more consistent with other services (#103)

* Fix/config error enterprise (#107)

* Fix config error

* Fix config error

* Add RiskyAlterField to utils/migrations (#93)

* Add RiskyAlterField to utils/migrations

* Remove duplicate RiskyAddField class

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

* feat: support gh refresh tokens (#85)

Depends on codecov/shared#27


Adds support for github app refresh tokens

only include token refresh callback if token is from owner

* Make uses_invoice field on Owner(#92)

* Add uses_invoice field to Owner using RiskyAddField
* Set default to False for uses_invoice field on Owner
* Make uses_invoice field in Owner non-nullable
* Fix uses_invoice column migrations

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

* fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)

* Add 23.9.5 migration

* update to handle to redirects (#113)

* Adjust donwload_url link (#115)

* Add changes for monthly uploads to account for trialing customer (#101)

* Add changes for monthly uploads to account for trialing customer

* Adjust filtering logic when trialing

* Add 23.9.5 migration

---------

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Co-authored-by: scott-codecov <scott@codecov.io>
Co-authored-by: joseph-sentry <136376984+joseph-sentry@users.noreply.github.com>
Co-authored-by: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com>
Co-authored-by: Rula Abuhasna <91732700+RulaKhaled@users.noreply.github.com>
Co-authored-by: Adrian <adrian@codecov.io>
scott-codecov added a commit that referenced this pull request Sep 13, 2023
* main: (58 commits)
  Adding beginnings of GHA CI (#127)
  feat: Filter flags by flags for pathContents (#128)
  Create checkbox in Owner form in Django admin to set uses_invoice (#109)
  build(deps): bump certifi from 2020.6.20 to 2023.7.22 (#32)
  Feature/no compile (#126)
  Bump django from 4.2.2 to 4.2.3 (#42)
  Don't compile since source is available (#106)
  feat: Add firstPull resolver to GraphQL pull type (#108)
  chore: Upgrade requests and redis dependencies (#124)
  Update LICENSE (#122)
  Attempt migration (#121)
  359 adjust monthly uploads for trialled customers (#119)
  Add changes for monthly uploads to account for trialing customer (#101)
  Adjust donwload_url link (#115)
  update to handle to redirects (#113)
  fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)
  Make uses_invoice field on Owner(#92)
  feat: support gh refresh tokens (#85)
  Add RiskyAlterField to utils/migrations (#93)
  Fix/config error enterprise (#107)
  ...
scott-codecov added a commit that referenced this pull request Sep 13, 2023
* main: (58 commits)
  Adding beginnings of GHA CI (#127)
  feat: Filter flags by flags for pathContents (#128)
  Create checkbox in Owner form in Django admin to set uses_invoice (#109)
  build(deps): bump certifi from 2020.6.20 to 2023.7.22 (#32)
  Feature/no compile (#126)
  Bump django from 4.2.2 to 4.2.3 (#42)
  Don't compile since source is available (#106)
  feat: Add firstPull resolver to GraphQL pull type (#108)
  chore: Upgrade requests and redis dependencies (#124)
  Update LICENSE (#122)
  Attempt migration (#121)
  359 adjust monthly uploads for trialled customers (#119)
  Add changes for monthly uploads to account for trialing customer (#101)
  Adjust donwload_url link (#115)
  update to handle to redirects (#113)
  fix: Include impacted files with no coverage diff and no indirect changes in direct changes list (#114)
  Make uses_invoice field on Owner(#92)
  feat: support gh refresh tokens (#85)
  Add RiskyAlterField to utils/migrations (#93)
  Fix/config error enterprise (#107)
  ...
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.

Add invoice billing boolean field + admin checkbox to owners table
2 participants