Skip to content

Install arsenal and scubaclient from the npm registry instead of git - #6308

Merged
bert-e merged 12 commits into
development/9.5from
improvement/CLDSRV-997
Sep 28, 2026
Merged

bert-e merged 12 commits into
development/9.5from
improvement/CLDSRV-997

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

Arsenal and scubaclient were installed from git, so both compiled during yarn install via their prepare/postinstall hooks. That's exactly the kind of install-time build that's fragile on a new runtime, and the Dockerfile carried a global typescript@4.9.5 (older than either package's own TS 5.x requirement) just to make it work "by luck".

Both are now published on the npm registry as precompiled artifacts, so this removes the install-time build, the global typescript/node-gyp, and the frozen git refs.

  • arsenal is aliased (npm:@scality/arsenal@8.6.0-preview.1) rather than renamed, since there are ~285 require('arsenal') call sites — the alias keeps the diff to package.json/yarn.lock only.
  • scubaclient is renamed to @scality/scubaclient (only 3 require sites: lib/utilization/scuba/wrapper.js, tests/unit/quotas/scuba/wrapper.js, tests/unit/api/apiUtils/quotas/quotaUtils.js), API-compatible (getLatestMetrics/healthCheck/constructor unchanged).
  • Dockerfile's global typescript@4.9.5/node-gyp install is dropped since no remaining git dependency needs an install-time TS compile.

Verified with a fresh yarn install --frozen-lockfile on Node 24: require('ioctl') still works (CLDSRV-996's nan/ioctl fix undisturbed), arsenal.requestUrl.parseRequestTarget is present, ScubaClient.getLatestMetrics/healthCheck are present, lint is clean, and quota/scuba/objectCopy unit tests pass (231 passing).

Stacked on #6307 ("Run on Node 24") — targets improvement/CLDSRV-996-node-24, not development/9.5.

Issue: CLDSRV-997

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.54%. Comparing base (eb125a3) to head (155f4c0).
⚠️ Report is 12 commits behind head on development/9.5.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
bin/search_bucket.js 0.00% 1 Missing ⚠️
lib/api/apiUtils/bucket/checkPreferredLocations.js 0.00% 1 Missing ⚠️
lib/kms/utilities.js 0.00% 1 Missing ⚠️
lib/nfs/utilities.js 0.00% 1 Missing ⚠️
lib/utapi/utapi.js 0.00% 1 Missing ⚠️
lib/utapi/utapiReindex.js 0.00% 1 Missing ⚠️
lib/utapi/utapiReplay.js 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/Config.js 80.44% <100.00%> (ø)
lib/api/api.js 93.10% <100.00%> (ø)
lib/api/apiUtils/authorization/bucketOwner.js 92.30% <100.00%> (ø)
lib/api/apiUtils/authorization/permissionChecks.js 97.26% <100.00%> (ø)
...i/apiUtils/authorization/prepareRequestContexts.js 95.58% <100.00%> (ø)
lib/api/apiUtils/authorization/tagConditionKeys.js 69.23% <100.00%> (ø)
lib/api/apiUtils/bucket/bucketCors.js 92.95% <100.00%> (ø)
lib/api/apiUtils/bucket/bucketCreation.js 96.35% <100.00%> (ø)
lib/api/apiUtils/bucket/bucketDeletion.js 90.00% <100.00%> (ø)
lib/api/apiUtils/bucket/bucketEncryption.js 85.00% <100.00%> (ø)
... and 144 more
@@               Coverage Diff                @@
##           development/9.5    #6308   +/-   ##
================================================
  Coverage            86.54%   86.54%           
================================================
  Files                  213      213           
  Lines                14606    14606           
================================================
  Hits                 12641    12641           
  Misses                1965     1965           
Flag Coverage Δ
checksums-disabled-tests 35.38% <95.91%> (ø)
file-ft-tests 69.99% <96.42%> (-0.05%) ⬇️
file-ft-tests-null-compat 70.55% <96.42%> (+0.03%) ⬆️
kmip-ft-tests 28.16% <95.91%> (ø)
mongo-v0-ft-tests 71.18% <96.42%> (+0.06%) ⬆️
mongo-v1-ft-tests 71.13% <96.42%> (+0.01%) ⬆️
multiple-backend 36.14% <95.91%> (ø)
s3c-ft-tests-v0 65.05% <96.42%> (+0.02%) ⬆️
s3c-ft-tests-v0-null-compat 65.09% <96.42%> (+0.01%) ⬆️
s3c-ft-tests-v1 65.00% <96.42%> (ø)
sur-tests 36.68% <96.42%> (ø)
sur-tests-inflights 39.51% <96.42%> (ø)
unit 74.28% <95.91%> (ø)
utapi-v2-tests 35.36% <95.91%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-996-node-24 branch 2 times, most recently from e65085d to 4d4bdeb Compare September 25, 2026 09:56
Comment thread package.json
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-997 branch 2 times, most recently from 7cd934b to 2ea0ab1 Compare September 26, 2026 09:35
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-996-node-24 branch from 4a12afc to d454d68 Compare September 26, 2026 09:35
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-997 branch 4 times, most recently from 061b781 to 54f72c1 Compare September 27, 2026 11:30
Comment thread tests/functional/aws-node-sdk/test/bucket/head.js Outdated
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-997 branch 2 times, most recently from 11fdafb to a8603b7 Compare September 28, 2026 16:15
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-996-node-24 branch from d454d68 to 103d476 Compare September 28, 2026 16:15
Both were git dependencies that compiled their TypeScript sources
during yarn install via prepare/postinstall hooks. Arsenal is aliased
to the registry package (arsenal -> npm:@scality/arsenal@8.6.0-preview.1)
to avoid touching the ~285 require('arsenal') call sites; scubaclient
is renamed outright to @scality/scubaclient since only 3 files require
it. Both now ship precompiled JS, so no install-time tsc is needed for
either package anymore.

Issue: CLDSRV-997
They were only needed to compile arsenal and scubaclient's TypeScript
sources at install time when both were git dependencies. Now that both
are installed as precompiled registry packages, no git dependency in
package.json still needs an install-time build, so the toolchain is no
longer needed in the image.

Issue: CLDSRV-997
The npm registry alias ("arsenal": "npm:@scality/arsenal@...") let us
install from the registry while keeping the historical bare require,
but it means every dependency (bucketclient, utapi, ...) that itself
declares a peer/dependency on @scality/arsenal ends up with two
separate copies installed side by side instead of sharing one.

Rename the dependency to its real @scality/arsenal name and update all
require('arsenal') call sites accordingly, so the package resolves and
dedupes the same way as any other consumer of it.

Issue: CLDSRV-997
Tag 8.3.0 renames the package from bucketclient to @scality/bucketclient
and moves its arsenal peer/dev dependency to the @scality/arsenal
package name, matching the rename just made here. Update the sole
require site accordingly.

Issue: CLDSRV-997
A plain yarn upgrade floats @aws-sdk/client-s3 and @smithy/core to
their latest mutually-compatible versions (3.1140.0 / 3.35.0). The
newer @smithy/core no longer declares @smithy/util-stream as a
dependency even though its bundled code still requires it at runtime
(upstream packaging gap), so it's added as an explicit direct
dependency to keep arsenal's AWS SDK usage (requestUrl,
network/kmip client) working.

Verified require('ioctl'), require('@scality/arsenal'),
require('@scality/bucketclient'), require('@scality/scubaclient') and
requestUrl.parseRequestTarget all still work after a clean install.

Issue: CLDSRV-997
Same pattern as arsenal and bucketclient: the git tag's own
package.json already declares itself as @scality/utapi, so alias it
under that name instead of the bare utapi key.

Issue: CLDSRV-997
The @aws-sdk/client-s3 bump pulled in by the yarn.lock refresh moved
the CRC64NVME checksum container from
@aws-sdk/middleware-flexible-checksums to @aws-sdk/checksums. Update
the two functional test files that imported it directly so they no
longer fail with "Cannot find module '@aws-sdk/middleware-flexible-checksums'".

Also drop jsonwebtoken and fast-xml-parser from package.json
dependencies. Both are only needed as transitive dependencies of
@azure/storage-blob (via @azure/identity/@azure/msal-node and
@azure/core-xml respectively) and are already version-pinned through
the existing resolutions block; promoting them to direct dependencies
during the yarn.lock refresh was unintentional. Removing them does
not change yarn.lock or the installed versions.

@smithy/util-stream was unintentionally promoted to a direct dependency
during the yarn.lock refresh, same as the jsonwebtoken/fast-xml-parser
case fixed earlier. Unlike those, it is not required transitively by
anything else in the dependency tree either (it was the only consumer
of that package in yarn.lock), so removing it drops the package
entirely instead of just de-duplicating it. It is not require()'d
anywhere in cloudserver source. Flagged by Claude Code Review.

Issue: CLDSRV-997
instrumentation-http ~0.218 -> ~0.222, instrumentation-ioredis
~0.64 -> ~0.70, instrumentation-mongodb ~0.69 -> ~0.75, all sharing
the same @opentelemetry/instrumentation@0.222.0 core. Also refreshed
yarn.lock, bumping other transitive deps within their existing
semver ranges.

Issue: CLDSRV-997
With the old @aws-sdk/client-s3 the empty Bucket name actually reached
cloudserver and the test checked the 405 it returned. The newer SDK
rejects the empty path label client-side, so after the previous fix the
test only asserted an SDK error message and exercised nothing on the
server side.

The server behavior it used to cover (HEAD / must return 405
MethodNotAllowed instead of hitting bucketHead with no bucket) is
already covered over raw HTTP in raw-node/test/headObject.js, so drop
the duplicate instead of keeping a test of the SDK.

Issue: CLDSRV-997
The test only checked the ETag of the final GetObject and left the
30000-byte body unread, so the `after` hook's DeleteObject raced the
server still streaming parts: once the data is gone the server destroys
the response mid-stream and the client socket closes with an incomplete
body.

With @aws-sdk/client-s3 3.1141 the response checksum stream
(ChecksumStream, now in @smithy/core) forwards the underlying
IncomingMessage's `aborted` error onto `Body`. Nothing listens to it in
the test, so mocha dies with an uncaught `Error: aborted` in the after
hook. Older SDKs piped the source without forwarding its errors, which
is why this used to pass.

Read the body to completion (and check its content) so the object is
only deleted once the stream is done.

Issue: CLDSRV-997
@francoisferrand
francoisferrand force-pushed the improvement/CLDSRV-996-node-24 branch from 103d476 to eb125a3 Compare September 28, 2026 16:19
@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

Base automatically changed from improvement/CLDSRV-996-node-24 to development/9.5 September 28, 2026 16:47
@bert-e

bert-e commented Sep 28, 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.

@bert-e

bert-e commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

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

  • ✔️ development/9.5

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.8
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4

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

  • hotfix/9.2.36
  • hotfix/6.4.7
  • hotfix/7.4.6
  • hotfix/7.4.9
  • hotfix/7.10.3
  • hotfix/7.10.30
  • hotfix/7.70.45
  • hotfix/7.4.8
  • hotfix/9.3.13
  • hotfix/7.9.0
  • hotfix/7.4.2
  • hotfix/7.10.15
  • hotfix/7.4.7
  • hotfix/7.4.3
  • hotfix/7.10.2
  • hotfix/7.70.51
  • hotfix/7.10.4
  • hotfix/7.8.0
  • hotfix/7.4.10
  • hotfix/7.10.49
  • hotfix/9.0.32
  • hotfix/7.10.8
  • hotfix/7.4.1
  • hotfix/7.10.0
  • hotfix/7.10.27
  • hotfix/7.4.5
  • hotfix/7.2.0
  • hotfix/7.6.0
  • hotfix/7.4.4
  • hotfix/7.10.28
  • hotfix/7.10.1
  • hotfix/7.4.0
  • hotfix/7.70.11
  • hotfix/9.2.24
  • hotfix/7.7.0
  • hotfix/8.8.45
  • hotfix/7.70.21
  • hotfix/9.0.7
  • hotfix/7.70.73

Please check the status of the associated issue CLDSRV-997.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit 155f4c0 into development/9.5 Sep 28, 2026
34 checks passed
@bert-e
bert-e deleted the improvement/CLDSRV-997 branch September 28, 2026 16:58
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.

5 participants