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

1173 add user measurements partitioned table #414

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

adrian-codecov
Copy link
Contributor

@adrian-codecov adrian-codecov commented Feb 23, 2024

Purpose/Motivation

We're adding the ability to do database partitions. Our first use case is described here, codecov/engineering-team#1173.

What does this PR do?

  • Adds the django-postgres-extra library
  • Added the UserMeasurement model
  • Added partition.py file, which helps us create partitions running a command

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 a review from a team as a code owner February 23, 2024 20:12
('objects', psqlextra.manager.manager.PostgresManager()),
],
),
psqlextra.backend.migrations.operations.add_default_partition.PostgresAddDefaultPartition(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could potentially get rid of this default partition, but doesn't hurt to leave it here as we learn more and use partitioning in prod

@codecov-staging
Copy link

Codecov Report

Attention: Patch coverage is 88.63636% with 5 lines in your changes are missing coverage. Please review.

Files Patch % Lines
user_measurements/partitioning.py 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 88.63636% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 96.09%. Comparing base (5beba8d) to head (2e55b80).

Files Patch % Lines
user_measurements/partitioning.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
- Coverage   96.11%   96.09%   -0.02%     
==========================================
  Files         637      640       +3     
  Lines       16823    16867      +44     
==========================================
+ Hits        16169    16208      +39     
- Misses        654      659       +5     
Flag Coverage Δ
unit 96.09% <88.63%> (-0.02%) ⬇️
unit-latest-uploader 96.09% <88.63%> (-0.02%) ⬇️

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 23, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (5beba8d) 96.11% compared to head (2e55b80) 96.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
- Coverage   96.11%   96.09%   -0.02%     
==========================================
  Files         637      640       +3     
  Lines       16823    16867      +44     
==========================================
+ Hits        16169    16208      +39     
- Misses        654      659       +5     
Flag Coverage Δ
unit 96.09% <88.63%> (-0.02%) ⬇️
unit-latest-uploader 96.09% <88.63%> (-0.02%) ⬇️

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

Files Coverage Δ
codecov/settings_base.py 85.86% <100.00%> (+0.15%) ⬆️
reports/models.py 97.22% <100.00%> (+0.07%) ⬆️
user_measurements/migrations/0001_initial.py 100.00% <100.00%> (ø)
user_measurements/models.py 100.00% <100.00%> (ø)
user_measurements/partitioning.py 0.00% <0.00%> (ø)

Impacted file tree graph

@adrian-codecov adrian-codecov merged commit f53d741 into main Feb 27, 2024
13 of 20 checks passed
@adrian-codecov adrian-codecov deleted the 1173-add-user-measurements-partitioned-table branch February 27, 2024 22:55
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

3 participants