Uploaded image for project: 'Hyrax Data Server'
  1. HYRAX-247

<Dimension> elements in a constrained DMR sometimes have 'random' order

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Reported by: alastair.mckinstry@sceal.ie

      We have a report from aleksander.vines@nersc.no that four of the DMR tests are failing for him when building libdap on travis. He has these failures with both libdap 3.18.0 and 3.18.1

      I'm building with libxml2 2.9.4.

      You can see the entire build output at https://travis-ci.org/nansencenter/libdap4-feedstock

      Attached is the DMRTest log. Here is an excerpt showing the error. Note the order of the Dimension elements in the first and second XML docs:

      177. DMRTest.at:483: testing trans test_array_5.xml scale(a,0.001)  test_array_5.xml.1.func_base ...
      ./DMRTest.at:483: $abs_builddir/dmr-test -x -t $input -f "$fe" -c "$ce" || true
      stderr:
      stdout:
      Parse successful
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" xml:base="file:dap4/test_array_5.xml" dapVersion="4.0" dmrVersion="1.0" name="test_array_5">
          <Dimension name="row" size="3"/>
          <Dimension name="col" size="4"/>
          <Int8 name="a">
              <Dim name="/row"/>
              <Dim name="/col"/>
          </Int8>
          <UInt8 name="b">
              <Dim name="/row"/>
              <Dim name="/col"/>
          </UInt8>
          <Int64 name="c">
              <Dim name="/row"/>
              <Dim name="/col"/>
          </Int64>
          <UInt64 name="d">
              <Dim name="/row"/>
              <Dim name="/col"/>
          </UInt64>
      </Dataset>
      
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" dapVersion="4.0" dmrVersion="1.0" name="function_results">
          <Dimension name="col" size="4"/>
          <Dimension name="row" size="3"/>
          <Float64 name="a">
              <Dim name="/row"/>
              <Dim name="/col"/>
              <Attribute name="DAP4_Checksum_CRC32" type="String">
                  <Value>f02c5eb0</Value>
              </Attribute>
          </Float64>
      </Dataset>
      

      According to StackOverflow, element order is significant and libxml2 preserves it, so this is a bug.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                jimg James Gallagher
                Reporter:
                jimg James Gallagher
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  2h