Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-34557

Reinstate the missing ATWhiteLight ChillerL22Alarms enum value

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      TSSW Sprint - Apr 25 - May 09
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      The level22 field of the ATWhiteLight chillerAlarms event represents a bitmask that has 32 bits. This caused a bit of trouble for ts_sal: DM-34005, which Dave Mills has kindly fixed. I originally worked around it by omitting the last ChillerL22Alarms value. Update ts_xml to reinstate the value and specify the enum type as "unsigned int" or "unsigned long" (which are identical – both 32 bits).

        Attachments

          Issue Links

            Activity

            No builds found.
            rowen Russell Owen created issue -
            rowen Russell Owen made changes -
            Field Original Value New Value
            Link This issue relates to DM-34005 [ DM-34005 ]
            rowen Russell Owen made changes -
            Link This issue relates to DM-34561 [ DM-34561 ]
            rowen Russell Owen made changes -
            Link This issue relates to DM-34563 [ DM-34563 ]
            rowen Russell Owen made changes -
            Link This issue is child task of CAP-878 [ CAP-878 ]
            rowen Russell Owen made changes -
            Summary Split ATWhiteLight chillerAlarms.level22 into two pieces Reinstate the missing ATWhiteLight ChillerL22Alarms enum value
            rowen Russell Owen made changes -
            Link This issue relates to DM-34563 [ DM-34563 ]
            rowen Russell Owen made changes -
            Link This issue relates to DM-34561 [ DM-34561 ]
            rowen Russell Owen made changes -
            Link This issue relates to DM-34005 [ DM-34005 ]
            rowen Russell Owen made changes -
            Link This issue is triggered by DM-34005 [ DM-34005 ]
            rowen Russell Owen made changes -
            Description The level22 field of the ATWhiteLight chillerAlarms event represents a bitmask that has 64 bits. This causes a bit of trouble for ts_sal (DM-34005, which [~dmills] has kindly fixed) but it is also be problematic for the EFD, because that is loaded from Kafka messages described by Avro schemas and the longest integer that Avro supports is {{long}}: signed 64 bits. Avro has no support for unsigned integers.

            So: split this bitmask into two pieces, each 32 bits long

            Also update ts_xml to make the types of those bit mask fields {{long}} instead of {{unsigned int}}.
            The level22 field of the ATWhiteLight chillerAlarms event represents a bitmask that has 32 bits. This caused a bit of trouble for ts_sal: DM-34005, which [~dmills] has kindly fixed. I originally worked around it by omitting the last ChillerL22Alarms value. Update ts_xml to reinstate the value and specify the enum type as "unsigned int" or "unsigned long" (which are identical -- both 32 bits).
            rowen Russell Owen made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Hide
            rowen Russell Owen added a comment - - edited

            It turns out that the Event schema was not updated in ts_xml when implementing DM-34005, so using this feature broke ts_xml unit tests. So as part of this ticket I updated the Event schema but only for global enumerations. I figure we discourage per-topic enumerations, the type attribute is rarely needed, and the feature needs a lot of extra boilerplate. We can expand it if we find a need, but I hope we will not.

            I used develop of ts_sal to build the ATWhiteLight IDL file and compared it to the previous version and the new enumeration value is present but all of those enum values have type "long" (the usual) instead of "unsigned int", which I specified. I'll file a new ts_sal ticket.

            Pull request: https://github.com/lsst-ts/ts_xml/pull/576

            Show
            rowen Russell Owen added a comment - - edited It turns out that the Event schema was not updated in ts_xml when implementing DM-34005 , so using this feature broke ts_xml unit tests. So as part of this ticket I updated the Event schema but only for global enumerations. I figure we discourage per-topic enumerations, the type attribute is rarely needed, and the feature needs a lot of extra boilerplate. We can expand it if we find a need, but I hope we will not. I used develop of ts_sal to build the ATWhiteLight IDL file and compared it to the previous version and the new enumeration value is present but all of those enum values have type "long" (the usual) instead of "unsigned int", which I specified. I'll file a new ts_sal ticket. Pull request: https://github.com/lsst-ts/ts_xml/pull/576
            rowen Russell Owen made changes -
            Reviewers Petr Kubanek [ pkubanek ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            rowen Russell Owen made changes -
            Status In Review [ 10004 ] In Progress [ 3 ]
            rowen Russell Owen made changes -
            Link This issue is blocked by DM-34567 [ DM-34567 ]
            Hide
            rowen Russell Owen added a comment - - edited

            At standup today we agreed to a different path forward: modify ts_sal so all enumeration values are of type "long long" and eliminate the new "type" attribute. That makes this ticket far simpler: there is no need to modify the schema for the XML; all I have to do is uncomment out the missing enum. Done. This work can be merged once Dave implements DM-34567.

            Show
            rowen Russell Owen added a comment - - edited At standup today we agreed to a different path forward: modify ts_sal so all enumeration values are of type "long long" and eliminate the new "type" attribute. That makes this ticket far simpler: there is no need to modify the schema for the XML; all I have to do is uncomment out the missing enum. Done. This work can be merged once Dave implements DM-34567 .
            rowen Russell Owen made changes -
            Status In Progress [ 3 ] To Do [ 10001 ]
            rowen Russell Owen made changes -
            Story Points 2 1
            rowen Russell Owen made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Hide
            rowen Russell Owen added a comment -

            ts_sal now has the necessary fix. Time to put this trivial change into review.

            Show
            rowen Russell Owen added a comment - ts_sal now has the necessary fix. Time to put this trivial change into review.
            rowen Russell Owen made changes -
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            pkubanek Petr Kubanek added a comment -

            Approved in GitHub.

            Show
            pkubanek Petr Kubanek added a comment - Approved in GitHub.
            pkubanek Petr Kubanek made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            rowen Russell Owen made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            Hide
            rowen Russell Owen added a comment -

            Merged ts_xml to develop

            Show
            rowen Russell Owen added a comment - Merged ts_xml to develop

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Petr Kubanek
              Watchers:
              Petr Kubanek, Russell Owen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.