crypto: use user-facing error for output encoding changes#64692
Conversation
Replace the internal assertion with ERR_INVALID_ARG_VALUE when the output encoding changes between Cipher or Decipher calls. Document the encoding requirement and update the corresponding tests. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
|
Review requested:
|
|
Technically a
semver-major
|
|
Intermittent GHA outages, it's going to be a fun day... |
|
Looks like this will need a push of some description to (hopefully) trigger the workflows. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64692 +/- ##
==========================================
- Coverage 90.14% 90.11% -0.03%
==========================================
Files 741 741
Lines 242112 242114 +2
Branches 45605 45601 -4
==========================================
- Hits 218244 218190 -54
- Misses 15360 15430 +70
+ Partials 8508 8494 -14
🚀 New features to boost your workflow:
|
|
I'm also fine with this not being semver-major. |
|
Could some collaborator review what happend for these failed tests ? |
|
@lpinca @Renegade334 @avivkeller Could review this failed test again ? Would this prevent this pr from landing ? |
|
It's flaky, see #64718 |
Commit Queue failed- Loading data for nodejs/node/pull/64692 ✔ Done loading data for nodejs/node/pull/64692 ----------------------------------- PR info ------------------------------------ Title crypto: use user-facing error for output encoding changes (#64692) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch Archkon:crypto -> nodejs:main Labels crypto, author ready, needs-ci Commits 1 - crypto: use user-facing error for output encoding changes Committers 1 - Archkon <180910180+Archkon@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/64692 Fixes: https://github.com/nodejs/node/issues/64689 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64692 Fixes: https://github.com/nodejs/node/issues/64689 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 23 Jul 2026 07:27:29 GMT ✔ Approvals: 6 ✔ - René (@Renegade334): https://github.com/nodejs/node/pull/64692#pullrequestreview-4763043896 ✔ - Tim Perry (@pimterry): https://github.com/nodejs/node/pull/64692#pullrequestreview-4763710773 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/64692#pullrequestreview-4763984060 ✔ - Filip Skokan (@panva) (TSC): https://github.com/nodejs/node/pull/64692#pullrequestreview-4764391687 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/64692#pullrequestreview-4767882556 ✔ - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/64692#pullrequestreview-4770448677 ✘ GitHub CI failed with status: FAILURE ℹ Last Full PR CI on 2026-07-24T11:38:33Z: https://ci.nodejs.org/job/node-test-pull-request/75091/ - Querying data for job/node-test-pull-request/75091/ ✔ Build data downloaded - Querying failures of job/node-test-commit/89767/ ✔ Data downloaded ✘ 4 failure(s) on the last Jenkins CI run -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/30149409066 |
@avivkeller I know but this would prevent this pr form being landed by nodesj github bot would you like to rerun jenkins ci again ? |
|
Landed in 6af3dda |
Fixes: #64689