Migrate to AWS SDK v3 - #1335
Merged
Merged
Conversation
aws-sdk v2 is end-of-support and no longer gets updates. utapi only used it for the IAM client, in ensureServiceUser and the test helpers, so switch to @aws-sdk/client-iam. The not-found check is the part to watch: err.code is gone in v3, so the NoSuchEntity check silently stops matching and a fresh install fails at GetUser instead of creating the user. That is how cloudserver broke S3C installs in CLDSRV-915. Match against the modeled exception instead, as backbeat and cloudserver do today. The client also needs an explicit region now, and no longer turns a missing list into an empty array. aws-sdk v2 still arrives through bucketclient, so the maintenance message stays suppressed in CI until BKTCLT-50 lands. Issue: UTAPI-115
Contributor
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
delthas
approved these changes
Sep 16, 2026
Contributor
Author
|
/approve |
Contributor
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue UTAPI-115. Goodbye francoisferrand. The following options are set: approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
aws-sdk v2 is end-of-support and no longer gets updates, and every other Scality component has moved on. utapi only used it for the IAM client — in
bin/ensureServiceUserand the test helpers — so this swaps it for@aws-sdk/client-iam. No S3 usage anywhere, so none of the usual v3 pain around path style or streaming bodies applies.The not-found check is the part worth reviewing. v2's
err.codeis gone in v3, soerr.code === 'NoSuchEntity'silently stops matching: on a fresh installGetUserthrows instead of falling through toCreateUser, and the script exits 1. That is exactly how cloudserver broke S3C installs in CLDSRV-915, where the migration swapped it forerr.name === 'NoSuchEntity'— also never true, since Vault's wire code deserializes toNoSuchEntityException. This matches against the modeled exception, like backbeat and cloudserver do today.Two other shape changes: the client needs an explicit region now (taken from the usual env vars, defaulting to
us-east-1, since Vault ignores it but SigV4 does not), and v3 leaves list fields undefined where v2 gave an empty array, so theListPolicies/ListUsers/ListAttachedUserPoliciesreaders are guarded.aws-sdk v2 still reaches us through
bucketclient → arsenal#8.2.4, soAWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGEhas to stay in CI for now — dropping it would put the maintenance warning on stderr and trip the empty-stderr gate. BKTCLT-50 tracks moving that pin.Targeting
development/8.3since 8.3.0 has not shipped yet.Verified with lint, the unit suite, and a mock Vault-style IAM endpoint driving
ensureServiceUserend to end: fresh-install create, idempotent re-run, SigV4 credential scope, and both empty-list XML shapes. The functional suite needs a live Vault, so CI is the real check there.Issue: UTAPI-115