Skip to content

feat(consistent symlink): modify the IsSymlink method to identify both legacy as well as standard representation#4428

Merged
anushka567 merged 7 commits intomasterfrom
isSymlink-changes
Mar 17, 2026
Merged

feat(consistent symlink): modify the IsSymlink method to identify both legacy as well as standard representation#4428
anushka567 merged 7 commits intomasterfrom
isSymlink-changes

Conversation

@anushka567
Copy link
Copy Markdown
Member

@anushka567 anushka567 commented Mar 3, 2026

Description

This PR updates the IsSymlink method in GCSFuse to recognize both the legacy GCSFuse-specific symlink representation and the standard GCS symlink representation used by clients like Storage Transfer Service (STS)

Context: go/sts-consistent-symlink-handling-in-gcsfuse

Link to the issue in case of a bug fix.

b/489240501

Testing details

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

Any backward incompatible change? If so, please explain.

No

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.32%. Comparing base (d724e63) to head (376c673).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4428   +/-   ##
=======================================
  Coverage   83.31%   83.32%           
=======================================
  Files         163      163           
  Lines       19997    20000    +3     
=======================================
+ Hits        16661    16665    +4     
+ Misses       2717     2716    -1     
  Partials      619      619           
Flag Coverage Δ
unittests 83.32% <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.

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

@anushka567 anushka567 changed the base branch from create-symlink-changes to master March 16, 2026 11:11
@anushka567 anushka567 marked this pull request as ready for review March 16, 2026 11:17
@anushka567 anushka567 requested a review from a team as a code owner March 16, 2026 11:17
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Mar 16, 2026
@anushka567 anushka567 enabled auto-merge (squash) March 16, 2026 11:18
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 significantly improves GCSFuse's interoperability by enabling it to consistently recognize symlinks created by various Google Cloud clients, including Storage Transfer Service (STS). By updating the symlink detection logic to support both legacy and standard GCS symlink formats, GCSFuse can now provide a more unified and reliable experience for users working with symbolic links across different Google Cloud services.

Highlights

  • Enhanced Symlink Recognition: The IsSymlink method has been updated to identify both the legacy GCSFuse-specific symlink representation (gcsfuse_symlink_target) and the standard GCS symlink representation (goog-reserved-file-is-symlink) used by clients like Storage Transfer Service (STS).
  • Deprecation Notice: A comment has been added to internal/fs/inode/symlink.go explicitly marking SymlinkMetadataKey as deprecated and retained solely for backward compatibility.
  • New Unit Tests: New unit tests were introduced in internal/fs/inode/symlink_test.go to cover the correct recognition of the standard symlink metadata key, ensuring robust handling of both 'true' and 'false' values.
Changelog
  • internal/fs/inode/symlink.go
    • Added a deprecation note for the SymlinkMetadataKey constant.
    • Modified the IsSymlink function to check for both the legacy SymlinkMetadataKey and the standard StandardSymlinkMetadataKey.
  • internal/fs/inode/symlink_test.go
    • Added TestIsSymLinkWhenStandardMetadataKeyIsPresent to verify IsSymlink with the standard key set to 'true'.
    • Added TestIsSymLinkWhenStandardMetadataKeyIsFalse to verify IsSymlink with the standard key set to 'false'.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
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

The pull request updates the IsSymlink function to support a new StandardSymlinkMetadataKey for identifying symlinks, while maintaining backward compatibility with the deprecated SymlinkMetadataKey. The updated logic now checks for the legacy key's presence first, and if not found, then checks if the StandardSymlinkMetadataKey has a value of "true". A deprecation note has been added for the legacy key, and new unit tests have been introduced to validate the IsSymlink function's behavior with the new standard metadata key.

Comment thread internal/fs/inode/symlink.go Outdated
Comment thread internal/fs/inode/symlink.go
@anushka567 anushka567 merged commit b93e4e0 into master Mar 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consistent-symlink-support 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