Skip to content

Replace deprecated dependencies and modernise test tooling - #415

Merged
bert-e merged 12 commits into
development/1from
improvement/S3UTILS-249-deprecated-deps
Oct 15, 2026
Merged

bert-e merged 12 commits into
development/1from
improvement/S3UTILS-249-deprecated-deps

Conversation

@francoisferrand

@francoisferrand francoisferrand commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This cleans up s3utils' dependencies after the move to Node 24, and releases 1.20.0.

Most of it is about getting rid of deprecated, unmaintained or unused packages, which were also behind most of the security advisories reported on the image. Arsenal moves to the final 8.6.0, deprecated or abandoned packages are replaced by their maintained successors or by what Node now provides, unused ones are dropped, and the test tooling and GitHub Actions are brought up to date. The Python packages used by the utapi report are refreshed too, as they carried several CVEs into the image.

The replication audit scripts are removed: they were written for a one-shot migration which is now done, and they were the last reason to keep the end-of-life aws-sdk v2.

Two existing problems surfaced along the way and are fixed here:

  • the Raft comparison tools (followerDiff, compareFollowerDbs) could not run at all since an earlier upgrade of their database library; this went unnoticed because the tests only used mocks, so they now also run against a real database
  • with the newer AWS SDK, the request timeouts we configure had silently become warnings, so a stalled connection could hang forever instead of being retried

JSONStream stays for now, since arsenal still depends on it; this is followed up in ARSN-663 and S3UTILS-251.

The functional tests were not run locally, and the Raft tools still deserve a manual run on real databases.

Issue: S3UTILS-249

Move off the 8.6.0 preview now that the final release is out. Arsenal no
longer pulls level-sublevel and its old leveldown stack, which removes
most of the advisories reported on production dependencies.

Issue: S3UTILS-249
The previous majors still run on the Node 20 actions runtime, which
GitHub is phasing out. The new ones move to Node 24 and keep the inputs
used here unchanged.

Issue: S3UTILS-249
These pins dated back to 2022 and carried several known CVEs in requests,
urllib3, certifi and idna. They are installed in the base image, so the
whole image was flagged. service-report.py only uses plain requests
calls, which behave the same with requests 2.34 and urllib3 2.x.

Issue: S3UTILS-249
replicationAudit/ was written for a one-shot migration: finding CRR roles
missing s3:ReplicateObject and fixing them before that permission got
enforced. That migration is done, so the list, check and fix scripts are
dropped along with their tests.

The fix script was the only user of aws-sdk v2, which is end-of-life and
flagged by dependency review, so that devDependency and its allowlist
entry go too.

Issue: S3UTILS-249
@aws-sdk/node-http-handler is deprecated and only re-exports the 1.x
@smithy handler, while the S3 client itself runs on 4.x. Depend on the
@smithy package so the scripts use the same handler as the SDK.

In 4.x, requestTimeout became an overall request deadline which only logs
a warning by default, and the socket idle timeout it used to configure is
now socketTimeout. Switch to socketTimeout so stalled connections still
fail and get retried instead of hanging forever. The cloudserver client
was already affected, as it lets the SDK build a 4.x handler from its
options, so it gets the same fix.

Issue: S3UTILS-249
heapdump is an unmaintained native addon that has to be rebuilt for each
Node ABI. Node has shipped v8.writeHeapSnapshot since 11, which writes
the same .heapsnapshot files, so the profiler keeps working as before
without the extra native build.

Issue: S3UTILS-249
randomatic was only used by two tests to produce random sproxyd keys and
version suffixes, and lodash/range was pulled in there without being
declared at all. Node's crypto and Array.from cover both.

Issue: S3UTILS-249
Nothing requires needle, strip-ansi or typescript: needle was left over
from the service level sidecar, and the other two came in with an earlier
tooling bump. eslint-plugin-import and eslint-plugin-jest are not loaded
by the flat ESLint config either.

eslint.config.mjs imports @eslint/js and @eslint/eslintrc directly, but
they were only reachable as transitive dependencies of eslint, so declare
them.

Issue: S3UTILS-249
Move to Jest 30, sinon 22 and fake-timers 15, and bring eslint to the
latest 9.x.

Jest 30 renamed --testPathPattern to --testPathPatterns, and
objectContaining no longer matches functions, so the replication updater
tests now compare the command class directly instead of its name.

mongodb-memory-server stays on 10.x: moving to 11 would change the
MongoDB version the tests run against.

Issue: S3UTILS-249
@bert-e

bert-e commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Hello francoisferrand,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.04167% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.65%. Comparing base (54b9b57) to head (e287a46).
⚠️ Report is 12 commits behind head on development/1.

