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(service-portal): Health fix nullable #14928

Merged
merged 4 commits into from
May 24, 2024

Conversation

thordurhhh
Copy link
Member

@thordurhhh thordurhhh commented May 24, 2024

Forgot this in: #14925 (comment)

Summary by CodeRabbit

  • Bug Fixes
    • Improved stability by allowing insurance confirmation and overview queries to return null values when data is unavailable.

@thordurhhh thordurhhh added the automerge Merge this PR as soon as all checks pass label May 24, 2024
Copy link
Contributor

coderabbitai bot commented May 24, 2024

Walkthrough

The recent changes involve modifying the OverviewResolver class in the overview.resolver.ts file. Specifically, the getInsuranceConfirmation and getInsuranceOverview functions now include the nullable: true property in their respective queries. This adjustment allows these functions to handle null values gracefully, improving the robustness and flexibility of the data retrieval process.

Changes

Files Change Summary
libs/api/domains/.../overview.resolver.ts Added nullable: true to the queries in getInsuranceConfirmation and getInsuranceOverview functions.

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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@thordurhhh thordurhhh changed the title Service portal/health overview fix fix(service-portal): Health fix nullable May 24, 2024
@thordurhhh thordurhhh marked this pull request as ready for review May 24, 2024 15:57
@thordurhhh thordurhhh requested a review from a team as a code owner May 24, 2024 15:57
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

Outside diff range and nitpick comments (1)
libs/api/domains/rights-portal/src/lib/overview/overview.resolver.ts (1)

Line range hint 16-17: Convert imports used only for type annotations to type-only imports to optimize bundling and clarify their usage.

- import { User } from '@island.is/auth-nest-tools'
+ import type { User } from '@island.is/auth-nest-tools'
Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between ee051da and 469e699.
Files selected for processing (1)
  • libs/api/domains/rights-portal/src/lib/overview/overview.resolver.ts (2 hunks)
Additional Context Used
Biome (3)
libs/api/domains/rights-portal/src/lib/overview/overview.resolver.ts (3)

36-36: Decorators are not valid here.


47-47: Decorators are not valid here.


16-17: All these imports are only used as types.

Path-based Instructions (1)
libs/api/domains/rights-portal/src/lib/overview/overview.resolver.ts (1)

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

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (2)
libs/api/domains/rights-portal/src/lib/overview/overview.resolver.ts (2)

32-32: The inclusion of nullable: true enhances the flexibility of the getInsuranceConfirmation method by allowing it to return null values. This change aligns with the PR objectives.


43-43: The inclusion of nullable: true in the getInsuranceOverview method is a necessary update to handle potential null values in the response, which is in line with the PR objectives.

@datadog-island-is
Copy link

datadog-island-is bot commented May 24, 2024

Datadog Report

All test runs 04b4a26 🔗

36 Total Test Services: 0 Failed, 34 Passed
🔻 Test Sessions change in coverage: 3 decreased, 2 increased, 158 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 81 0 31.63s 1 no change Link
air-discount-scheme-web 0 0 0 2 0 10.76s 1 no change Link
api 0 0 0 4 0 4.98s 1 no change Link
api-domains-air-discount-scheme 0 0 0 6 0 40.02s 1 no change Link
api-domains-assets 0 0 0 3 0 26.35s 1 no change Link
api-domains-auth-admin 0 0 0 18 0 13.03s 1 no change Link
api-domains-driving-license 0 0 0 23 0 34.63s 1 no change Link
api-domains-education 0 0 0 8 0 31.09s 1 no change Link
api-domains-health-insurance 0 0 0 4 0 20.5s 1 no change Link
api-domains-license-service 0 0 0 0 0 1.28s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (3)

  • auth-api-lib - jest 10.79% (-0.03%) - Details
  • services-auth-personal-representative-public - jest 46.84% (-0.03%) - Details
  • services-auth-personal-representative - jest 51.06% (-0.02%) - Details

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.09%. Comparing base (0e79664) to head (469e699).
Report is 2 commits behind head on main.

Current head 469e699 differs from pull request most recent head 13ded3e

Please upload reports for the commit 13ded3e to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #14928   +/-   ##
=======================================
  Coverage   37.09%   37.09%           
=======================================
  Files        6353     6353           
  Lines      129382   129382           
  Branches    36939    36939           
=======================================
  Hits        47992    47992           
  Misses      81390    81390           
Flag Coverage Δ
api 3.48% <ø> (ø)

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 91ab0b7...13ded3e. Read the comment docs.

@kodiakhq kodiakhq bot merged commit 393bb7d into main May 24, 2024
97 checks passed
@kodiakhq kodiakhq bot deleted the service-portal/health-overview-fix branch May 24, 2024 16:33
thordurhhh added a commit that referenced this pull request May 24, 2024
* Fix health overview display

* Add nullable res guard

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
kodiakhq bot added a commit that referenced this pull request May 24, 2024
…14931)

* fix(service-portal): Fix health overview display (#14925)

* fix(service-portal): Health fix nullable (#14928)

* Fix health overview display

* Add nullable res guard

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

---------

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.

2 participants