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

feat(opensearchservice): nodeoptions for domain #32936

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dubesar
Copy link

@dubesar dubesar commented Jan 15, 2025

Issue # (if applicable)

Closes #32553.

Reason for this change

#32553.

Recently as a part of coordinator node project we introduced a new parameter called NodeOptions, currently its part of L1 construct but we wanted it to be part of L2 construct and that is why raising this PR.

Description of changes

The code is very much similar to - #28497 and follows all standard practices in the repository.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Unit tests -

> yarn test aws-opensearchservice
yarn run v1.22.22
$ jest aws-opensearchservice
 PASS  aws-opensearchservice/test/log-group-resource-policy.test.ts
 PASS  aws-opensearchservice/test/opensearch-access-policy.test.ts
 PASS  aws-opensearchservice/test/domain.test.ts (5.687 s)

=============================== Coverage summary ===============================
Statements   : 43.87% ( 9437/21508 )
Branches     : 23.09% ( 2037/8820 )
Functions    : 25.62% ( 1229/4796 )
Lines        : 44.6% ( 9285/20816 )
================================================================================
Jest: "global" coverage threshold for statements (55%) not met: 43.87%
Jest: "global" coverage threshold for branches (35%) not met: 23.09%

Test Suites: 3 passed, 3 total
Tests:       1326 passed, 1326 total
Snapshots:   0 total
Time:        7.538 s

Integration Tests -

    Running in parallel across regions: us-east-1, us-east-2, us-west-2
    Running test /Users/dubesar/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.nodeoptions.js in us-east-1
      SUCCESS    aws-opensearchservice/test/integ.opensearch.nodeoptions-OpenSearchInteg/DefaultTest 658.125s
           NO ASSERTIONS
     
    Test Results: 
     
    Tests:    1 passed, 1 total
    ✨  Done in 659.62s.

Snapshots is also generated as a part of integration tests

Checklist

YES

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

### Reason for this change
Introduced new interfaces and validation for configuring coordinator nodes in OpenSearch domains, allowing users to specify node options such as instance type and count.

### Description of changes
- Added `NodeOptions` and `NodeConfig` interfaces to define configurations for coordinator nodes.
- Updated the `Domain` class to handle `nodeOptions` in the capacity configuration, including validation for instance type and count.
- Enhanced unit tests to cover new configurations and validation scenarios for coordinator nodes.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Jan 15, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 15, 2025 13:05
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Jan 15, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review January 15, 2025 13:17

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 224d1c4
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon OpenSearch Service: High Level Constructs For OpenSearch Coordinator (NodeOptions) Feature
3 participants