FHIR Chat · Sushi: error Failed to load hl7.fhir.r4.core#4.0.1 · shorthand

Stream: shorthand

Topic: Sushi: error Failed to load hl7.fhir.r4.core#4.0.1


view this post on Zulip Joe Paquette (Feb 01 2021 at 12:56):

I updated our IG project to use Sushi 1.1.0 on Jan 20th and have not seen any errors. Our CI builds (Jenkins) have worked without error until this past Friday. It was late in the day, so I decided to wait and retry the build this morning. It failed again. This is the error I keep getting:

Sushi: info  Checking local cache for hl7.fhir.r4.core#4.0.1...                  (00:03.0709)
Sushi: info  Did not find hl7.fhir.r4.core#4.0.1 in local cache.                 (00:03.0712)
Sushi: info  Downloading hl7.fhir.r4.core#4.0.1...                               (00:03.0715)
Sushi: info  Downloaded hl7.fhir.r4.core#4.0.1                                   (00:19.0785)
Sushi: error Failed to load hl7.fhir.r4.core#4.0.1: ENOENT: no such file or directory, open '/home/jpaquette/.fhir/packages/hl7.fhir.r4.core#4.0.1/other/clinicalreasoning-integrating-decision-support-radiology-request.png' (00:23.0869)
Sushi: error Valid StructureDefinition resource not found. The FHIR package in your local cache may be corrupt. Local FHIR cache can be found at <home-directory>/.fhir/packages. For more information, see
https://wiki.hl7.org/FHIR_Package_Cache#Location. (00:23.0877)
Sushi couldn't be run. Complete output from running Sushi :                      (00:23.0891)

Each time, the "failed to load" file is different.
The Jenkins build is done within a Docker instance, so the .fhir cache will always be empty when starting the actual build process.

I tried to repeat this locally. First, I deleted my local .fhir cache and my local NPM node_modules. I then executed the same NPM build commands that are used in our Jenkins build. I got the same error but with a different file. I checked the local .fhir cache, and the file is there and I was able to open the file with no problem.

I re-ran my local build and of course it succeeded because the .fhir cache now exists.

It seems like that even though the log shows Downloaded hl7.fhir.r4.core#4.0.1 the downloading hasn't really completed. I'm assuming that the download is downloading a package tarball. Maybe the expansion of the tarball contents into the cache has not completed when Sushi is trying to load specific files for use.

Thoughts?

view this post on Zulip Joe Paquette (Feb 02 2021 at 11:40):

Never mind... I figured it out. We have a mono-repo (Lerna) with 2 IGs in the project. Lerna parallelizes the sub-project scripts so the execution of Sushi/IG generation were over lapping. Specifically the code that extracts the contents of the downloaded packages and moves it under the package directory from each sub-project were interfering with each other. Setting concurrency to 1 for that process solved the problem.


Last updated: Apr 12 2022 at 19:14 UTC