Skip to content

vfs: make lchown update symlink metadata - #64573

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:vfs-lchown-symlinks
Jul 28, 2026
Merged

vfs: make lchown update symlink metadata#64573
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:vfs-lchown-symlinks

Conversation

@trivikr

@trivikr trivikr commented Jul 18, 2026

Copy link
Copy Markdown
Member

Fixes: #64572

This PR fixes VFS lchown() handling so ownership changes apply
to the symbolic link itself instead of following the link and modifying
its target.

It routes synchronous and asynchronous lchown operations through
dedicated VFS and provider handling, adds memory-provider support
that does not follow the final symlink, and preserves fallback behavior
for providers that do not override lchownSync().


Assisted-by: openai:gpt-5.5

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Jul 18, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 18, 2026
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (39f427d) to head (afee66e).
⚠️ Report is 92 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/vfs/provider.js 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64573      +/-   ##
==========================================
+ Coverage   90.23%   90.24%   +0.01%     
==========================================
  Files         739      739              
  Lines      241779   241803      +24     
  Branches    45567    45565       -2     
==========================================
+ Hits       218160   218225      +65     
+ Misses      15160    15118      -42     
- Partials     8459     8460       +1     
Files with missing lines Coverage Δ
lib/internal/vfs/file_system.js 99.37% <100.00%> (+<0.01%) ⬆️
lib/internal/vfs/providers/memory.js 95.06% <100.00%> (+0.03%) ⬆️
lib/internal/vfs/setup.js 87.69% <100.00%> (ø)
lib/internal/vfs/provider.js 98.09% <83.33%> (-0.29%) ⬇️

... and 30 files with indirect coverage changes

🚀 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.

@trivikr
trivikr force-pushed the vfs-lchown-symlinks branch from 5518b6e to 130b7b1 Compare July 18, 2026 15:22
Route mounted lchown operations through VFS lchown handling and add
memory provider support that does not follow the final symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr
trivikr force-pushed the vfs-lchown-symlinks branch from 130b7b1 to afee66e Compare July 18, 2026 19:40
@trivikr
trivikr requested a review from mcollina July 20, 2026 05:11
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 25, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 26, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 26, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 27, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 28, 2026
@nodejs-github-bot
nodejs-github-bot merged commit b2a024b into nodejs:main Jul 28, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in b2a024b

@trivikr
trivikr deleted the vfs-lchown-symlinks branch July 31, 2026 04:31
aduh95 pushed a commit that referenced this pull request Aug 3, 2026
Route mounted lchown operations through VFS lchown handling and add
memory provider support that does not follow the final symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #64573
Fixes: #64572
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 4, 2026
Route mounted lchown operations through VFS lchown handling and add
memory provider support that does not follow the final symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: #64573
Fixes: #64572
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: lchown follows symlinks instead of updating the link

4 participants