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

salobj 7 prerelease mis-handles hiearchical config override

    XMLWordPrintable

    Details

      Description

      In ts_salobj 7.0.0.rc.2 (and .rc.1) mishandles applying configuration overrides for sub-dicts. It calls dict.update to apply all overrides, and that does not operate hiearchically. Thus for example _init.yaml has:

      foo:
        key1: value1
        key2: value2
        ...
      

      and the override file has:

      foo:
        key1: override value1
      

      the result will be to lose key2 and all other properties of foo.

      It is necessary to write a custom override function that operates hierarchically and probably recursively, so if an override item has a value that is a dict, the overrides are applied key by key. I am not aware of any built-in function that does this.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment - - edited

          Additional fixes:

          • Fixed a few mypy issues that only show up with the latest mypy
          • Reformatted a bit of code to make it compatible with the current black release and the version we are presently using.
          • Fix the OpenSplice version reported by the softwareVersions event. Report the value of env var OSPL_RELEASE instead of the version of the dds library.
          • Fix a typo in a few log messages.

          Pull request: https://github.com/lsst-ts/ts_salobj/pull/new/tickets/DM-34038

          Show
          rowen Russell Owen added a comment - - edited Additional fixes: Fixed a few mypy issues that only show up with the latest mypy Reformatted a bit of code to make it compatible with the current black release and the version we are presently using. Fix the OpenSplice version reported by the softwareVersions event. Report the value of env var OSPL_RELEASE instead of the version of the dds library. Fix a typo in a few log messages. Pull request: https://github.com/lsst-ts/ts_salobj/pull/new/tickets/DM-34038
          Hide
          wvreeven Wouter van Reeven added a comment -

          Reviewed on GitHub and tested locally that the changes work.

          Show
          wvreeven Wouter van Reeven added a comment - Reviewed on GitHub and tested locally that the changes work.
          Hide
          rowen Russell Owen added a comment -

          Tagged v7.0.0.rc.4

          Show
          rowen Russell Owen added a comment - Tagged v7.0.0.rc.4

            People

            Assignee:
            rowen Russell Owen
            Reporter:
            rowen Russell Owen
            Reviewers:
            Wouter van Reeven
            Watchers:
            Russell Owen, Wouter van Reeven
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.