Skip to content

Migrate to AWS SDK v3 - #1335

Merged
bert-e merged 1 commit into
development/8.3from
improvement/UTAPI-115
Sep 16, 2026
Merged

bert-e merged 1 commit into
development/8.3from
improvement/UTAPI-115

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

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/ensureServiceUser and 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.code is gone in v3, so err.code === 'NoSuchEntity' silently stops matching: on a fresh install GetUser throws instead of falling through to CreateUser, and the script exits 1. That is exactly how cloudserver broke S3C installs in CLDSRV-915, where the migration swapped it for err.name === 'NoSuchEntity' — also never true, since Vault's wire code deserializes to NoSuchEntityException. 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 the ListPolicies/ListUsers/ListAttachedUserPolicies readers are guarded.

aws-sdk v2 still reaches us through bucketclient → arsenal#8.2.4, so AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE has 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.3 since 8.3.0 has not shipped yet.

Verified with lint, the unit suite, and a mock Vault-style IAM endpoint driving ensureServiceUser end 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

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
@bert-e

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

@francoisferrand
francoisferrand requested review from a team, benzekrimaha and delthas September 16, 2026 05:35

@benzekrimaha benzekrimaha 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.

LGTM

@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

@scality scality deleted a comment from bert-e Sep 16, 2026
@bert-e

bert-e commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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

  • ✔️ development/8.3

The following branches have NOT changed:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.1
  • development/8.2

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

  • hotfix/7.10.0
  • hotfix/7.10.2
  • hotfix/7.4.8
  • hotfix/7.4.7
  • hotfix/6.4.7
  • hotfix/7.10.1
  • hotfix/7.10.14
  • hotfix/7.7.0
  • hotfix/7.10.3
  • hotfix/7.4.0
  • hotfix/7.4.9
  • hotfix/7.10.4
  • hotfix/7.4.1
  • hotfix/7.6.0
  • hotfix/7.4.6
  • hotfix/7.4.5
  • hotfix/7.10.7
  • hotfix/7.4.3
  • hotfix/7.8.0
  • hotfix/7.4.10
  • hotfix/7.4.2
  • hotfix/7.4.4
  • hotfix/7.2.0
  • hotfix/7.9.0

Please check the status of the associated issue UTAPI-115.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit 49d9604 into development/8.3 Sep 16, 2026
15 checks passed
@bert-e
bert-e deleted the improvement/UTAPI-115 branch September 16, 2026 17:43
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