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

Migrating to AWS SDK V3 | Add AWS SDK V3 Wrapper #7442

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Aug 15, 2023

Explain the changes

  1. add aws sdk v3 wrapper, in case we didn't receive the region (best practice is to get the region of the target bucket from the client).

Issues: Fixed #xxx / Gap #xxx

  1. none.

Testing Instructions:

Analyze resource
We use analyze resource with a change - we set the region to be the config.DEFAULT_REGION, params as aws sdk v3 structure, and use noobaa_s3_client.get_s3_client_v3_params function.

  1. Deploy noobaa on MInikube or Rancher Desktop (see guide).
    Note: nb is an alias that runs the local operator from build/_output/bin (alias created by devenv).
  2. Create namespacestore:
    nb namespacestore create <aws-s3 or s3-compatible> <namespace-store-name>
  3. Run analyze resource (It creates the log files and then deletes the created job):
    nb diagnostics analyze namespacestore <namespace-store-name>
  4. Cases:
    1 - s3-compatible - Noobaa bucket (with noobaa system as a server, the endpoint was taken from the field InternalDNS under S3 Addresses).
    2 - aws-s3 without flag region on a bucket in a region that is not 'us-east-1' (for example 'us-west-1').

To run jest tests:
npx jest test_noobaa_s3_client.test.js

  • Doc added/updated
  • Tests added: edit existing tests in test_noobaa_s3_client.test.js.

src/util/string_utils.js Outdated Show resolved Hide resolved
src/sdk/noobaa_s3_client/noobaa_s3_client_sdkv3.js Outdated Show resolved Hide resolved
@shirady shirady self-assigned this Aug 16, 2023
@pull-request-size pull-request-size bot added size/M and removed size/L labels Aug 17, 2023
@shirady shirady force-pushed the noobaa-s3-client-wrapper branch 2 times, most recently from 1c5a464 to 54aa732 Compare August 17, 2023 15:14
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
@shirady shirady merged commit 0763af9 into noobaa:master Aug 21, 2023
7 checks passed
@shirady shirady deleted the noobaa-s3-client-wrapper branch August 21, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants