feat(consistent symlink): create openReader helper method on symlink inode to read the object contents to decipher target#4432
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4432 +/- ##
==========================================
+ Coverage 83.67% 83.73% +0.05%
==========================================
Files 163 163
Lines 20077 20092 +15
==========================================
+ Hits 16800 16824 +24
+ Misses 2652 2645 -7
+ Partials 625 623 -2
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:
|
f31eb44 to
654ab8e
Compare
654ab8e to
fa634a5
Compare
4161d66 to
01f908f
Compare
01f908f to
cb13716
Compare
cb13716 to
5c8cc5f
Compare
Summary of ChangesHello, 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 enhances the Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new openReader method for SymlinkInode to facilitate reading the target of a symlink from GCS. This method includes specific error handling to detect and wrap gcs.NotFoundError into a gcsfuse_errors.FileClobberedError when a file clobbering scenario is identified. Corresponding internal tests have been added to validate the functionality of openReader, including cases for successful reads and clobbered files. A review comment points out that the error handling logic in openReader involves redundant wrapping, which can lead to verbose and confusing error messages, and suggests a simplification to improve clarity.
Description
The PR adds a helper method,
openReader, to the SymlinkInode struct to allow reading the content of the backing GCS object . This is necessary because, in the new consistent symlink design, the symlink target is stored as the object's content rather than in custom metadata .For more context, refer to go/sts-consistent-symlink-handling-in-gcsfuse
Link to the issue in case of a bug fix.
b/489246084
Testing details
Any backward incompatible change? If so, please explain.
No.