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

deps: update shared (use new minio storage service) #944

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

joseph-sentry
Copy link
Contributor

  • handle bundle analysis changes: BundleChange requires bundle_name
    passed as kwarg now
  • remove service/storage.py as its no longer needed
  • change a bunch of imports from using from shared.storage import ...
    to import ... so that the mock_storage fixture just works

- handle bundle analysis changes: BundleChange requires bundle_name
  passed as kwarg now
- remove service/storage.py as its no longer needed
- change a bunch of imports from using `from shared.storage import ...`
  to `import ...` so that the mock_storage fixture just works
@joseph-sentry joseph-sentry requested review from JerrySentry and a team December 5, 2024 21:54
Copy link

github-actions bot commented Dec 5, 2024

This PR includes changes to shared. Please review them here: codecov/shared@45252f7...8c5de3f

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.99%. Comparing base (96bed1f) to head (6dfaa73).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #944   +/-   ##
=======================================
  Coverage   97.99%   97.99%           
=======================================
  Files         445      443    -2     
  Lines       35754    35721   -33     
=======================================
- Hits        35036    35005   -31     
+ Misses        718      716    -2     
Flag Coverage Δ
integration 42.12% <80.55%> (+<0.01%) ⬆️
unit 90.63% <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

github-actions bot commented Dec 5, 2024

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 5, 2024

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!

Copy link
Contributor

@JerrySentry JerrySentry left a comment

Choose a reason for hiding this comment

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

thanks for the bundle changes :P

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, but please take another look whether we consistently pass repo_id to get_appropriate_storage_service.

@@ -234,7 +234,7 @@ def process_upload(
"""
commit_report: CommitReport = upload.report
repo_hash = ArchiveService.get_archive_hash(commit_report.commit.repository)
storage_service = get_storage_client()
storage_service = shared.storage.get_appropriate_storage_service(commit.repoid)
bundle_loader = BundleAnalysisReportLoader(storage_service, repo_hash)
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m wondering why this is not using ArchiveService directly? As that is pretty much just storage_service + repo_hash

@@ -16,7 +16,7 @@ def test_cache_test_rollups(self, mock_storage, transactional_db):
repo = RepositoryFactory()

redis = get_redis_connection()
storage_service = get_storage_client()
storage_service = shared.storage.get_appropriate_storage_service()
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder whether its even possible to always pass the repo_id to all the calls to get_appropriate_storage_service?

In this very example, you are passing the repo_id in the code, but not in the test, so these are out of sync. For tests, this does not matter at all. But for other parts of the codebase, I believe it might matter quite a bit if the reader and writer side are out of sync and get a different storage service because of it.

make sure that we pass repoid to get_appropriate_storage_service
whenever possible
@joseph-sentry joseph-sentry added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit fe2bc8c Dec 6, 2024
26 of 27 checks passed
@joseph-sentry joseph-sentry deleted the joseph/use-new-minio branch December 6, 2024 15:57
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