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

FI-2337: add disableDefaultResourceFetcher to fhir_resource_validator.cliContext defaults #456

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Feb 16, 2024

Summary

Adds the new HL7 validator wrapper cliContext setting disableDefaultResourceFetcher to our cliContext defaults. This depends on hapifhir/org.hl7.fhir.core#1526 but can be merged in before that because the hl7 validator wrapper ignores any unrecognized options. (confirmed against the production instance at https://validator.fhir.org/ )

Full details on this setting are available on the ^ linked PR, but it prevents fetching of unknown profiles and extensions, for example when a resource reports a profile in meta.profile that is not part of the IG under test. The Inferno validator wrapper does not fetch these profiles so this setting makes the hl7 wrapper match the inferno wrapper in that regard.

Testing Guidance

Here are the usual notes on using the hl7 validator wrapper:

  • enable the hl7_validator_service in docker-compose.background.yml and nginx.background.conf
  • In your test suite, use fhir_resource_validator instead of validator and make sure it points to the hl7 wrapper. An easy place to do this is in the demo suite dev_suites/dev_demo_ig_stu1/demo_suite.rb:
    fhir_resource_validator do
      url ENV.fetch('FHIR_RESOURCE_VALIDATOR_URL')
      exclude_message { |message| message.type == 'info' }
    end

@dehall dehall requested a review from Jammjammjamm February 16, 2024 21:22
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.79%. Comparing base (cfabde4) to head (c0c60d8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #456   +/-   ##
=======================================
  Coverage   77.79%   77.79%           
=======================================
  Files         233      233           
  Lines       11583    11583           
  Branches     1099     1099           
=======================================
  Hits         9011     9011           
  Misses       1940     1940           
  Partials      632      632           
Flag Coverage Δ
backend 93.90% <ø> (ø)
frontend 70.92% <ø> (ø)

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

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

@@ -300,7 +300,8 @@ class CliContext
CLICONTEXT_DEFAULTS = {
sv: '4.0.1',
doNative: false,
extensions: ['any']
extensions: ['any'],
disableDefaultResourceFetcher: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

How confident are you that this will end up being the name for this option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - I'm fairly confident but not 100% sure on that. The name has already changed once. With that in mind, maybe we should leave this PR open until the other PR is officially merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: the other PR has been merged: hapifhir/org.hl7.fhir.core#1526

@dehall dehall requested a review from Jammjammjamm February 28, 2024 16:33
@dehall dehall force-pushed the fi-2337-disablefetcher branch from 0ef196b to c0c60d8 Compare February 28, 2024 16:34
@dehall dehall merged commit 51adabe into main Feb 28, 2024
10 checks passed
@dehall dehall deleted the fi-2337-disablefetcher branch February 28, 2024 18:10
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.

2 participants