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: move Pull.flare to storage #63

Merged
merged 2 commits into from
Aug 15, 2023
Merged

Conversation

giovanni-guidini
Copy link
Contributor

This commit is the initial work (+ migration) to move Pull.flare to storage.
This column has crashed the DB in only 1 occasion in the past.

Notice that Pull doesn't have commit (because multiple commits refer to the same pull)
the issue with that is that in Pull.get_commitid I set it to return "multiple_commits".
This should not affect the usage of ArchiveField, but will make it so that the data is
written to /v4/repos/REPO_HASH/commits/multiple_commits/json_data/...

It's fine by me, but we might want to consider another solution.

Part of codecov/engineering-team#70

Purpose/Motivation

What is the feature? Why is this being done?

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.

@codecov-staging
Copy link

codecov-staging bot commented Aug 3, 2023

Codecov Report

Patch coverage is 73.52% of modified lines.

Files Changed Coverage Δ
core/models.py 94.55% <55.55%> (-2.95%) ⬇️
core/admin.py 76.27% <66.66%> (-0.52%) ⬇️
...er_pull_flare_rename_flare_pull__flare_and_more.py 100.00% <100.00%> (ø)
core/tests/factories.py 100.00% <100.00%> (ø)
graphs/views.py 94.96% <100.00%> (ø)
services/archive.py 76.59% <100.00%> (+0.77%) ⬆️
utils/model_utils.py 96.82% <100.00%> (+0.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #63 (652fdbc) into main (f868af8) will decrease coverage by 0.06%.
The diff coverage is 73.52%.

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

@@           Coverage Diff           @@
##            main     #63     +/-   ##
=======================================
- Coverage   95.31   95.25   -0.06     
=======================================
  Files        694     695      +1     
  Lines      14741   14769     +28     
=======================================
+ Hits       14049   14068     +19     
- Misses       692     701      +9     
Flag Coverage Δ
unit ?
unit-latest-uploader ?

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

Files Changed Coverage Δ
core/models.py 94.55% <55.55%> (-2.95%) ⬇️
core/admin.py 76.27% <66.66%> (-0.52%) ⬇️
...er_pull_flare_rename_flare_pull__flare_and_more.py 100.00% <100.00%> (ø)
core/tests/factories.py 100.00% <100.00%> (ø)
graphs/views.py Critical 94.96% <100.00%> (ø)
services/archive.py 76.84% <100.00%> (+0.75%) ⬆️
utils/model_utils.py 96.92% <100.00%> (+0.04%) ⬆️

This commit is the initial work (+ migration) to move `Pull.flare` to storage.
This column has crashed the DB in only 1 occasion in the past.

Notice that Pull doesn't have `commit` (because multiple commits refer to the same pull).
To deal with that I changed the writing of data to have 2 paths: one with commit, and one
without the commit. So pulls data will be written in the repo level (in storage).

Part of codecov/engineering-team#70
@giovanni-guidini giovanni-guidini merged commit 3f6efa3 into main Aug 15, 2023
8 of 12 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/pulls-flare-to-storage branch August 15, 2023 16:25
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