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 db_session to ActivateAccountUserTask #563

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

michelletran-codecov
Copy link
Contributor

This field is needed to run_impl properly. See Sentry error: https://codecov.sentry.io/share/issue/62a996975a424922b6ceb9d0d1b91e47/

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

codecov-qa bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.52%. Comparing base (e9abbde) to head (249e227).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #563   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files         425      425           
  Lines       35488    35495    +7     
=======================================
+ Hits        34608    34615    +7     
  Misses        880      880           
Flag Coverage Δ
integration 97.52% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.52% <100.00%> (+<0.01%) ⬆️
unit 97.52% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.59% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.75% <ø> (ø)
Files Coverage Δ
tasks/activate_account_user.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_activate_account_user.py 100.00% <100.00%> (ø)

@codecov-notifications
Copy link

codecov-notifications bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #563   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files         425      425           
  Lines       35488    35495    +7     
=======================================
+ Hits        34608    34615    +7     
  Misses        880      880           
Flag Coverage Δ
integration 97.52% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.52% <100.00%> (+<0.01%) ⬆️
unit 97.52% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.59% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.75% <ø> (ø)
Files Coverage Δ
tasks/activate_account_user.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_activate_account_user.py 100.00% <100.00%> (ø)

Copy link

codecov-public-qa bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.52%. Comparing base (e9abbde) to head (249e227).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #563   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files         425      425           
  Lines       35488    35495    +7     
=======================================
+ Hits        34608    34615    +7     
  Misses        880      880           
Flag Coverage Δ
integration 97.52% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.52% <100.00%> (+<0.01%) ⬆️
unit 97.52% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.59% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.75% <ø> (ø)
Files Coverage Δ
tasks/activate_account_user.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_activate_account_user.py 100.00% <100.00%> (ø)

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.55%. Comparing base (e9abbde) to head (249e227).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #563   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         458      458           
  Lines       36560    36567    +7     
=======================================
+ Hits        35666    35673    +7     
  Misses        894      894           
Flag Coverage Δ
integration 97.52% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.52% <100.00%> (+<0.01%) ⬆️
unit 97.52% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.68% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.75% <ø> (ø)
Files Coverage Δ
tasks/activate_account_user.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_activate_account_user.py 100.00% <100.00%> (ø)

This change has been scanned for critical changes. Learn more

@michelletran-codecov michelletran-codecov requested a review from a team July 17, 2024 17:15
@@ -12,6 +13,7 @@
class ActivateAccountUserTask(BaseCodecovTask, name=activate_account_user_task_name):
def run_impl(
self,
_db_session: Session,
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially dumb question, but does adding a session in any way affect any transaction related things? Like will the BaseCodecovTask use the session in any way that could silently interfere with anything within the task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a dumb question! I don't think it will affect the transaction because the session is created but isn't used. So there's nothing in an uncommitted transaction to cause issues. AFAICT, the ProcessFlakesTask also creates a session without using it, and there hasn't been any trouble with Django DB access.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool cool, yeah that makes sense, even if it were to commit something in the parent class, there's nothing in this task itself that's using the session itself

@michelletran-codecov michelletran-codecov added this pull request to the merge queue Jul 17, 2024
Merged via the queue into main with commit 39f7233 Jul 17, 2024
29 of 30 checks passed
@michelletran-codecov michelletran-codecov deleted the fix_account_user_bug branch July 17, 2024 18:43
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.

3 participants