Files with missing lines Patch % Lines
CompareRaftMembers/followerDiff.js 0.00% 33 Missing ⚠️
CompareRaftMembers/compareFollowerDbs.js 0.00% 27 Missing ⚠️
utils/heapProfiler.js 0.00% 5 Missing ⚠️
VerifyReplication/storage/s3.js 0.00% 2 Missing ⚠️
bucketVersionsStats.js 0.00% 1 Missing ⚠️
cleanupBuckets.js 0.00% 1 Missing ⚠️
cleanupNoncurrentVersions.js 0.00% 1 Missing ⚠️
removeDeleteMarkers.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           development/1     #415      +/-   ##
=================================================
+ Coverage          45.78%   47.65%   +1.87%     
=================================================
  Files                 88       87       -1     
  Lines               6555     6249     -306     
  Branches            1383     1334      -49     
=================================================
- Hits                3001     2978      -23     
+ Misses              3504     3223     -281     
+ Partials              50       48       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@francoisferrand
francoisferrand requested review from a team, DarkIsDude, SylvainSenechal, delthas, maeldonn and nicolas2bert and removed request for a team, SylvainSenechal and delthas October 15, 2026 14:20

@DarkIsDude DarkIsDude left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe should we check the codecov ?

@bert-e

bert-e commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@francoisferrand
francoisferrand force-pushed the improvement/S3UTILS-249-deprecated-deps branch from 5671014 to 25ecad8 Compare October 15, 2026 16:15
Comment thread CompareRaftMembers/followerDiff.js Outdated
@francoisferrand
francoisferrand force-pushed the improvement/S3UTILS-249-deprecated-deps branch from 25ecad8 to 22a2375 Compare October 15, 2026 17:37
Comment thread CompareRaftMembers/followerDiff.js Outdated
Comment thread CompareRaftMembers/compareFollowerDbs.js Outdated
@francoisferrand
francoisferrand force-pushed the improvement/S3UTILS-249-deprecated-deps branch from 22a2375 to bf04b9f Compare October 15, 2026 17:42
Comment thread CompareRaftMembers/followerDiff.js
@scality scality deleted a comment from bert-e Oct 15, 2026
followerDiff, compareFollowerDbs and the listing digests storage still
used the level 7 API, which went away when level was bumped to 9:
`new Level()` throws "Level is not a constructor" and createReadStream()
no longer exists, so these tools could not run at all. The unit tests
did not notice, as they only used mocked databases.

Depend on classic-level directly, like arsenal does, which also avoids
building a second copy of it. Range options and encodings are unchanged,
so existing databases read the same as with level 7.

classic-level only provides iterators, so a small read stream wraps them
into the { key, value } objects the comparison streams expect. It does
not use Readable.from(), which still emits 'end' when destroyed from a
'data' handler, as DiffStream does when it drops a digests stream.

classic-level also opens databases lazily, so the scanned databases and
the digests database are opened upfront. They are opened without
creating them, so that a wrong path fails the scan instead of silently
comparing against a new empty database.

Issue: S3UTILS-249
Each scanned database was left open until the process exited. With the
legacy layout there is one database per bucket, so file descriptors and
LevelDB caches piled up over a scan: close each one when its scan is
done.

Errors from the database read stream were not handled either, since
.pipe() does not forward them: a read error crashed the process without
logging anything. Errors from any stage now go through a single
callback, which logs them, closes the databases and fails the scan,
keeping the original error if closing fails too.

Issue: S3UTILS-249
@francoisferrand
francoisferrand force-pushed the improvement/S3UTILS-249-deprecated-deps branch from bf04b9f to e287a46 Compare October 15, 2026 21:18
@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1

The following branches have NOT changed:

  • development/1.13
  • development/1.14
  • development/1.15
  • development/1.16
  • development/1.17
  • development/1.18
  • development/1.19
  • development/1.4
  • development/1.7

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/1.14.19
  • hotfix/1.14.0

Please check the status of the associated issue S3UTILS-249.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit e287a46 into development/1 Oct 15, 2026
17 of 18 checks passed
@bert-e
bert-e deleted the improvement/S3UTILS-249-deprecated-deps branch October 15, 2026 21:31
@eve-ci-cd
eve-ci-cd Bot temporarily deployed to zenko/improvement/ZENKO-5376@2.16 October 15, 2026 22:03 Destroyed
@eve-ci-cd
eve-ci-cd Bot had a problem deploying to zenko/improvement/ZENKO-5376@2.16 October 16, 2026 17:39 Failure
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/improvement/ZENKO-5376@2.16 October 16, 2026 19:25 Active
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/development/2.16 October 17, 2026 08:22 Active
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/2.16.0-preview.4 October 17, 2026 09:29 Active
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/2.16.0 October 22, 2026 07:12 Active

This branch was successfully deployed

4 active deployments
zenko/2.16.0 — e287a462 Deployed Oct 22, 2026 by eve-ci-cd[bot]
zenko/2.16.0-preview.4 — e287a462 Deployed Oct 17, 2026 by eve-ci-cd[bot]
zenko/development/2.16 — e287a462 Deployed Oct 17, 2026 by eve-ci-cd[bot]
zenko/improvement/ZENKO-5376@2.16 — e287a462 Deployed Oct 16, 2026 by eve-ci-cd[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants