-
Notifications
You must be signed in to change notification settings - Fork 260
Merge feature usage tracking header feature branch to master #1619
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @cpriti-os, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a robust feature usage tracking system for the Google Cloud Storage Hadoop Connector. By introducing a new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
/gcbrun |
There was a problem hiding this 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 introduces a mechanism for tracking feature usage in the GCS connector by adding a custom X-Goog-Storage-Hadoop-Connector-Features header to requests. The implementation is well-structured, using a FeatureHeaderGenerator to build a bitmask of features from both static configuration and dynamic, per-request contexts. The use of InheritableThreadLocal is appropriate for tracking request-specific features. The changes are cleanly integrated into both the JSON and gRPC client implementations. The addition of comprehensive unit tests is also a great plus. I have one minor suggestion to simplify the encoding logic.
| if (highBits == 0L && lowBits == 0L) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check for highBits == 0L && lowBits == 0L appears to be redundant. The features.isEmpty() check at the beginning of the method (line 149) already handles the case where the bitmask is empty. If features is not empty, at least one of highBits or lowBits will be non-zero. Removing this check would simplify the code.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1619 +/- ##
============================================
- Coverage 81.88% 72.53% -9.36%
+ Complexity 2424 2187 -237
============================================
Files 128 130 +2
Lines 10819 10922 +103
Branches 1302 1319 +17
============================================
- Hits 8859 7922 -937
- Misses 1417 2392 +975
- Partials 543 608 +65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
go/gcs-track-client-features