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

Rework backfill task to create sub-tasks #465

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

adrian-codecov
Copy link
Contributor

This just reworks the existing GH app backfill task to distribute the backfill to subtasks. Previous implementation seemed to run out of memory, hence making several subtasks.

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

codecov-notifications bot commented May 23, 2024

Codecov Report

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

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #465   +/-   ##
=======================================
  Coverage        ?   97.25%           
=======================================
  Files           ?      409           
  Lines           ?    33974           
  Branches        ?        0           
=======================================
  Hits            ?    33040           
  Misses          ?      934           
  Partials        ?        0           
Flag Coverage Δ
integration 97.25% <74.19%> (?)
latest-uploader-overall 97.25% <74.19%> (?)
unit 97.25% <74.19%> (?)

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

Components Coverage Δ
NonTestCode 94.35% <69.23%> (?)
OutsideTasks 97.49% <100.00%> (?)
Files Coverage Δ
celery_config.py 70.12% <100.00%> (ø)
tasks/__init__.py 100.00% <ø> (ø)
...nit/test_backfill_existing_gh_app_installations.py 100.00% <100.00%> (ø)
...st_backfill_owners_without_gh_app_installations.py 100.00% <100.00%> (ø)
tasks/backfill_existing_gh_app_installations.py 69.04% <73.91%> (ø)
...ks/backfill_owners_without_gh_app_installations.py 53.33% <62.96%> (ø)

@codecov-qa
Copy link

codecov-qa bot commented May 23, 2024

Codecov Report

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

Project coverage is 97.25%. Comparing base (4234112) to head (440ca30).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
- Coverage   97.34%   97.25%   -0.10%     
==========================================
  Files         409      409              
  Lines       33954    33976      +22     
==========================================
- Hits        33053    33042      -11     
- Misses        901      934      +33     
Flag Coverage Δ
integration 97.25% <74.19%> (-0.10%) ⬇️
latest-uploader-overall 97.25% <74.19%> (-0.10%) ⬇️
unit 97.25% <74.19%> (-0.10%) ⬇️

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

Components Coverage Δ
NonTestCode 94.35% <69.23%> (-0.24%) ⬇️
OutsideTasks 97.49% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 70.12% <100.00%> (+0.79%) ⬆️
tasks/__init__.py 100.00% <ø> (ø)
...nit/test_backfill_existing_gh_app_installations.py 100.00% <100.00%> (ø)
...st_backfill_owners_without_gh_app_installations.py 100.00% <100.00%> (ø)
tasks/backfill_existing_gh_app_installations.py 69.04% <73.91%> (-21.20%) ⬇️
...ks/backfill_owners_without_gh_app_installations.py 53.33% <62.96%> (-36.92%) ⬇️

Copy link

codecov bot commented May 23, 2024

Codecov Report

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

Project coverage is 97.28%. Comparing base (4234112) to head (440ca30).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
- Coverage   97.37%   97.28%   -0.10%     
==========================================
  Files         441      441              
  Lines       34709    34731      +22     
==========================================
- Hits        33799    33788      -11     
- Misses        910      943      +33     
Flag Coverage Δ
integration 97.25% <74.19%> (-0.10%) ⬇️
latest-uploader-overall 97.25% <74.19%> (-0.10%) ⬇️
unit 97.25% <74.19%> (-0.10%) ⬇️

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

Components Coverage Δ
NonTestCode 94.40% <69.23%> (-0.23%) ⬇️
OutsideTasks 97.49% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 70.12% <100.00%> (+0.79%) ⬆️
tasks/__init__.py 100.00% <ø> (ø)
...nit/test_backfill_existing_gh_app_installations.py 100.00% <100.00%> (ø)
...st_backfill_owners_without_gh_app_installations.py 100.00% <100.00%> (ø)
tasks/backfill_existing_gh_app_installations.py 69.04% <73.91%> (-21.20%) ⬇️
...ks/backfill_owners_without_gh_app_installations.py 53.33% <62.96%> (-36.92%) ⬇️

This change has been scanned for critical changes. Learn more

Copy link

codecov-public-qa bot commented May 23, 2024

Codecov Report

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

Project coverage is 97.25%. Comparing base (4234112) to head (440ca30).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
- Coverage   97.34%   97.25%   -0.10%     
==========================================
  Files         409      409              
  Lines       33954    33976      +22     
==========================================
- Hits        33053    33042      -11     
- Misses        901      934      +33     
Flag Coverage Δ
integration 97.25% <74.19%> (-0.10%) ⬇️
latest-uploader-overall 97.25% <74.19%> (-0.10%) ⬇️
unit 97.25% <74.19%> (-0.10%) ⬇️

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

Components Coverage Δ
NonTestCode 94.35% <69.23%> (-0.24%) ⬇️
OutsideTasks 97.49% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 70.12% <100.00%> (+0.79%) ⬆️
tasks/__init__.py 100.00% <ø> (ø)
...nit/test_backfill_existing_gh_app_installations.py 100.00% <100.00%> (ø)
...st_backfill_owners_without_gh_app_installations.py 100.00% <100.00%> (ø)
tasks/backfill_existing_gh_app_installations.py 69.04% <73.91%> (-21.20%) ⬇️
...ks/backfill_owners_without_gh_app_installations.py 53.33% <62.96%> (-36.92%) ⬇️

Copy link
Contributor

@giovanni-guidini giovanni-guidini left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -107,7 +107,9 @@ def init_celery_tracing(*args, **kwargs):

# Backfill GH Apps
backfill_existing_gh_app_installations_name = "app.tasks.backfill_existing_gh_app_installations.BackfillExistingGHAppInstallationsTask"
backfill_existing_individual_gh_app_installation_name = "app.tasks.backfill_existing_individual_gh_app_installation.BackfillExistingIndividualGHAppInstallationTask"
Copy link
Contributor

Choose a reason for hiding this comment

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

this is more for future reference, but very nit

The task name is (or should be) formatted as
app.[tasks|cron].<TaskConfigGroup>.<task name>

so all of the tasks in the backfill could have the same of backfill or backfil_github_apps, for example. This makes it easier for us to know what tasks are related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ty for this! That honestly makes a lot more sense 🙏

@adrian-codecov adrian-codecov added this pull request to the merge queue May 24, 2024
Merged via the queue into main with commit 9cbe122 May 24, 2024
16 of 26 checks passed
@adrian-codecov adrian-codecov deleted the gh-backfill-round-3 branch May 24, 2024 16:44
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.

2 participants