Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

@julio-lopez julio-lopez commented Aug 21, 2025

Motivation:

  • Code clarity: moves platform-specific workarounds to the platform-specific source code files.
  • It allows the compiler to optimize-away the function call in non-windows platforms.

Ref:

Additional cleanups:

  • make fs/localfs.isWindows a const
  • move Windows-specific functionality to local_fs_windows.go
  • cleanup: remove //nolint:revive annotations

@julio-lopez julio-lopez requested a review from Copilot August 21, 2025 05:20
@codecov
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.42%. Comparing base (cb455c6) to head (67e80ca).
⚠️ Report is 631 commits behind head on master.

Files with missing lines Patch % Lines
fs/localfs/local_fs_os.go 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4776      +/-   ##
==========================================
+ Coverage   75.86%   76.42%   +0.56%     
==========================================
  Files         470      530      +60     
  Lines       37301    40443    +3142     
==========================================
+ Hits        28299    30910    +2611     
- Misses       7071     7494     +423     
- Partials     1931     2039     +108     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors VSS (Volume Shadow Service) trailer handling on Windows by consolidating the logic and improving code organization. It follows up on PR #3891 to clean up the implementation.

  • Consolidates Windows-specific logic into platform-specific files
  • Replaces the isWindowsVSSVolume() method with a more focused trailingSeparator() function
  • Introduces a consistent separatorStr constant and isWindows variable across the codebase

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
fs/localfs/local_fs_windows.go Adds Windows-specific isWindows variable and trailingSeparator() function
fs/localfs/local_fs_nonwindows.go Adds non-Windows constants and stub implementation of trailingSeparator()
fs/localfs/local_fs_os.go Refactors to use new trailingSeparator() function and separatorStr constant
fs/localfs/local_fs_test.go Updates test code to use new isWindows variable
fs/localfs/local_fs.go Removes the old isWindowsVSSVolume() method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@julio-lopez julio-lopez marked this pull request as ready for review August 21, 2025 05:27
@julio-lopez julio-lopez merged commit c2f5c65 into kopia:master Aug 21, 2025
28 checks passed
@julio-lopez julio-lopez deleted the refactor/vss-trailer branch August 21, 2025 05:29
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.

1 participant