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

FHIR Gateway Enhancements #92

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

FHIR Gateway Enhancements #92

wants to merge 20 commits into from

Conversation

ndegwamartin
Copy link
Collaborator

IMPORTANT: Where possible all PRs must be linked to a Github issue

In this PR

  • Fix REL sync strategy Caching bug
  • Refactor to support returning all paginated results
  • Refactor REL upstream fetch to single request
  • Pagination count bumped to 200
  • Release version 2.1.2

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for
    bug fixes
  • I have added documentation for any new feature(s) and configuration
    option(s) on the README.md
  • I have run mvn spotless:check to check my code follows the project's
    style guide
  • I have run mvn clean test jacoco:report to confirm the coverage report
    was generated at plugins/target/site/jacoco/index.html
  • I ran mvn clean package right before creating this pull request.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 78.50467% with 46 lines in your changes missing coverage. Please review.

Project coverage is 67.61%. Comparing base (01da39e) to head (23ce64a).

Files with missing lines Patch % Lines
.../fhir/gateway/plugins/PermissionAccessChecker.java 27.58% 20 Missing and 1 partial ⚠️
...ister/fhir/gateway/plugins/SyncAccessDecision.java 84.42% 10 Missing and 9 partials ⚠️
.../org/smartregister/fhir/gateway/plugins/Utils.java 89.28% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #92      +/-   ##
============================================
+ Coverage     61.54%   67.61%   +6.07%     
- Complexity      206      247      +41     
============================================
  Files            16       16              
  Lines          1412     1541     +129     
  Branches        164      184      +20     
============================================
+ Hits            869     1042     +173     
+ Misses          458      402      -56     
- Partials         85       97      +12     

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


🚨 Try these New Features:

@ndegwamartin ndegwamartin mentioned this pull request Nov 7, 2024
5 tasks
Comment on lines 146 to 147
if (syncLocations.length == 0)
throw new IllegalStateException("No _syncLocation query param specified");
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a great idea but should only affect the requests made after the configs are done loading. I am not sure how we can separate that.

We are currently getting this error for good requests that should work without _syncLocation because they are being requested via that composition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dubdabasoduba how should the Gateway respond for requests that are using REL but do not have _syncLocation specified?

Copy link
Member

Choose a reason for hiding this comment

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

It should return an error saying that the sync locations are not set. However, We should ensure the requests made from the composition resources don't throw that error. Those requests are not affected by the sync strategies.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think those coming from composition should be ignored on the Allowed Queries or the Ignore Sync filter configuration file.

exec/pom.xml Outdated Show resolved Hide resolved
exec/pom.xml Outdated Show resolved Hide resolved
plugins/pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@ndegwamartin ndegwamartin marked this pull request as ready for review November 15, 2024 11:16
@ndegwamartin ndegwamartin force-pushed the gateway-enhancements branch 2 times, most recently from 56013d5 to 8562e3e Compare November 20, 2024 13:05
- Clean up
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.

3 participants