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

XMLWordPrintable

Details

• Type: Story
• Status: Invalid
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• 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.

Activity

Hide

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

Show
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
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
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
Reporter:
Jim Bosch
Watchers:
Arun Kannawadi, Jim Bosch