HL7 / fhir-ig-publisher

Source code for the IG publisher
Apache License 2.0
69 stars 57 forks source link

(First) publication fails on missing package-registry.json #851

Open jkiddo opened 9 months ago

jkiddo commented 9 months ago

A preflight check should be conducted by the publisher on the missing package-registry.json instead of one of the very last steps as well as the layout rules.

Check for Files to delete
  ... 4 files
Copy to new IG to /Users/jkiddo/work/falcon-ig/temp/web-root/run-20240124/
Exception publishing: File /Users/jkiddo/work/falcon-ig/temp/web-root/run-20240124/package-registry.json not found
java.io.IOException: File /Users/jkiddo/work/falcon-ig/temp/web-root/run-20240124/package-registry.json not found
    at org.hl7.fhir.utilities.json.parser.JsonParser.parseObject(JsonParser.java:68)
    at org.hl7.fhir.igtools.web.PackageRegistryBuilder.update(PackageRegistryBuilder.java:30)
    at org.hl7.fhir.igtools.web.PublicationProcess.doPublish(PublicationProcess.java:561)
    at org.hl7.fhir.igtools.web.PublicationProcess.publishInner2(PublicationProcess.java:393)
    at org.hl7.fhir.igtools.web.PublicationProcess.publishInner(PublicationProcess.java:231)
    at org.hl7.fhir.igtools.web.PublicationProcess.publish(PublicationProcess.java:123)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:12257)
jkiddo commented 9 months ago

Further investigation showed that the content of the json file didn't meet expectations of the IG publisher

jkiddo commented 9 months ago

... so the error about the file not is existing is actually about a file not containing expected content

lmckenzi commented 8 months ago

Will definitely get it to spit out a correct message (not valid, rather than not found). Will evaluate whether it's feasible to check the content earlier in the process.