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

Refactor infra-stack and remove entrypoint file #88

Merged
merged 5 commits into from
Jan 5, 2024

Conversation

gaiksaya
Copy link
Member

Description

Refactors the infraStack class to add all checks and defaults value at the class level rather than in entrypoint. The change also remove entrypoint file since all it was doing was calling both network and infraclass which can be done in app.ts.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Copy link

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (3acacd6) 80.25% compared to head (6b9e5ec) 81.83%.

Files Patch % Lines
lib/infra/infra-stack.ts 93.82% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   80.25%   81.83%   +1.58%     
==========================================
  Files           7        6       -1     
  Lines         471      446      -25     
  Branches      141      167      +26     
==========================================
- Hits          378      365      -13     
+ Misses         93       81      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@@ -11,7 +11,7 @@ export class RemoteStoreResources {
this.snapshotS3Bucket = new Bucket(scope, `remote-store-${scope.stackName}`, {
removalPolicy: RemovalPolicy.DESTROY,
autoDeleteObjects: true,
bucketName: `${scope.stackName}`,
bucketName: `${scope.stackName.toLowerCase()}`,
Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @rishabh6788 ,

I saw this bug while adding test cases

    Bucket name must only contain lowercase characters and the symbols, period (.) and dash (-) (offset: 0)
    Bucket name must start and end with a lowercase character or number (offset: 0)

Hence changing this to lowercase. I wonder if we can remove the bucket name as each stack can track the associated bucket. Unless there is another use case that I might be unaware of

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@prudhvigodithi
Copy link
Collaborator

prudhvigodithi commented Jan 4, 2024

LGTM Sayali, please check the failing codecov workflow.

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya gaiksaya merged commit 71fa6ba into opensearch-project:main Jan 5, 2024
5 checks passed
@gaiksaya gaiksaya deleted the move-checks-infra branch January 5, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants