Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(scripts): migrate AWS SDK for JavaScript v2 APIs to v3 #11587

Merged
merged 7 commits into from
Nov 6, 2023
Merged

(scripts): migrate AWS SDK for JavaScript v2 APIs to v3 #11587

merged 7 commits into from
Nov 6, 2023

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Nov 4, 2023

Proposed changes

This PR migrates AWS SDK for JavaScript v2 APIs to v3 in scripts

From AWS SDK for JavaScript v2 README:

We are formalizing our plans to make the Maintenance Announcement (Phase 2) for AWS SDK for JavaScript v2 in 2023.

Types of changes

Updating scripts

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

Copy link

linux-foundation-easycla bot commented Nov 4, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@trivikr trivikr marked this pull request as ready for review November 4, 2023 06:43
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Awesome to see the SDK supporting promises 🙌

LGTM 👍

@christian-bromann christian-bromann added the PR: Internal 🏠 PRs that contain changes internals label Nov 6, 2023
@christian-bromann christian-bromann merged commit e5ec08b into webdriverio:main Nov 6, 2023
4 of 8 checks passed
@christian-bromann
Copy link
Member

@trivikr thanks for raising the PR and helping to transition to the new major version. Really appreciate it!

@trivikr trivikr deleted the aws-sdk-js-codemod branch November 6, 2023 01:21
@christian-bromann
Copy link
Member

I am seeing some issues deploying the docs:

Uploading /home/runner/work/webdriverio/webdriverio/website/build to S3 bucket webdriver.io
Invalidate objects from distribution ***
/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js:10
        throw new Error("Region is missing");
              ^

Error: Region is missing
    at default (/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js:10:15)
    at /home/runner/work/webdriverio/webdriverio/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js:6:83
    at /home/runner/work/webdriverio/webdriverio/node_modules/@smithy/property-provider/dist-cjs/chain.js:12:39
    at async coalesceProvider (/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/property-provider/dist-cjs/memoize.js:14:24)
    at async /home/runner/work/webdriverio/webdriverio/node_modules/@smithy/property-provider/dist-cjs/memoize.js:26:28
    at async useFipsEndpoint (/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js:21:74)
    at async resolveParams (/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js:37:40)
    at async getEndpointFromInstructions (/home/runner/work/webdriverio/webdriverio/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js:15:28)
    at async /home/runner/work/webdriverio/webdriverio/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js:8:26
    at async /home/runner/work/webdriverio/webdriverio/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26

Any idea what that could be?

@trivikr
Copy link
Contributor Author

trivikr commented Nov 8, 2023

        throw new Error("Region is missing");
              ^

How was region set earlier in JS SDK v2?

The S3 client is created without any configuration in source code

const s3 = new S3()

The infrastructure might be setting region somewhere else, like in AWS_REGION environment variable, or region in shared ini.

@christian-bromann
Copy link
Member

Good question, it seems like it wasn't set before at all.

christian-bromann added a commit that referenced this pull request Nov 8, 2023
@christian-bromann
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Internal 🏠 PRs that contain changes internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants