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

fix(os) helpers for getting domain and index for opensearch #992

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

thetif
Copy link
Collaborator

@thetif thetif commented Jan 8, 2025

💬 Description / Notes

Refactor to standard how we are getting the osDomain and index.

🛠 Changes

  • created a helper method for getting and normalizing the domain and index from the environment variables
  • updated code that got process.env.osDomain and/or process.env.indexNamespace to use the helper methods
  • updated the code and tests as necessary
  • updated appk tests to use mocked opensearch

@thetif thetif requested a review from benjaminpaige January 8, 2025 20:30
@thetif thetif temporarily deployed to refactor-os-envs January 8, 2025 20:32 — with GitHub Actions Inactive
@thetif thetif temporarily deployed to refactor-os-envs January 8, 2025 20:32 — with GitHub Actions Inactive
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 80.64% 7139 / 8852
🔵 Statements 79.64% 7460 / 9367
🔵 Functions 71.89% 2077 / 2889
🔵 Branches 48.43% 1334 / 2754
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
lib/lambda/deleteIndex.ts 100% 66.66% 100% 100%
lib/lambda/getAttachmentUrl.test.ts 98.27% 100% 94.11% 98.07% 14-16
lib/lambda/getAttachmentUrl.ts 83.78% 70% 100% 83.78% 86-110
lib/lambda/getCpocs.ts 100% 100% 100% 100%
lib/lambda/getSubTypes.ts 93.33% 75% 100% 93.33% 66-69
lib/lambda/getTypes.ts 93.33% 75% 100% 93.33% 58-61
lib/lambda/itemExists.test.ts 100% 100% 100% 100%
lib/lambda/search.test.ts 100% 100% 100% 100%
lib/lambda/search.ts 90% 75% 100% 89.65% 54-56
lib/lambda/sinkChangelog.ts 0% 0% 0% 0% 15-141
lib/lambda/sinkMain.test.ts 100% 100% 100% 100%
lib/lambda/sinkMainProcessors.test.ts 100% 100% 100% 100%
lib/lambda/update/getPackageType.ts 0% 0% 0% 0% 5-24
lib/lambda/update/updatePackage.ts 0% 0% 0% 0% 10-230
lib/libs/opensearch-lib.ts 59.04% 55.38% 70% 58.82% 37-43, 57-58, 66, 77-88, 94-100, 117, 192-193, 200-228, 239, 262-263, 272
lib/libs/sink-lib.ts 100% 93.33% 100% 100%
lib/libs/utils.ts 100% 100% 100% 100%
lib/libs/api/package/appk.test.ts 100% 100% 100% 100%
lib/libs/api/package/appk.ts 100% 100% 100% 100%
lib/libs/api/package/changelog.ts 100% 100% 100% 100%
lib/libs/api/package/getPackage.ts 100% 100% 100% 100%
lib/libs/api/package/itemExists.ts 100% 75% 100% 100%
lib/libs/email/content/withdrawPackage/emailTemplates/ChipSpaCMS.tsx 100% 100% 100% 100%
lib/libs/email/content/withdrawPackage/emailTemplates/ChipSpaState.tsx 100% 100% 100% 100%
Generated in workflow #1416 for commit 2e5813f by the Vitest Coverage Report Action

Copy link
Collaborator

@benjaminpaige benjaminpaige left a comment

Choose a reason for hiding this comment

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

Excellent

@thetif thetif merged commit cdfae2a into main Jan 8, 2025
15 checks passed
RanyeM pushed a commit that referenced this pull request Jan 9, 2025
* created helpers for getting domain and index for opensearch
* fixed import
RanyeM added a commit that referenced this pull request Jan 9, 2025
* feature: adding new FAQ to FAQ page

* feature: question should open corresponding section

* fix: corrected code back to faq page direct link

* fix: removed id

* fix: #5 and #6 to expanded section

* fix: test coverage

* revert package json to what is on main

* fix(email): Fixes an issue with Outlook not correctly displaying the OneMAC logo and header (#972)

* fixed index test

* fix(test): Create mock for calling lambdas (#973)

* Added msw endpoints for Lambda, Step Functions, Secure Token Services, and other related services
* Added/updated test data to support new endpoints
* Updated tests to use the new endpoints instead of mocking individually

* fix(email): switch email logo back to using url

* fix(schema): remove logic for determining next business day for `submissionDate` (#980)

* fix: remove logic for determining next business day for `submissionDate`

* fix: update `submissionDate` value

* feat(ui): Remove status date from package details pages for all users (#965)

* fix(initial verbiage fix): Email verbiage fixes from qa (#974)

* correct verbage for med and chip spa

* fix issues with verbiage need confirmation

* remove comment

* add date and attachment logic

* update snapshots

* Update ChipSpaState.tsx

* test(email): proces email test (#979)

* feat(test)proces email test

* Removed console.log

* linter correction

* removed a ine

* remove brackets

* add region

* Address change reqeust

* feat(test)-submit lambda (#987)

* feat(test)-submit lambda

* Update withdrawpackage to withdrawrai

* linter corrections

* Fix some test

* Test for malformed objects

* Remove import vs code added in

* remove console.log

* Updatign to use get requestcontext

* feat(test) fix email test (#991)

* feat(test) fix email test
* Update processEmails.test.ts

* fix(os) helpers for getting domain and index for opensearch (#992)

* created helpers for getting domain and index for opensearch
* fixed import

* feat(test) updates to s3 calls on backend (#985)

* updates to s3 calls on backend

* feat(test)-unauthorized submission test (#996)

* feat(amend): Add waiver amendment emails (#993)

* Feat(playwright performance): Pw perf tests (#959)

* feat: initial perf tests for routes

fix: refactor

* Fix: updated per review comments

---------

Co-authored-by: asharonbaltazar <[email protected]>

---------

Co-authored-by: 13bfrancis <[email protected]>
Co-authored-by: Ty Bolt <[email protected]>
Co-authored-by: Tiffany Forkner <[email protected]>
Co-authored-by: asharonbaltazar <[email protected]>
Co-authored-by: James Dinh <[email protected]>
Co-authored-by: Thomas Walker <[email protected]>
Co-authored-by: Benjamin Paige <[email protected]>
Co-authored-by: Jon Schaffer <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 9, 2025

🎉 This PR is included in version 1.5.0-val.103 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants