Stream: shorthand
Topic: Sushi has failed - no errors count in the output.
Keith Boone (Apr 20 2020 at 05:33):
I'm running latest IG-Builder and getting this:
Package Cache: C:\Users\kboone\.fhir\packages (00:00.0140)
Run Sushi on C:\Users\kboone\git\fhir-saner (00:00.0140)
Sushi: info Running SUSHI v0.12.0 (00:01.0233)
Sushi: info Current FSH tank conforms to an IG Publisher context. Output will be adjusted accordingly. (00:01.0233)
Sushi: info Checking local cache for hl7.fhir.r4.core#4.0.1... (00:01.0246)
Sushi: info Found hl7.fhir.r4.core#4.0.1 in local cache. (00:02.0707)
Sushi: info Importing FSH text... (00:02.0712)
Sushi: info Preprocessed 11 documents with 1 aliases. (00:02.0909)
Sushi: info Imported 36 definitions and 25 instances. (00:02.0931)
Sushi: info Loaded package hl7.fhir.r4.core#4.0.1 (00:02.0939)
Sushi: info Converting FSH to FHIR resources... (00:02.0946)
Sushi has failed - no errors count in the output. Complete output from running Sushi : warn Extension with slice name 'type' will be treated as an inline extension, even though the name can be resolved to the external extension: http://hl7.org/fhir/StructureDefinition/familymemberhistory-type. Starting with SUSHI 0.10.0, extension slices us (00:08.0665)
Load Template from #ig-template
I don't know if I'd call this a Sushi error or a ig-publisher error.
Keith Boone (Apr 20 2020 at 05:34):
It's actually fine if there really aren't any errors, but if there are,
a) I'm not seeing the output in Eclipse Console view of my batch script
b) The build hangs waiting for sushi to finish.
@Chris Moesel @Grahame Grieve @Josh Mandel
Jean Duteau (Apr 20 2020 at 05:36):
the publisher thinks that the warning from sushi is an error when it isn't. but with my publisher run where I have the same error, it doesn't hang the publisher
Jean Duteau (Apr 20 2020 at 05:37):
Sushi: info Converting FSH to FHIR resources... (00:03.0419)
Sushi has failed - no errors count in the output. Complete output from running Sushi : warn Extension with slice name 'question' will be treated as an inline extension, even though the name can be resolved to the external extension: http://hl7.org/fhir/StructureDefinition/elementdefinition-question. Starting with SUSHI 0.10.0, extension sli (00:05.0565)
Load Template from fhir.base.template (00:07.0006)
onLoad.findSpreadsheets:
onLoad.updateIg:
...
and so on
Keith Boone (Apr 20 2020 at 05:39):
If I don't actually have any errors, the publisher continues. Otherwise, it waits for a while.
Keith Boone (Apr 20 2020 at 05:39):
And then I get bored and kill it, because it clearly isn't doing anything but waiting for Sushi to finish, which it already has.
Jean Duteau (Apr 20 2020 at 05:40):
if your build is hanging, could it be the template load that is wrong:
hmm, this line in your log does look suspicious:
Load Template from #ig-template
I think #ig-template should have been replaced with the specific template that you want your guide to use?
Jean Duteau (Apr 20 2020 at 05:41):
yeah, I just checked and when it spits out that "Load Template..." line, it's done with sushi and has moved on
logger.logMessage(Utilities.padLeft("", ' ', level) + "Load Template from "+template); NpmPackage npm = loadPackage(template, rootFolder);
Keith Boone (Apr 20 2020 at 05:52):
Um, no. #ig-template means load a local template from the ig-template folder. I add a small thing or do to CSS to make some things less hard.
more trouble than it's worth to turn into a full-blown template.
Jean Duteau (Apr 20 2020 at 05:52):
oh okay. just wondering
Jean Duteau (Apr 20 2020 at 05:52):
but I am right that it's not longer waiting for sushi when it spits out that line
Keith Boone (Apr 20 2020 at 05:53):
Right.
Jean Duteau (Apr 20 2020 at 05:53):
what a complex web we've weaved! :)
Keith Boone (Apr 20 2020 at 05:53):
So my first dump was from a build that was completing, because It never gets to the line "Sushi has failed" when it hangs, but it's all related.
Keith Boone (Apr 20 2020 at 05:54):
So, there's a problem in the interface between Sushi and IG-builder. Now we understand ourselves the kind of frustrations our customers have.
Grahame Grieve (Apr 20 2020 at 11:42):
IG builder checks that Sushi says no errors. if it doesn't then the IG builder assumes that Sushi failed in some unusual way
Chris Moesel (Apr 20 2020 at 13:16):
@Grahame Grieve -- are you attempting to parse the output text to see if there are errors or are you checking the exit code of the process? Ideally the IG Publisher should just look at the exit code. If it's 0
, you're good to go; otherwise there was an error. Parsing the text will be subject to changes in how we log output, which, by the way, changed in the last few versions.
Grahame Grieve (Apr 20 2020 at 13:30):
in that past I've found that exit code is a quite unreliable way to assess that, but if you're confident about it, I'll change to do that
Chris Moesel (Apr 20 2020 at 13:52):
We've coded SUSHI to use exit code to indicate whether or not there are errors, specifically with CI use cases in mind. That said, I've just done some further testing and found that if I force a thrown exception to bubble all the way to the top, Node suppresses the exception and exits w/ error code 0
. That should be very rare (I'm not aware of any cases where that would happen), but we do call them "unexpected errors" for a reason -- so we'll update SUSHI to try to catch those at the top level and return a non-zero error code.
Chris Moesel (Apr 20 2020 at 14:31):
Logged as fhir/sushi#375
Last updated: Apr 12 2022 at 19:14 UTC