Skip to content

Fix missing @smithy/service-error-classification dependency - #2864

Merged
bert-e merged 5 commits into
development/9.6from
bugfix/BB-903-missing-smithy-dependency
Oct 2, 2026
Merged

bert-e merged 5 commits into
development/9.6from
bugfix/BB-903-missing-smithy-dependency

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

Since 9.6.0-preview.2, backbeat crashes at startup with Cannot find module '@smithy/service-error-classification/dist-es/constants'.

lib/clients/utils.js imported that package without declaring it. It used to come transitively through @aws-sdk/client-s3. Once the lock was rebuilt, the only copy left came through a dev dependency, so the production image no longer has it. The import also pointed at an internal dist-es path.

Changes:

  • Declare @smithy/service-error-classification and use its public isTransientError / isThrottlingError instead of the internal constants. These classifiers are a bit broader than the old lists: they also retry DNS and unreachable-host errors.
  • Declare @smithy/protocol-http as a dev dependency, since a unit test uses it.
  • Drop ioctl, minimatch and node-forge, which nothing in backbeat uses (ioctl is only an optional dependency of arsenal, for the file data store).
  • Enable eslint's import/no-unresolved and import/no-extraneous-dependencies, so lint fails on undeclared or dev-only imports in runtime code. The plugin was already a dev dependency but was never registered in the config.

Issue: BB-903

Backbeat crashes at startup since 9.6.0-preview.2: lib/clients/utils.js
deep-imported the error code lists from service-error-classification, which
was never declared. It used to come with older @aws-sdk/client-s3, and is
no longer installed in production since the lockfile rebuild.

Recent versions no longer ship those lists, so rely on the classifiers the
package exports instead: this follows the SDK's own retry classification,
which also covers a few more network errors (e.g. ENOTFOUND).

The lockfile also drops a stale dependency list for the cloudserver dev
dependency, which is what kept the old package around in dev installs.

Issue: BB-903
ReplicateObject tests use HttpRequest from it, but it was only installed
transitively through the AWS SDK.

Issue: BB-903
Nothing in backbeat uses them. node-forge and ioctl are still pulled by
arsenal (ioctl as an optional dependency, only needed by its file data
store), and minimatch only comes with dev tooling.

Issue: BB-903
Enable import/no-extraneous-dependencies so that requiring a package which
is only installed transitively, or only as a dev dependency, fails lint
instead of crashing at runtime. no-unresolved is needed as well, since
the former silently ignores modules it cannot resolve.

The import plugin was never registered in the flat config, so the
existing import/* settings had no effect so far.

Issue: BB-903
@bert-e

bert-e commented Oct 1, 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 Oct 1, 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

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.76%. Comparing base (073f2a1) to head (2674d29).
⚠️ Report is 5 commits behind head on development/9.6.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/clients/utils.js 54.54% <100.00%> (-3.79%) ⬇️

... and 3 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.25% <ø> (ø)
Core Library 83.64% <100.00%> (-0.62%) ⬇️
Ingestion 78.21% <ø> (ø)
Lifecycle 81.65% <ø> (ø)
Oplog Populator 85.90% <ø> (ø)
Replication 63.88% <ø> (ø)
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.6    #2864      +/-   ##
===================================================
- Coverage            77.01%   76.76%   -0.26%     
===================================================
  Files                  211      211              
  Lines                14562    14560       -2     
===================================================
- Hits                 11215    11177      -38     
- Misses                3337     3373      +36     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.32% <50.00%> (+<0.01%) ⬆️
api:routes 9.10% <50.00%> (+<0.01%) ⬆️
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 9.83% <0.00%> (-1.21%) ⬇️
ingestion 13.40% <50.00%> (+<0.01%) ⬆️
lib 9.09% <0.00%> (-0.01%) ⬇️
lifecycle 20.63% <50.00%> (+0.02%) ⬆️
notification 0.97% <0.00%> (+<0.01%) ⬆️
oplogPopulator 0.13% <0.00%> (+<0.01%) ⬆️
replication 18.94% <100.00%> (-0.04%) ⬇️
unit 57.93% <100.00%> (-0.01%) ⬇️

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

🚀 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 and benzekrimaha October 1, 2026 20:49
@francoisferrand
francoisferrand marked this pull request as ready for review October 1, 2026 20:49
@francoisferrand
francoisferrand requested review from a team and SylvainSenechal and removed request for a team, SylvainSenechal and benzekrimaha October 1, 2026 20:49

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

Btw i've always found this custom retry logic to be a bit hacky, maybe we can make some changes when we start working on replication error productization

@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

  • ✔️ development/9.6

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.6
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4
  • development/9.5

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

  • hotfix/7.4.9
  • hotfix/7.70.15
  • hotfix/7.10.1
  • hotfix/7.10.3
  • hotfix/7.10.0
  • hotfix/7.4.0
  • hotfix/7.4.2
  • hotfix/8.2.12
  • hotfix/7.10.12
  • hotfix/7.7.0
  • hotfix/7.4.6
  • hotfix/7.4.4
  • hotfix/7.70.1
  • hotfix/7.4.1
  • hotfix/7.9.0
  • hotfix/7.2.0
  • hotfix/7.4.3
  • hotfix/7.10.2
  • hotfix/7.4.8
  • hotfix/7.10.4
  • hotfix/7.10.17
  • hotfix/7.10.8
  • hotfix/9.0.4
  • hotfix/7.70.12
  • hotfix/9.0.7
  • hotfix/7.4.10
  • hotfix/7.8.0
  • hotfix/7.6.0
  • hotfix/7.4.7
  • hotfix/7.4.5

Please check the status of the associated issue BB-903.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit 2674d29 into development/9.6 Oct 2, 2026
24 checks passed
@bert-e
bert-e deleted the bugfix/BB-903-missing-smithy-dependency branch October 2, 2026 11:47
@eve-ci-cd
eve-ci-cd Bot deployed to zenko/improvement/ZENKO-5370@2.16 October 2, 2026 12:22 Active

This branch was successfully deployed

1 active deployment
zenko/improvement/ZENKO-5370@2.16 — 2674d29c Deployed Oct 2, 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