HL7 / fhir-ig-publisher

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

Publisher CLI ignores -tx n/a option #466

Open dotasek opened 2 years ago

dotasek commented 2 years ago

When running with -tx -n/a option, the publisher cli still attempts to connect to the terminology server.

To replicate, turn off any network connections, and run the following with a local version of US core repo:

java -jar org.hl7.fhir.publisher.cli-1.1.125-SNAPSHOT.jar -ig '/Users/me/IdeaProjects/US-Core/' -tx n/a  > publish-tx-na.log

This will result in many exceptions, but this one in particular should not occur:

org.hl7.fhir.exceptions.FHIRException: Unable to connect to terminology server. Error = null
        at org.hl7.fhir.r5.context.SimpleWorkerContext.connectToTSServer(SimpleWorkerContext.java:343)
        at org.hl7.fhir.igtools.publisher.comparators.PreviousVersionComparator.startChecks(PreviousVersionComparator.java:213)
        at org.hl7.fhir.igtools.publisher.Publisher.checkConformanceResources(Publisher.java:4829)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4743)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:855)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10193)
atruskot commented 2 years ago

Experiencing the same issue in my environment. We've been experimenting with deploying a local copy of the tx server because our build machines aren't allowed to reach out to the internet. Ideally (for us), we'd just allow the build machines to pull from the local cache that we are managing in git.