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

Add customer intent to Users type and SaveTermsAgreement mutation #393

Merged
merged 18 commits into from
Feb 20, 2024

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Feb 12, 2024

Purpose/Motivation

What is the feature? Why is this being done?

Following up from #390, updates the SaveTermsAgreement to read the customer intent value from the front end. It should always be provided.

Additionally, add a resolver to fetch the intent on the User object.

Links to relevant tickets

This closes codecov/engineering-team#1090

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.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1196e21) 95.76% compared to head (d5c220e) 95.76%.
Report is 3 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

Additional details and impacted files
@@          Coverage Diff           @@
##            main    #393    +/-   ##
======================================
  Coverage   95.76   95.76            
======================================
  Files        752     752            
  Lines      17096   17240   +144     
======================================
+ Hits       16371   16509   +138     
- Misses       725     731     +6     
Flag Coverage Δ
unit ?
unit-latest-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.

@@ -48,6 +57,7 @@ def execute(self, input):
business_email=input.get("businessEmail"),
terms_agreement=input.get("termsAgreement"),
marketing_consent=input.get("marketingConsent"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah this one is weird 😂 we're not using it, @RulaKhaled pinging you since you were the last to work on this, do we know what's the intended use for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

We used to use this to decide if user signs up for marketing consent or not, to decide if we should opt user in for emails

Copy link
Contributor

Choose a reason for hiding this comment

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

im not sure if we use it anymore though

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth following up with them, not a blocker for this PR though

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we followed up here but just pinging in case we haven't and we want to

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title Update SaveTermsAgreement Mutation Add customer intent to Users type and SaveTermsAgreement mutation Feb 14, 2024
@codecov-staging
Copy link

codecov-staging bot commented Feb 14, 2024

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 Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b59d61e) 96.08% compared to head (38b9356) 96.08%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #393   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         637      637           
  Lines       16589    16598    +9     
=======================================
+ Hits        15939    15948    +9     
  Misses        650      650           
Flag Coverage Δ
unit 96.08% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.08% <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.

Copy link

codecov-public-qa bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b59d61e) 96.08% compared to head (38b9356) 96.08%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #393   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         637      637           
  Lines       16589    16598    +9     
=======================================
+ Hits        15939    15948    +9     
  Misses        650      650           
Flag Coverage Δ
unit 96.08% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 96.08% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
...commands/owner/interactors/save_terms_agreement.py 100.00% <100.00%> (ø)
codecov_auth/tests/factories.py 100.00% <100.00%> (ø)
graphql_api/types/user/user.py 100.00% <100.00%> (ø)

Impacted file tree graph

@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review February 14, 2024 18:06
@rohitvinnakota-codecov rohitvinnakota-codecov requested a review from a team as a code owner February 14, 2024 18:06
@rohitvinnakota-codecov rohitvinnakota-codecov force-pushed the rvinnakota/update-terms-mutation branch 3 times, most recently from 064a890 to 6ae5d70 Compare February 15, 2024 18:25
@@ -22,12 +23,20 @@ class SaveTermsAgreementInteractor(BaseInteractor):
def validate(self, input: TermsAgreementInput):
if input.terms_agreement is None:
raise ValidationError("Terms of agreement cannot be null")
if input.customer_intent and input.customer_intent not in [
"Business",
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why we don't lowercase/uppercase the input to follow what we have in the DB?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am validating to keep parity with the choices here.

@rohitvinnakota-codecov rohitvinnakota-codecov merged commit cdab422 into main Feb 20, 2024
20 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/update-terms-mutation branch February 20, 2024 20:14
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.

[API] - Adjust the saveTermsAgreement mutation to accept the customer_intent value from the client
5 participants