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

1577 use users measurements #539

Merged
merged 13 commits into from
May 9, 2024
Merged

Conversation

adrian-codecov
Copy link
Contributor

Purpose/Motivation

Finally. This is the PR where we get to use the measurements partition table on API - there's one for worker coming soon.

Basically, we're inserting upload records on the user measurements table when we insert an upload. For this repo, that happens on the CLI endpoint where we create an upload record preemptively. We're replacing the setting/reading with the insert_user_measurements and query_user_measurements methods, standardized in shared to be later used in worker as well.

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.

Links to relevant tickets

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

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.

@adrian-codecov adrian-codecov requested review from a team as code owners May 3, 2024 05:09
Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.78%. Comparing base (88eb3a1) to head (190f18f).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #539   +/-   ##
=====================================
  Coverage   95.78   95.78           
=====================================
  Files        777     777           
  Lines      17254   17253    -1     
=====================================
- Hits       16526   16525    -1     
  Misses       728     728           
Flag Coverage Δ
unit 91.30% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 91.30% <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.

@codecov-notifications
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (88eb3a1) to head (190f18f).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
+ Coverage   91.29%   91.30%   +0.01%     
==========================================
  Files         601      600       -1     
  Lines       15979    15935      -44     
==========================================
- Hits        14588    14550      -38     
+ Misses       1391     1385       -6     
Flag Coverage Δ
unit 91.30% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 91.30% <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 May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (88eb3a1) to head (190f18f).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
+ Coverage   91.29%   91.30%   +0.01%     
==========================================
  Files         601      600       -1     
  Lines       15979    15935      -44     
==========================================
- Hits        14588    14550      -38     
+ Misses       1391     1385       -6     
Flag Coverage Δ
unit 91.30% <100.00%> (+0.01%) ⬆️
unit-latest-uploader 91.30% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
...s/owner/interactors/get_uploads_number_per_user.py 100.00% <100.00%> (ø)
upload/helpers.py 94.30% <100.00%> (-0.03%) ⬇️
upload/throttles.py 90.90% <100.00%> (ø)
upload/views/uploads.py 99.05% <100.00%> (+0.01%) ⬆️

Impacted file tree graph

nora-codecov
nora-codecov previously approved these changes May 3, 2024
requirements.in Outdated
@@ -20,7 +20,7 @@ factory-boy
fakeredis
freezegun
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
https://github.com/codecov/shared/archive/1dc95a2ac3c07ca211319e65a90ea35592c825c1.tar.gz#egg=shared
https://github.com/codecov/shared/archive/9ca2efbb2c109ecfe241143ecd1c6f38c3820a0b.tar.gz#egg=shared
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't merge until updated to latest after this is merged, codecov/shared#214

@adrian-codecov adrian-codecov added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit 052c306 May 9, 2024
21 of 22 checks passed
@adrian-codecov adrian-codecov deleted the 1577-use-users-measurements branch May 9, 2024 21:37
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