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(chore): missing env for application system #15926

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Conversation

disaerna
Copy link
Member

@disaerna disaerna commented Sep 9, 2024

Application system - Health Directorate

What

Missing env variables

Why

Causing errors 😭

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features
    • Introduced new entities for Health Directorate functionalities: Vaccination and Organ Donation, enhancing service capabilities in the application system.
    • Added new API endpoints for Vaccination and Organ Donation services in development, production, and staging configurations.

@disaerna disaerna requested a review from a team as a code owner September 9, 2024 14:43
Copy link
Contributor

coderabbitai bot commented Sep 9, 2024

Walkthrough

This pull request introduces two new entities, HealthDirectorateVaccination and HealthDirectorateOrganDonation, into the application-system-api.ts module. These entities are integrated into the serviceSetup function, along with new configuration entries for both development and production environments, enhancing the API's capabilities to manage health-related services.

Changes

File Path Change Summary
apps/application-system/api/infra/application-system-api.ts Added HealthDirectorateVaccination and HealthDirectorateOrganDonation entities to the serviceSetup function.
charts/islandis/values.dev.yaml Added paths for XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH and XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH.
charts/islandis/values.prod.yaml Added paths for XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH and XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH.
charts/islandis/values.staging.yaml Added paths for XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH and XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH.

Possibly related PRs


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@disaerna disaerna added the automerge Merge this PR as soon as all checks pass label Sep 9, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3aa0c69 and 10a3b62.

Files selected for processing (1)
  • apps/application-system/api/infra/application-system-api.ts (2 hunks)
Additional context used
Path-based instructions (1)
apps/application-system/api/infra/application-system-api.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
Additional comments not posted (2)
apps/application-system/api/infra/application-system-api.ts (2)

37-38: Ensure proper integration of new entities.

The addition of HealthDirectorateVaccination and HealthDirectorateOrganDonation to the import list is noted. It's crucial to ensure that these entities are properly integrated into the system and that their usage aligns with the intended functionality. Additionally, verify that all necessary configurations and dependencies for these entities are correctly set up in the system.

Verification successful

Integration of new entities is verified.

The entities HealthDirectorateVaccination and HealthDirectorateOrganDonation are properly integrated into the system. They are used across multiple files, including configuration and service setup files, indicating that their integration aligns with the intended functionality.

  • infra/src/dsl/xroad.ts: Definition of the entities.
  • apps/application-system/api/src/app/app.module.ts: Client configurations.
  • libs/clients/health-directorate/src/lib/clients: Service and provider implementations.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the integration and usage of the new entities in the system.

# Test: Search for the usage of the new entities. Expect: Proper integration and configuration.
rg --type typescript -A 5 $'HealthDirectorateVaccination|HealthDirectorateOrganDonation'

Length of output: 124


Script:

#!/bin/bash
# Description: Verify the integration and usage of the new entities in the system.

# Test: Search for the usage of the new entities. Expect: Proper integration and configuration.
rg -g '*.ts' -A 5 $'HealthDirectorateVaccination|HealthDirectorateOrganDonation'

Length of output: 24419


295-296: Review integration of new entities in service setup.

The integration of HealthDirectorateVaccination and HealthDirectorateOrganDonation into the serviceSetup function via the .xroad method is noted. Ensure that this integration is correctly implemented and that it aligns with the system's architecture and requirements. It's also important to verify that all necessary configurations for these entities are correctly set up and that they function as expected within the system.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 10a3b62 and 51ecc9c.

Files selected for processing (3)
  • charts/islandis/values.dev.yaml (1 hunks)
  • charts/islandis/values.prod.yaml (1 hunks)
  • charts/islandis/values.staging.yaml (1 hunks)
Additional comments not posted (6)
charts/islandis/values.staging.yaml (2)

636-636: Correct addition of organ donation path.

The environment variable XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH has been correctly added according to the PR description. This addition should enable the application to handle organ donation services effectively.


638-638: Correct addition of vaccination path.

The environment variable XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH has been correctly added as per the PR description. This should facilitate the handling of vaccination services within the application.

charts/islandis/values.prod.yaml (2)

628-628: Added environment variable for organ donation service.

The addition of XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH is aligned with the PR's objective to address missing environment variables for the Health Directorate. This should resolve the specific issue related to the organ donation service endpoint.


630-630: Added environment variable for vaccination service.

The addition of XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH is consistent with the PR's goal to enhance the application's functionality by providing a direct endpoint for vaccination services. This is a crucial update for the Health Directorate's API configurations.

charts/islandis/values.dev.yaml (2)

638-638: Added environment variable for organ donation path.

The addition of XROAD_HEALTH_DIRECTORATE_ORGAN_DONATION_PATH is correctly formatted and placed under the application-system-api section, aligning with the PR's objective to enhance health-related functionalities.


640-640: Added environment variable for vaccination path.

The addition of XROAD_HEALTH_DIRECTORATE_VACCINATION_PATH is correctly formatted and placed under the application-system-api section. This change supports the expansion of health services related to vaccination, which is crucial for the application's functionality.

Copy link
Member

@brynjarorng brynjarorng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.80%. Comparing base (3b2dd8f) to head (22a7f4f).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15926   +/-   ##
=======================================
  Coverage   36.80%   36.80%           
=======================================
  Files        6693     6693           
  Lines      137124   137124           
  Branches    38975    38975           
=======================================
  Hits        50469    50469           
  Misses      86655    86655           
Flag Coverage Δ
api 3.39% <ø> (ø)
application-system-api 41.65% <ø> (ø)
application-template-api-modules 23.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b2dd8f...22a7f4f. Read the comment docs.

@datadog-island-is
Copy link

Datadog Report

All test runs 176a969 🔗

3 Total Test Services: 0 Failed, 3 Passed
➡️ Test Sessions change in coverage: 4 no change

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
api 0 0 0 4 0 3.07s 1 no change Link
application-system-api 0 0 0 111 2 3m 28.36s 1 no change Link
application-template-api-modules 0 0 0 109 0 1m 45.26s 1 no change Link

@kodiakhq kodiakhq bot merged commit ebe2451 into main Sep 9, 2024
39 checks passed
@kodiakhq kodiakhq bot deleted the chore/fix-missing-hd-env branch September 9, 2024 15:25
jonnigs pushed a commit that referenced this pull request Sep 12, 2024
* fix: missing env

* chore: charts update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants