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

buffer: truncate instead of throw when writing beyond buffer #54524

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

ronag
Copy link
Member

@ronag ronag commented Aug 23, 2024

Fixes: #54523

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. needs-ci PRs that need a full CI run. labels Aug 23, 2024
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2024
@RedYetiDev
Copy link
Member

RedYetiDev commented Aug 23, 2024

@ronag I marked #54523 as a duplicate of #54521 and #54518, does this issue fix one of those too? (It looks like it might fix #54518, right?)

@ronag
Copy link
Member Author

ronag commented Aug 23, 2024

#54521 is not related to this

ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2024
@ronag ronag added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 23, 2024
Copy link
Contributor

Fast-track has been requested by @ronag. Please 👍 to approve.

ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2024
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2024
ronag added a commit to nxtedition/node that referenced this pull request Aug 23, 2024
@RedYetiDev
Copy link
Member

#54521 is not related to this

But does it fix #54518?

@ronag
Copy link
Member Author

ronag commented Aug 23, 2024

#54521 is not related to this

But does it fix #54518?

I think so.

Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

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

I'm okay with this, but could it be considered a major, breaking change?

@ronag
Copy link
Member Author

ronag commented Aug 23, 2024

It's unbrraking.

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.34%. Comparing base (9ee3a72) to head (fcb2906).
Report is 28 commits behind head on main.

Files Patch % Lines
lib/internal/buffer.js 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #54524   +/-   ##
=======================================
  Coverage   87.33%   87.34%           
=======================================
  Files         649      649           
  Lines      182561   182626   +65     
  Branches    35041    35040    -1     
=======================================
+ Hits       159444   159507   +63     
- Misses      16378    16390   +12     
+ Partials     6739     6729   -10     
Files Coverage Δ
lib/internal/buffer.js 97.41% <33.33%> (+0.26%) ⬆️

... and 27 files with indirect coverage changes

@jerome-benoit
Copy link
Contributor

jerome-benoit commented Aug 23, 2024

It's unbrraking.

Of course it is: the semantic of dependent APIs is changed. But the initial upper bound check introduction should not have go without being flagged as a breaking change.

@ronag ronag added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 26, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 26, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ronag ronag added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 27, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 27, 2024
@nodejs-github-bot nodejs-github-bot merged commit dd8eeec into nodejs:main Aug 27, 2024
52 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in dd8eeec

haines added a commit to cerbos/cerbos-sdk-javascript that referenced this pull request Aug 27, 2024
nodejs/node#54524

Signed-off-by: Andrew Haines <haines@cerbos.dev>
haines added a commit to cerbos/cerbos-sdk-javascript that referenced this pull request Aug 27, 2024
* chore(deps-dev): update development dependencies

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Revert to Node.js 22.6.0

nodejs/node#54524

Signed-off-by: Andrew Haines <haines@cerbos.dev>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Andrew Haines <haines@cerbos.dev>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andrew Haines <haines@cerbos.dev>
ronag added a commit to nxtedition/node that referenced this pull request Aug 27, 2024
ronag added a commit to nxtedition/node that referenced this pull request Aug 27, 2024
ronag added a commit to nxtedition/node that referenced this pull request Aug 27, 2024
@Wazbat
Copy link

Wazbat commented Aug 27, 2024

I'm unfamiliar with the node release process. Is there a rough estimate on when this will be released?

@RafaelGSS
Copy link
Member

I'm unfamiliar with the node release process. Is there a rough estimate on when this will be released?

It should go out tomorrow. Follow #54560

RafaelGSS pushed a commit that referenced this pull request Aug 30, 2024
Fixes: #54523
Fixes: #54518
PR-URL: #54524
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Aug 30, 2024
Fixes: #54523
Fixes: #54518
PR-URL: #54524
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
haines added a commit to cerbos/cerbos-sdk-javascript that referenced this pull request Sep 2, 2024
nodejs/node#54524

Signed-off-by: Andrew Haines <haines@cerbos.dev>
haines added a commit to cerbos/cerbos-sdk-javascript that referenced this pull request Sep 2, 2024
* chore(deps-dev): update development dependencies

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix lint errors

Signed-off-by: Andrew Haines <haines@cerbos.dev>

* Revert to Node.js 22.6.0

nodejs/node#54524

Signed-off-by: Andrew Haines <haines@cerbos.dev>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Andrew Haines <haines@cerbos.dev>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andrew Haines <haines@cerbos.dev>
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. buffer Issues and PRs related to the buffer subsystem. fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latest release error - RangeError: "length" is outside of buffer bounds