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

Investigate why Config.validate isn't called reliably in at least measurement plugins

    XMLWordPrintable

    Details

    • Story Points:
      4
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      Arun Kannawadi discovered on DM-24737 that Config.validate isn't being called on measurement plugin configs, even though it should be. I'm not sure if this is because RegistryField or ConfigurableField isn't calling validate on its child configs, or if we've just forgotten to call super().validate() somewhere in a validate implementation.

      We should probably consider modifying pex_config to make that super delegation unnecessary - if we do that first, and we still have some validate implementations that do delegate to super, we'll validate twice, but that's not a big deal, and we can clean it up slowly.

        Attachments

          Activity

          Hide
          kannawad Arun Kannawadi added a comment -

          Summary: The measurement plugin config was simply not being validated in unit tests automatically, and required an explicit call to the `validate` method.

          Show
          kannawad Arun Kannawadi added a comment - Summary: The measurement plugin config was simply not being validated in unit tests automatically, and required an explicit call to the `validate` method.
          Hide
          jbosch Jim Bosch added a comment - - edited

          Turned out not to be a problem; the problem was just that validate wasn't being called in a unit test, where I wouldn't have expected it to be, and validation does work when the plugin is invoked from a CmdLineTask or PipelineTask. It's still a good idea to make e.g. Task construction call validate, but that's DM-971, which is a bigger project and a lower priority.

          Show
          jbosch Jim Bosch added a comment - - edited Turned out not to be a problem; the problem was just that validate wasn't being called in a unit test, where I wouldn't have expected it to be, and validation does work when the plugin is invoked from a CmdLineTask or PipelineTask. It's still a good idea to make e.g. Task construction call validate , but that's DM-971 , which is a bigger project and a lower priority.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jbosch Jim Bosch
            Watchers:
            Arun Kannawadi, Jim Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.