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: Activate user who fired trial on trial expiration #101

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

RulaKhaled
Copy link
Contributor

On free plans, we offer 1 seat and we'd want to keep user who fired the trial activated post the trial.

codecov/engineering-team#406

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.

@RulaKhaled RulaKhaled marked this pull request as draft September 18, 2023 11:31
@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #101 (50e7841) into main (3004a63) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #101   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files         364      364           
  Lines       26837    26850   +13     
=======================================
+ Hits        26427    26440   +13     
  Misses        410      410           
Flag Coverage Δ
integration 98.43% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.43% <100.00%> (+<0.01%) ⬆️
onlysomelabels 98.47% <100.00%> (+<0.01%) ⬆️
unit 98.43% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 97.10% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.22% <100.00%> (+<0.01%) ⬆️
Files Changed Coverage Δ
database/models/core.py 97.36% <100.00%> (+<0.01%) ⬆️
database/tests/factories/core.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_trial_expiration.py 100.00% <100.00%> (ø)
tasks/trial_expiration.py 100.00% <100.00%> (ø)
Related Entrypoints
run/app.tasks.plan.TrialExpirationTask

@codecov-staging
Copy link

codecov-staging bot commented Sep 18, 2023

Codecov Report

Merging #101 (50e7841) into main (3004a63) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #101   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files         343      343           
  Lines       26665    26678   +13     
=======================================
+ Hits        26248    26261   +13     
  Misses        417      417           
Flag Coverage Δ
integration 98.43% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.43% <100.00%> (+<0.01%) ⬆️
unit 98.43% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 97.01% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.22% <100.00%> (+<0.01%) ⬆️

@codecov-public-qa
Copy link

codecov-public-qa bot commented Sep 18, 2023

Codecov Report

Merging #101 (50e7841) into main (3004a63) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #101   +/-   ##
=======================================
  Coverage   98.43%   98.43%           
=======================================
  Files         343      343           
  Lines       26665    26678   +13     
=======================================
+ Hits        26248    26261   +13     
  Misses        417      417           
Flag Coverage Δ
integration 98.43% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.43% <100.00%> (+<0.01%) ⬆️
unit 98.43% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 97.01% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.22% <100.00%> (+<0.01%) ⬆️
Files Changed Coverage Δ
database/models/core.py 97.36% <100.00%> (+<0.01%) ⬆️
database/tests/factories/core.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_trial_expiration.py 100.00% <100.00%> (ø)
tasks/trial_expiration.py 100.00% <100.00%> (ø)

@RulaKhaled RulaKhaled marked this pull request as ready for review September 20, 2023 16:25
@@ -73,6 +73,7 @@ class Owner(CodecovBaseModel):
trial_start_date = Column(types.DateTime, server_default=FetchedValue())
trial_end_date = Column(types.DateTime, server_default=FetchedValue())
trial_status = Column(types.Text, server_default=FetchedValue())
trial_fired_by = Column(types.Integer, server_default=FetchedValue())
Copy link
Contributor

Choose a reason for hiding this comment

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

is this column already in the database?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this value is set from the API side when the trial is activated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes yes

@RulaKhaled RulaKhaled merged commit b28a94f into main Sep 25, 2023
31 checks passed
@RulaKhaled RulaKhaled deleted the trial_fired_by branch September 25, 2023 10:08
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.

2 participants