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

ref: drop ownerprofile terms agreement columns #154

Merged
merged 8 commits into from
Sep 26, 2023
Merged

Conversation

JerrySentry
Copy link
Contributor

Purpose/Motivation

Remove two columns from ownerprofile table that is no longer used, current data in those columns are migrated to the new columns in the user table, though the data is not meaningful at the moment anyways until we turn on the agreements feature on the frontend.

Links to relevant tickets

codecov/engineering-team#390

What does this PR do?

  • Drop two unused columns in the DB

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 Sep 21, 2023

Codecov Report

All modified lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

@codecov-public-qa
Copy link

codecov-public-qa bot commented Sep 21, 2023

Codecov Report

Merging #154 (e3a994c) into main (944fad8) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
- Coverage   95.54%   95.45%   -0.10%     
==========================================
  Files         594      595       +1     
  Lines       14814    14821       +7     
==========================================
- Hits        14154    14147       -7     
- Misses        660      674      +14     
Flag Coverage Δ
unit 95.45% <100.00%> (-0.10%) ⬇️
unit-latest-uploader 95.45% <100.00%> (-0.10%) ⬇️

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

Files Changed Coverage Δ
...ations/0045_remove_ownerprofile_terms_agreement.py 100.00% <100.00%> (ø)
graphql_api/types/me/me.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

Impacted file tree graph

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #154 (e3a994c) into main (944fad8) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##            main    #154     +/-   ##
=======================================
+ Coverage   95.44   95.45   +0.01     
=======================================
  Files        709     710      +1     
  Lines      15214   15222      +8     
=======================================
+ Hits       14521   14529      +8     
  Misses       693     693             
Flag Coverage Δ
unit 95.51% <100.00%> (-0.03%) ⬇️
unit-latest-uploader 95.51% <100.00%> (-0.03%) ⬇️

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

Files Coverage Δ
...ations/0045_remove_ownerprofile_terms_agreement.py 100.00% <100.00%> (ø)
graphql_api/types/me/me.py 100.00% <100.00%> (ø)

@@ -1,108 +0,0 @@
from datetime import datetime
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this test for previous migration since these columns are deleted in this change anyways.

@@ -104,6 +104,8 @@ def resolve_tracking_data(current_user, _, **kwargs):
@me_bindable.field("termsAgreement")
@sync_to_async
def resolve_terms_agreement(current_owner: Owner, _, **kwargs) -> Optional[bool]:
if current_owner.user is None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently it is possible for user to be null through impersonation?

@JerrySentry JerrySentry merged commit d8acb8b into main Sep 26, 2023
20 of 23 checks passed
@JerrySentry JerrySentry deleted the api_390d_drop branch September 26, 2023 13:33
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

2 participants