Off-by-one error in build tool: "cannot have an FMM level >1 (1) if it has warnings"

XMLWordPrintableJSON

    • Type: Change Request
    • Resolution: Unresolved
    • Priority: Medium
    • FHIR Core (FHIR)
    • STU3
    • FHIR Infrastructure
    • (NA)
    • Enhancement

      https://github.com/HL7/fhir/blob/master/tools/java/org.hl7.fhir.tools.core/src/org/hl7/fhir/definitions/validation/ResourceValidator.java#L405 has logic that checks for FMM0, but prints an error about FMM1 – which leads to a very confusing build error:

      https://dev.azure.com/fhir-build/build.fhir.org/_build/results?buildId=2232&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9

      The following error caused us to waste 2h, because Subscription was already FMM1 (so we didn't think to bump it down further to 0, and the error was totally mysterious):


      _[java] Error on line 14
      [java] XTTE0570: An empty sequence is not allowed as the value of variable $groups
      [java] in variable groups
      [java] Error
      [java] SXXP0003: Error reported by XML parser: Premature end of file.
      [java] ERROR @ Subscription: Resource Subscription (FMM=1) cannot have an FMM level >1 (1) if it has warnings (src = ResourceValidator)
      [java] This was a Full Build 0.376 18sec 1286MB
      [java] java.lang.Exception: Errors executing build. Details logged.
      [java] at org.hl7.fhir.tools.publisher.Publisher.checkAllOk(Publisher.java:1864)
      [java] at org.hl7.fhir.tools.publisher.Publisher.validate(Publisher.java:1850)
      [java] at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:619)
      [java] at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:482) _

            Assignee:
            Unassigned
            Reporter:
            Josh Mandel
            Watchers:
            1 Start watching this issue

              Created:
              Updated: