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 UnsupportedOperationException while validating MHD Document Bundle #5925

Merged
merged 2 commits into from
May 16, 2024

Conversation

subigre
Copy link

@subigre subigre commented May 11, 2024

Changelog:

  • Fetch the ValueSet resource and call expandVS(ValueSet source, boolean cacheOk, boolean Hierarchical) method
  • Add unit test and resources

Fixes #5924

@subigre
Copy link
Author

subigre commented May 12, 2024

Edit: rebasing on master did the job

Could someone from the team can retrigger the hapifhir.hapi-fhir (module-tests hapi_fhir_jpaserver_test_r4b) workflow step?

The build error comes from a connection timeout to Maven central:

11:47:35,773 [INFO] BUILD FAILURE
Could not retrieve code analysis results - Maven run failed.
11:47:35,773 [INFO] ------------------------------------------------------------------------
11:47:35,775 [INFO] Total time:  22.767 s
11:47:35,777 [INFO] Finished at: 2024-05-11T11:47:35-04:00
11:47:35,777 [INFO] ------------------------------------------------------------------------
11:47:35,779 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project hapi-fhir-jpaserver-test-r4b: The following artifacts could not be resolved: org.junit.platform:junit-platform-engine:jar:1.9.2 (absent): Could not transfer artifact org.junit.platform:junit-platform-engine:jar:1.9.2 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.124.215] failed: Connect timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project hapi-fhir-jpaserver-test-r4b: The following artifacts could not be resolved: org.junit.platform:junit-platform-engine:jar:1.9.2 (absent): Could not transfer artifact org.junit.platform:junit-platform-engine:jar:1.9.2 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.124.215] failed: Connect timed out
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.44%. Comparing base (497b9f2) to head (ff66cd5).
Report is 62 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5925      +/-   ##
============================================
+ Coverage     83.39%   83.44%   +0.04%     
- Complexity    26927    27082     +155     
============================================
  Files          1681     1692      +11     
  Lines        103965   104543     +578     
  Branches      13189    13234      +45     
============================================
+ Hits          86702    87232     +530     
- Misses        11613    11645      +32     
- Partials       5650     5666      +16     

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

@jamesagnew jamesagnew enabled auto-merge (squash) May 15, 2024 08:45
Copy link
Collaborator

@jamesagnew jamesagnew left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@subigre
Copy link
Author

subigre commented May 15, 2024

@jamesagnew I am not sure why it failed but I just run mvn spotless:check on the branch and everything went well:

[INFO] --- spotless:2.41.1:check (default-cli) @ hapi-fhir-server-cds-hooks ---
[INFO] Spotless.Java is keeping 73 files clean - 0 needs changes to be clean, 0 were already clean, 73 were skipped because caching determined they were already clean
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for HAPI-FHIR 7.3.2-SNAPSHOT:
[INFO]
[INFO] HAPI-FHIR .......................................... SUCCESS [  1.099 s]
[INFO] HAPI FHIR - Checkstyle ............................. SUCCESS [  0.066 s]
[INFO] HAPI FHIR - Deployable Artifact Parent POM ......... SUCCESS [  0.033 s]
[INFO] HAPI FHIR BOM ...................................... SUCCESS [  0.033 s]
[INFO] HAPI FHIR - Core Library ........................... SUCCESS [  0.609 s]
[INFO] HAPI FHIR - ServiceLoaders ......................... SUCCESS [  0.031 s]
[INFO] HAPI FHIR - ServiceLoaders - Caching API ........... SUCCESS [  0.035 s]
[INFO] HAPI FHIR - ServiceLoaders - Caching Caffeine ...... SUCCESS [  0.037 s]
[INFO] HAPI FHIR - ServiceLoaders - Caching Testing ....... SUCCESS [  0.030 s]
[INFO] HAPI FHIR - Server Framework ....................... SUCCESS [  0.056 s]
[INFO] HAPI FHIR - Validation Resources (DSTU3) ........... SUCCESS [  0.031 s]
[INFO] HAPI FHIR - Client Framework ....................... SUCCESS [  0.038 s]
[INFO] HAPI FHIR Test Utilities ........................... SUCCESS [  0.037 s]
[INFO] HAPI FHIR Structures - DSTU3 ....................... SUCCESS [  0.037 s]
[INFO] HAPI FHIR - Validation Resources (FHIR R4) ......... SUCCESS [  0.030 s]
[INFO] HAPI FHIR Structures - FHIR R4 ..................... SUCCESS [  0.039 s]
[INFO] HAPI FHIR - Validation Resources (DSTU2) ........... SUCCESS [  0.029 s]
[INFO] HAPI FHIR JPA Model ................................ SUCCESS [  0.042 s]
[INFO] HAPI FHIR Structures - HL7.org DSTU2 ............... SUCCESS [  0.038 s]
[INFO] HAPI FHIR Structures - FHIR r4b .................... SUCCESS [  0.036 s]
[INFO] HAPI FHIR - Validation Resources (FHIR R5) ......... SUCCESS [  0.031 s]
[INFO] HAPI FHIR Structures - FHIR R5 ..................... SUCCESS [  0.035 s]
[INFO] HAPI Tinder Plugin ................................. SUCCESS [  0.045 s]
[INFO] HAPI FHIR Structures - DSTU2 (FHIR v1.0.0) ......... SUCCESS [  0.037 s]
[INFO] HAPI FHIR - Validation Resources DSTU2.1 (2016May) . SUCCESS [  0.029 s]
[INFO] HAPI FHIR Structures - DSTU2.1 (2016May) ........... SUCCESS [  0.034 s]
[INFO] HAPI FHIR - Converter .............................. SUCCESS [  0.035 s]
[INFO] HAPI FHIR - Validation Resources (FHIR R4B) ........ SUCCESS [  0.030 s]
[INFO] HAPI FHIR JPA Model ................................ SUCCESS [  0.035 s]
[INFO] HAPI FHIR - Validation ............................. SUCCESS [  0.037 s]
[INFO] HAPI FHIR OkHttp Client ............................ SUCCESS [  0.037 s]
[INFO] HAPI FHIR JAX-RS Server ............................ SUCCESS [  0.034 s]
[INFO] HAPI FHIR JPA - Search Parameters .................. SUCCESS [  0.036 s]
[INFO] HAPI FHIR Storage api .............................. SUCCESS [  0.053 s]
[INFO] HAPI FHIR - Master Data Management ................. SUCCESS [  0.044 s]
[INFO] HAPI FHIR Subscription Server ...................... SUCCESS [  0.040 s]
[INFO] HAPI FHIR Server - SQL Migration ................... SUCCESS [  0.037 s]
[INFO] HAPI FHIR JPA Server - Batch2 Task Processor ....... SUCCESS [  0.040 s]
[INFO] hapi-fhir-storage-batch2-jobs ...................... SUCCESS [  0.035 s]
[INFO] hapi-fhir-server-openapi ........................... SUCCESS [  0.031 s]
[INFO] HAPI FHIR JPA Server ............................... SUCCESS [  0.055 s]
[INFO] HAPI FHIR JPA Server - HFQL Driver ................. SUCCESS [  0.034 s]
[INFO] HAPI FHIR TestPage Overlay ......................... SUCCESS [  0.039 s]
[INFO] HAPI FHIR - Docs ................................... SUCCESS [  0.033 s]
[INFO] hapi-fhir-storage-test-utilities ................... SUCCESS [  0.030 s]
[INFO] HAPI FHIR JPA Server Test Utilities ................ SUCCESS [  0.038 s]
[INFO] HAPI FHIR JPA Server Test Dstu2 .................... SUCCESS [  0.031 s]
[INFO] HAPI FHIR JPA Server Test Dstu3 .................... SUCCESS [  0.031 s]
[INFO] HAPI FHIR JPA Server - Batch2 specification tests .. SUCCESS [  0.030 s]
[INFO] HAPI FHIR JPA Server Test R4 ....................... SUCCESS [  0.038 s]
[INFO] HAPI FHIR JPA Server Test R4B ...................... SUCCESS [  0.029 s]
[INFO] HAPI FHIR JPA Server Test R5 ....................... SUCCESS [  0.031 s]
[INFO] HAPI FHIR JPA Server Elastic Test Utilities ........ SUCCESS [  0.030 s]
[INFO] HAPI Tinder Plugin - Test Project .................. SUCCESS [  0.037 s]
[INFO] HAPI FHIR - ServiceLoaders - Caching Guava ......... SUCCESS [  0.030 s]
[INFO] HAPI FHIR - Clinical Reasoning ..................... SUCCESS [  0.035 s]
[INFO] hapi-fhir-storage-mdm .............................. SUCCESS [  0.031 s]
[INFO] HAPI FHIR JPA Server - International Patient Summary (IPS) SUCCESS [  0.032 s]
[INFO] HAPI FHIR JPA Server - Master Data Management ...... SUCCESS [  0.040 s]
[INFO] HAPI FHIR - fhirtest.uhn.ca Deployable WAR ......... SUCCESS [  0.045 s]
[INFO] HAPI FHIR - Android ................................ SUCCESS [  0.036 s]
[INFO] HAPI FHIR - Command Line Client - API .............. SUCCESS [  0.036 s]
[INFO] HAPI FHIR - Command Line Client - Base Project ..... SUCCESS [  0.033 s]
[INFO] HAPI FHIR - Command Line Client - Application ...... SUCCESS [  0.041 s]
[INFO] HAPI FHIR - Distribution Archive ................... SUCCESS [  0.033 s]
[INFO] HAPI FHIR JAX-RS Server Kotlin test ................ SUCCESS [  0.039 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Client ....... SUCCESS [  0.030 s]
[INFO] HAPI FHIR - Minimal Dependency Test - Server ....... SUCCESS [  0.029 s]
[INFO] hapi-fhir-spring-boot-autoconfigure ................ SUCCESS [  0.030 s]
[INFO] hapi-fhir-spring-boot-starter ...................... SUCCESS [  0.028 s]
[INFO] hapi-fhir-spring-boot .............................. SUCCESS [  0.026 s]
[INFO] hapi-fhir-spring-boot-samples ...................... SUCCESS [  0.028 s]
[INFO] hapi-fhir-spring-boot-sample-client-apache ......... SUCCESS [  0.032 s]
[INFO] hapi-fhir-spring-boot-sample-client-okhttp ......... SUCCESS [  0.029 s]
[INFO] hapi-fhir-spring-boot-sample-server-jersey ......... SUCCESS [  0.029 s]
[INFO] HAPI FHIR - JaCoCo Test Coverage ................... SUCCESS [  0.030 s]
[INFO] HAPI FHIR - CDS Hooks .............................. SUCCESS [  0.036 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.958 s
[INFO] Finished at: 2024-05-15T19:07:22+02:00
[INFO] ------------------------------------------------------------------------

@jamesagnew jamesagnew disabled auto-merge May 16, 2024 06:20
@jamesagnew jamesagnew merged commit 446869b into hapifhir:master May 16, 2024
63 of 65 checks passed
@jamesagnew
Copy link
Collaborator

@subigre that is a false negative - because of some weird permissions issues we haven't yet figured out, external PRs always fail that check. Thanks again!

@subigre subigre deleted the fix-ihe-mhd-validation branch May 16, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants