Allow passing a vanilla JobExecutorConfig to batch scheduler executors#512
Allow passing a vanilla JobExecutorConfig to batch scheduler executors#512
Conversation
without getting odd errors later.
andre-merzky
left a comment
There was a problem hiding this comment.
This looks correct and complete to me - thanks for the fast fix!
One thing to keep in mind is that _from_config needs updating whenever the JobConfig class changes. Probably not worth to get clever at this point, we can revisit once we stumble over this again (if ever).
Indeed. I went with a simple and static solution. We could do it by iterating over properties, but I'm not sure the gains are worth the loss in clarity. I'm going to wax philosophical, but does any static language have a mechanism to deal with something like this? |
In our (very biased) RCT approach we would render all description or config like classes as dictionary like things (we have our own
Absolutely the right thing to do - just in case my comments didn't communicate that clearly :-D |
|
Great, thank you! And thanks for the quick fix. Looking forward to the next release at which time I will switch back to vanilla |
When passing a plain
JobExecutorConfigto a batch scheduler executor, the executor attempts to access various batch scheduler specific properties, which do not exist (see #511).This PR checks if a vanilla
JobExecutorConfigis passed to a batch scheduler executor and replaces it with aBatchSchedulerExecutorConfigwhile copying the relevant properties.Fixes #511.