Improve error messages when workflow settings have non-string values for default project or dataset#1846
Improve error messages when workflow settings have non-string values for default project or dataset#1846
Conversation
…for default project or dataset
There was a problem hiding this comment.
Currently if
defautProjectordefaultDatasethave an integer type inworkflow_settings.yaml, a compilation will throw a not very obvious error liket.target.schema.includes is not a function. I've added a validation of these fields to be strings (if not, an explicit error is thrown).
I think there should be a better fix for this:
- workflow_settings.yaml is a version of the workflow settings proto
Line 13 in 05341b7
- We should be catching this during the proto validation
dataform/common/protos/index.ts
Line 53 in 05341b7
I'm not sure why we're not catching it already - but fixing the proto validation would be the most extensible solution!
I also hoped that it should have been the case, but unfortunately this code dataform/common/protos/index.ts Lines 45 to 46 in 05341b7 protoCastObject where defaultDataset has an integer type and this check later doesn't work dataform/common/protos/index.ts Line 53 in 05341b7 The thing that actually verifies types is |
|
|
Currently if
defautProjectordefaultDatasethave an integer type inworkflow_settings.yaml, a compilation will throw a not very obvious error liket.target.schema.includes is not a function. I've added a validation of these fields to be strings (if not, an explicit error is thrown).