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

move sync_repos_languages task to get_repo_provider_service wrapper #1109

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

matt-codecov
Copy link
Contributor

@matt-codecov matt-codecov commented Feb 26, 2025

depends on: #1107
part of: codecov/engineering-team#3389

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.

Base automatically changed from pr1107 to main February 26, 2025 21:29
@matt-codecov matt-codecov force-pushed the matt/languages-repo-provider-wrapper branch 2 times, most recently from 8e209ab to 5e697f6 Compare February 26, 2025 22:20
@matt-codecov matt-codecov force-pushed the matt/languages-repo-provider-wrapper branch from 5e697f6 to 6ef1e94 Compare February 26, 2025 22:26
@codecov-notifications
Copy link

codecov-notifications bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/sync_repo_languages.py 88.23% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.25%. Comparing base (afc0de3) to head (6ef1e94).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/sync_repo_languages.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1109   +/-   ##
=======================================
  Coverage   97.25%   97.25%           
=======================================
  Files         454      454           
  Lines       37394    37394           
=======================================
+ Hits        36367    36368    +1     
+ Misses       1027     1026    -1     
Flag Coverage Δ
integration 43.08% <0.00%> (-0.01%) ⬇️
unit 89.80% <90.47%> (+<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.

@matt-codecov matt-codecov requested a review from a team February 26, 2025 22:49
Copy link
Contributor

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

lgtm, though at least cleaning up the duplicated logs would be nice

Comment on lines +52 to +53
owner_id=repository.ownerid or "",
repository_id=repository.repoid,
Copy link
Contributor

Choose a reason for hiding this comment

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

both of these are now covered by the LogContext, so I would not duplicate them here.

Comment on lines +57 to +62
installation_name_to_use = get_installation_name_for_owner_for_task(
self.name, repository.owner
)
repository_service = get_repo_provider_service(
repository, installation_name_to_use=installation_name_to_use
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I can remember that I may have created "yet another" wrapper that takes care of this installation_name_to_use, and introduces a cache for these things.
Or I tried and failed because these things are not cache-able.

@matt-codecov matt-codecov added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit 6e9c419 Feb 27, 2025
26 of 29 checks passed
@matt-codecov matt-codecov deleted the matt/languages-repo-provider-wrapper branch February 27, 2025 17:45
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