Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@raj-prince
Copy link
Collaborator

@raj-prince raj-prince commented Oct 15, 2025

Description

  • Fixing duplicate instrumentation of gcs/download_bytes_count[sequential/random].
  • Propagating right read-type in case of new read-manager flow.
  • Fixing the duplicate instrumentation in old flow too.

Link to the issue in case of a bug fix.

b/443637302

Testing details

  1. Manual - NA
  2. Unit tests - Added
  3. Integration tests - NA

Any backward incompatible change? If so, please explain.

No

@raj-prince raj-prince marked this pull request as ready for review October 15, 2025 14:34
@raj-prince raj-prince requested a review from a team as a code owner October 15, 2025 14:34
@github-actions
Copy link

/gemini summary

@github-actions
Copy link

/gemini review

@github-actions github-actions bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Oct 15, 2025
@raj-prince raj-prince force-pushed the download_metrics_fix branch from 2a295c2 to 1ebd947 Compare October 15, 2025 14:41
@kislaykishore
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively resolves the issue of duplicate instrumentation for gcs/download_bytes_count metrics. The core fix, which involves relocating the metric capturing logic to the startRead function, is sound and correctly ensures that metrics are recorded only once when a new GCS read is initiated. The propagation of the readType to the underlying readers is also handled well. I appreciate the thoroughness of adding new tests to cover both the old and new reader paths for sequential and random reads. My main feedback is a suggestion to refactor the new tests to reduce code duplication, which will improve maintainability.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.37%. Comparing base (404f301) to head (c2bc761).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3895      +/-   ##
==========================================
- Coverage   82.40%   82.37%   -0.03%     
==========================================
  Files         145      145              
  Lines       22773    22769       -4     
==========================================
- Hits        18766    18757       -9     
- Misses       3462     3466       +4     
- Partials      545      546       +1     
Flag Coverage Δ
unittests 82.37% <100.00%> (-0.03%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kislaykishore
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses the issue of broken gcs_download_bytes_count metrics by correcting the duplicate instrumentation and ensuring the proper propagation of the read type. The refactoring to pass the read type as part of the request rather than holding it as state in the reader is a good improvement. The addition of specific tests for sequential and random read metrics provides good coverage for the fix. I have one suggestion to improve the maintainability of the new test code.

@raj-prince raj-prince merged commit 3d9975c into master Oct 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants