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

Upgrade AWS SDK DynamoDB from v2 > v3 #2062

Open
wants to merge 42 commits into
base: develop
Choose a base branch
from

Conversation

lailien3
Copy link
Contributor

@lailien3 lailien3 commented Oct 6, 2024

https://eaflood.atlassian.net/browse/IWTF-3449

This ticket is part of upgrading rod-licensing from using the AWS SDK v2 to v3.

This ticket specifically covers upgrading the parts of our codebase that use the AWS SDK to use DynamoDB
(NOT SecretsManager, S3 or SQS yet)

We expect this to be the largest and most complex bit of the SDK upgrade.

Copy link

sonarqubecloud bot commented Oct 6, 2024

@lailien3 lailien3 force-pushed the feature/iwtf-3449-aws-v2-to-v3 branch 2 times, most recently from 780efb8 to c8bf535 Compare October 17, 2024 11:12
@lailien3 lailien3 self-assigned this Oct 19, 2024
@lailien3 lailien3 added the enhancement New feature or request label Oct 19, 2024
@lailien3 lailien3 assigned lailien3 and unassigned lailien3 Oct 19, 2024
@lailien3 lailien3 force-pushed the feature/iwtf-3449-aws-v2-to-v3 branch from b0adb0e to b806cb0 Compare October 20, 2024 00:21
@lailien3 lailien3 force-pushed the feature/iwtf-3449-aws-v2-to-v3 branch 2 times, most recently from 601bfd0 to ba82ad1 Compare November 29, 2024 04:31
Copy link
Collaborator

@jaucourt jaucourt left a comment

Choose a reason for hiding this comment

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

I've reviewed some of this, and I'm noticing common issues, such as use of let rather than const, multiple expect statements in tests and enforcement of a particular implementation via tests, rather than testing an expected result after particular inputs. Please could you check through yourself for further instances of these (I've highlighted the first few). Also, you're touching areas of the codebase that haven't been looked at since it was first written, and I'd say this is an opportunity to rewrite the over-complicated tests into the style we use now. Have a look through yourself and then we can go through it together?

packages/connectors-lib/src/__tests__/aws.spec.js Outdated Show resolved Hide resolved
packages/connectors-lib/src/__tests__/aws.spec.js Outdated Show resolved Hide resolved
packages/connectors-lib/src/__tests__/aws.spec.js Outdated Show resolved Hide resolved
packages/connectors-lib/src/__tests__/aws.spec.js Outdated Show resolved Hide resolved
const firstCall = ddbMock.call(0).args[0].input
expect(firstCall.RequestItems.NameOfTableToUpdate).toHaveLength(3)
const secondCall = ddbMock.call(1).args[0].input
expect(secondCall.RequestItems.NameOfTableToUpdate).toHaveLength(2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd say that the existing tests need to be completely rewritten; they're pretty complex and again, enforce a particular implementation. This is possibly better talked through, so give me a shout when you want to look at this.

@lailien3 lailien3 force-pushed the feature/iwtf-3449-aws-v2-to-v3 branch from 0f748cc to 8ccc00f Compare January 3, 2025 10:25
@lailien3 lailien3 force-pushed the feature/iwtf-3449-aws-v2-to-v3 branch from a81a092 to e5ca3fa Compare January 3, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants