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

chore(opensearchserverless): refactor cdk construct #797

Merged
merged 16 commits into from
Dec 4, 2024

Conversation

erdemayyildiz
Copy link
Contributor

@erdemayyildiz erdemayyildiz commented Nov 12, 2024

Fixes #737, #271

refactor for opensearchserverless constructs that follows best practices https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md

created interface for VectorCollection extended from IResource - https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#construct-interface
created VectorCollectionBase implements IVectorCollection - https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#abstract-base
created default metrics - https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#metrics
created import methods fromCollectionName, fromCollectionAttributes - https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#imports

developed additional test cases for refactored lines.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@krokoko
Copy link
Collaborator

krokoko commented Nov 13, 2024

Thanks @erdemayyildiz ! Could you please run a full build locally, it seems the build was failing because of a mutation

@krokoko
Copy link
Collaborator

krokoko commented Nov 21, 2024

Thanks @erdemayyildiz ! Could you please provide some information on how you tested those changes ? It would be great to deploy this with the bedrock agent sample from the constructs

Signed-off-by: Alain Krok <alkrok@amazon.com>
@erdemayyildiz
Copy link
Contributor Author

hi @krokoko

yes i have deployed bedrock-agent to test my changes.

Screenshot 2024-11-25 at 17 10 50

@krokoko krokoko self-requested a review November 25, 2024 21:10
Copy link
Collaborator

@krokoko krokoko left a comment

Choose a reason for hiding this comment

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

Overall looks good, only issue are the calls to generatePhysicalNamev2 which require an update

@krokoko krokoko self-requested a review December 3, 2024 22:26
@krokoko
Copy link
Collaborator

krokoko commented Dec 3, 2024

@erdemayyildiz pushed some changes with:

  • Exposed some missing props (description, collection type, tags)
  • Removed the "from..Name" method since type and standbyreplicas are needed, so kept only the "from...Atrributes" method
  • Tested to deploy bedrock-agent, 2 knowledge bases with oss in the same stack, and oss collections separately with multiple variations (enable/disable standbyreplicas, different collection type, ...)
  • Added tests to cover the new changes

@erdemayyildiz
Copy link
Contributor Author

Hey @krokoko great, thanks!

Copy link
Contributor

@MichaelWalker-git MichaelWalker-git left a comment

Choose a reason for hiding this comment

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

LGTM

@krokoko krokoko merged commit 9155562 into awslabs:main Dec 4, 2024
15 of 17 checks passed
@erdemayyildiz erdemayyildiz deleted the refactor-aoss branch December 5, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(opensearch): module refactoring to follow best practices from CDK
4 participants