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

1576 use users measurements #441

Merged
merged 10 commits into from
May 13, 2024
Merged

Conversation

adrian-codecov
Copy link
Contributor

Finally. This is the PR where we get to use the measurements partition table on worker - API one here codecov/codecov-api#539.

Basically, we're inserting upload records on the user measurements table when we insert an upload. For this repo, that happens on the Legacy endpoint where we create an upload record preemptively. We're replacing the setting/reading with the insert_user_measurements and query_user_measurements methods.

On top of that, I'm getting rid of the previous implementation/query that took ages as that's no longer needed. I'm deleting, replacing or adjusting the tests we previously used to adjust to the new implementation.

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.

@@ -328,6 +330,24 @@ def create_report_upload(
flags = normalized_arguments.get("flags")
flags = flags.split(",") if flags else []
self._attach_flags_to_upload(upload, flags)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was done here and not in the base class to only target Coverage type reports

Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.37%. Comparing base (d0c5175) to head (f4d9257).

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

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   97.37%   97.37%           
=======================================
  Files         430      430           
  Lines       34293    34299    +6     
=======================================
+ Hits        33392    33398    +6     
  Misses        901      901           
Flag Coverage Δ
integration 97.34% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.34% <100.00%> (+<0.01%) ⬆️
unit 97.34% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.60% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.50% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/decoration.py 100.00% <100.00%> (ø)
services/report/__init__.py Critical 92.23% <100.00%> (+0.10%) ⬆️
services/tests/test_decoration.py 96.99% <100.00%> (+0.06%) ⬆️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_upload_task.py 99.50% <100.00%> (+<0.01%) ⬆️

This change has been scanned for critical changes. Learn more

@codecov-notifications
Copy link

codecov-notifications bot commented May 8, 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     #441   +/-   ##
=======================================
  Coverage   97.34%   97.34%           
=======================================
  Files         399      399           
  Lines       33603    33609    +6     
=======================================
+ Hits        32711    32717    +6     
  Misses        892      892           
Flag Coverage Δ
integration 97.34% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.34% <100.00%> (+<0.01%) ⬆️
unit 97.34% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.58% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.50% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/decoration.py 100.00% <100.00%> (ø)
services/report/__init__.py 92.22% <100.00%> (+0.10%) ⬆️
services/tests/test_decoration.py 96.99% <100.00%> (+0.06%) ⬆️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_upload_task.py 99.49% <100.00%> (+<0.01%) ⬆️

@codecov-qa
Copy link

codecov-qa bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.34%. Comparing base (d0c5175) to head (f4d9257).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   97.34%   97.34%           
=======================================
  Files         399      399           
  Lines       33603    33609    +6     
=======================================
+ Hits        32711    32717    +6     
  Misses        892      892           
Flag Coverage Δ
integration 97.34% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.34% <100.00%> (+<0.01%) ⬆️
unit 97.34% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.58% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.50% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/decoration.py 100.00% <100.00%> (ø)
services/report/__init__.py 92.22% <100.00%> (+0.10%) ⬆️
services/tests/test_decoration.py 96.99% <100.00%> (+0.06%) ⬆️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_upload_task.py 99.49% <100.00%> (+<0.01%) ⬆️

Copy link

codecov-public-qa bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.34%. Comparing base (d0c5175) to head (f4d9257).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   97.34%   97.34%           
=======================================
  Files         399      399           
  Lines       33603    33609    +6     
=======================================
+ Hits        32711    32717    +6     
  Misses        892      892           
Flag Coverage Δ
integration 97.34% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.34% <100.00%> (+<0.01%) ⬆️
unit 97.34% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 94.58% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.50% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/decoration.py 100.00% <100.00%> (ø)
services/report/__init__.py 92.22% <100.00%> (+0.10%) ⬆️
services/tests/test_decoration.py 96.99% <100.00%> (+0.06%) ⬆️
services/tests/test_report.py 100.00% <100.00%> (ø)
tasks/tests/unit/test_upload_task.py 99.49% <100.00%> (+<0.01%) ⬆️

requirements.txt Outdated
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.9
Copy link
Contributor

Choose a reason for hiding this comment

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

oops, gonna have to redo this one!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

💀 a battle fought but done!

@adrian-codecov adrian-codecov added this pull request to the merge queue May 13, 2024
Merged via the queue into main with commit 4c28604 May 13, 2024
29 checks passed
@adrian-codecov adrian-codecov deleted the 1576-use-users-measurements branch May 13, 2024 16:41
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