Skip to content
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

fs: improve fs.watch ENOSPC error message #21846

Closed
wants to merge 3 commits into from

Conversation

addaleax
Copy link
Member

Providing No space left on device is misleading in this case.
Replace it with something that describes it more accurately.

Refs: https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. fs Issues and PRs related to the fs subsystem / file system. labels Jul 17, 2018
@addaleax
Copy link
Member Author

The test probably needs some per-platform tweaking, so:

CI: https://ci.nodejs.org/job/node-test-pull-request/15905/

@addaleax addaleax added the wip Issues and PRs that are still a work in progress. label Jul 17, 2018
@addaleax
Copy link
Member Author

addaleax commented Jul 18, 2018

}

setTimeout(() => {
if (!finished && processes.length < 200)

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@addaleax addaleax force-pushed the fs-watch-enospc branch 2 times, most recently from 6f4bd38 to b156539 Compare August 1, 2018 16:16
@addaleax addaleax removed the wip Issues and PRs that are still a work in progress. label Aug 1, 2018
@addaleax
Copy link
Member Author

addaleax commented Aug 1, 2018

CI: https://ci.nodejs.org/job/node-test-pull-request/16123/

Might be good to get another @nodejs/tsc review – this error comes with a code already, so I don’t think this has to be semver-major.

let accumulated = '';
gatherStderr.on('data', common.mustCallAtLeast((chunk) => {
accumulated += chunk;
// console.log(chunk);
Copy link
Member

Choose a reason for hiding this comment

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

TBD (to be deleted)

@@ -161,7 +162,9 @@ FSWatcher.prototype.start = function(filename,
const error = errors.uvException({
errno: err,
syscall: 'watch',
path: filename
path: filename,
description: err === UV_ENOSPC ?
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Might want to call it message?

Copy link
Member

Choose a reason for hiding this comment

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

+1 to call it message. By the way if the key is message it currently will not appear in the final error object as an additional property whereas description will.

Copy link
Member

Choose a reason for hiding this comment

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

ping @addaleax

@jasnell
Copy link
Member

jasnell commented Sep 10, 2018

Ping again @addaleax

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Sep 10, 2018
Providing `No space left on device` is misleading in this case.
Replace it with something that describes it more accurately.

Refs: https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959
@addaleax addaleax removed the stalled Issues and PRs that are stalled. label Sep 11, 2018
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 11, 2018
@addaleax
Copy link
Member Author

Rebased, with comments addressed.

CI: https://ci.nodejs.org/job/node-test-pull-request/17115/

@targos
Copy link
Member

targos commented Sep 16, 2018

@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

@addaleax
Copy link
Member Author

Landed in 13245dc

@addaleax addaleax closed this Sep 22, 2018
@addaleax addaleax deleted the fs-watch-enospc branch September 22, 2018 15:47
addaleax added a commit that referenced this pull request Sep 22, 2018
Providing `No space left on device` is misleading in this case.
Replace it with something that describes it more accurately.

Refs: https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959

PR-URL: #21846
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
targos pushed a commit that referenced this pull request Sep 23, 2018
Providing `No space left on device` is misleading in this case.
Replace it with something that describes it more accurately.

Refs: https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959

PR-URL: #21846
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@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. errors Issues and PRs related to JavaScript errors originated in Node.js core. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants