node icon indicating copy to clipboard operation
node copied to clipboard

lib: resolve the issue of not adhering to the specified buffersize

Open 0hmX opened this issue 1 year ago • 11 comments

ref: #55764

We create a queueHandler, and in every iteration we execute the handlers in the queueHandler until we get a non-null result.

0hmX avatar Nov 17 '24 17:11 0hmX

@Ethan-Arrowood, please take a look at the PR when you have a chance. It should be ready for merge unless some any issues is found!

0hmX avatar Nov 17 '24 17:11 0hmX

Codecov Report

Attention: Patch coverage is 80.48780% with 8 lines in your changes missing coverage. Please review.

Project coverage is 88.53%. Comparing base (556f1ae) to head (dba2d27). Report is 1003 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/fs/dir.js 80.48% 8 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55896      +/-   ##
==========================================
+ Coverage   88.00%   88.53%   +0.53%     
==========================================
  Files         656      657       +1     
  Lines      188999   190413    +1414     
  Branches    35989    36554     +565     
==========================================
+ Hits       166331   168589    +2258     
+ Misses      15848    15007     -841     
+ Partials     6820     6817       -3     
Files with missing lines Coverage Δ
lib/internal/fs/dir.js 95.05% <80.48%> (-2.17%) :arrow_down:

... and 117 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 19 '24 06:11 codecov[bot]

Looking good. Have you tested it locally by running the relevant fs readdir and opendir recursive test files?

I'm not really sure if this needs a unique test as you are more just improving an existing solution.

I requested a CI run now and we'll see how this does.

Thanks for the contribution!

Ethan-Arrowood avatar Nov 29 '24 16:11 Ethan-Arrowood

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

nodejs-github-bot avatar Nov 29 '24 16:11 nodejs-github-bot

Looking good. Have you tested it locally by running the relevant fs readdir and opendir recursive test files?

Yes, I've tested it. It should be good unless I missed something.

I'm not really sure if this needs a unique test as you are more just improving an existing solution.

Agreed. I don't think we need a new test since, as you mentioned, nothing fundamentally new was added.

0hmX avatar Nov 29 '24 17:11 0hmX

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

nodejs-github-bot avatar Nov 30 '24 01:11 nodejs-github-bot

Looks good to me, and CI is passing! Thank you, lets gets this merged.

Ethan-Arrowood avatar Nov 30 '24 03:11 Ethan-Arrowood

Commit Queue failed
- Loading data for nodejs/node/pull/55896
✔  Done loading data for nodejs/node/pull/55896
----------------------------------- PR info ------------------------------------
Title      lib: resolve the issue of not adhering to the specified buffersize (#55896)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     cu8code:55723 -> nodejs:main
Labels     fs, needs-ci
Commits    1
 - lib: resolve the issue of not adhering to the specified buffer size
Committers 1
 - cu8code <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/55896
Refs: https://github.com/nodejs/node/issues/55764
Reviewed-By: Ethan Arrowood <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55896
Refs: https://github.com/nodejs/node/issues/55764
Reviewed-By: Ethan Arrowood <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 17 Nov 2024 17:27:03 GMT
   ✔  Approvals: 1
   ✔  - Ethan Arrowood (@Ethan-Arrowood): https://github.com/nodejs/node/pull/55896#pullrequestreview-2470703507
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2024-11-30T01:14:02Z: https://ci.nodejs.org/job/node-test-pull-request/63800/
- Querying data for job/node-test-pull-request/63800/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/12093348479

nodejs-github-bot avatar Nov 30 '24 03:11 nodejs-github-bot

Hm i thought the CI run succeeded. I'll see if a retry helps.

Ethan-Arrowood avatar Nov 30 '24 05:11 Ethan-Arrowood

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

nodejs-github-bot avatar Nov 30 '24 05:11 nodejs-github-bot

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

nodejs-github-bot avatar Dec 09 '24 15:12 nodejs-github-bot

Commit Queue failed
- Loading data for nodejs/node/pull/55896
✔  Done loading data for nodejs/node/pull/55896
----------------------------------- PR info ------------------------------------
Title      lib: resolve the issue of not adhering to the specified buffersize (#55896)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     cu8code:55723 -> nodejs:main
Labels     fs, needs-ci
Commits    1
 - lib: resolve the issue of not adhering to the specified buffer size
Committers 1
 - cu8code <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/55896
Refs: https://github.com/nodejs/node/issues/55764
Reviewed-By: Ethan Arrowood <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55896
Refs: https://github.com/nodejs/node/issues/55764
Reviewed-By: Ethan Arrowood <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 17 Nov 2024 17:27:03 GMT
   ✔  Approvals: 1
   ✔  - Ethan Arrowood (@Ethan-Arrowood): https://github.com/nodejs/node/pull/55896#pullrequestreview-2489049523
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2024-12-09T15:00:05Z: https://ci.nodejs.org/job/node-test-pull-request/63954/
- Querying data for job/node-test-pull-request/63954/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/12241884962

nodejs-github-bot avatar Dec 09 '24 18:12 nodejs-github-bot

Why did you close this? I think only flaky tests were failing.

Ethan-Arrowood avatar Dec 18 '24 18:12 Ethan-Arrowood

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

nodejs-github-bot avatar Jan 06 '25 18:01 nodejs-github-bot

Keep an eye on that CI run. Lets make sure nothing is failing because of these changes. I haven't ran the CI recently so I'm unaware of current known flakey tests, but they are usually pretty obvious.

Ethan-Arrowood avatar Jan 06 '25 19:01 Ethan-Arrowood

@0hmX, are U planing to move with this fix?? i would like to help

edilson258 avatar Apr 21 '25 15:04 edilson258

@edilson258 I do not plan to / know how to fix the failing tests. If you can help, I would appreciate it!

0hmX avatar Apr 21 '25 15:04 0hmX

Is there a way of accessing the CI logs or any other way of seeing the failure reason?? @Ethan-Arrowood ?

edilson258 avatar Apr 21 '25 15:04 edilson258

Once the CI runs (again fresh) it will comment the result here. That link will be show any failures and details as to why

Ethan-Arrowood avatar Apr 21 '25 15:04 Ethan-Arrowood

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

nodejs-github-bot avatar Apr 21 '25 15:04 nodejs-github-bot

@Ethan-Arrowood I think this is ready to be merged!

0hmX avatar Apr 26 '25 13:04 0hmX

Landed in a8a86b3adbbd275a1183ccebe3f782adec92d1e9

nodejs-github-bot avatar Apr 26 '25 15:04 nodejs-github-bot

Great work @0hmX ! Thank you for your contribution - apologies it took so long to land! Next one should be faster 🏎️

Ethan-Arrowood avatar Apr 28 '25 14:04 Ethan-Arrowood