-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify checking for incorrect extractor and loader blocks #505
Simplify checking for incorrect extractor and loader blocks #505
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message better but not very good imo. Why does it say SQLiteLoader if the block is a CarsLoader?
Maybe change it to
The output type "None" of CarsLoader (as an SQLiteLoader) is incompatible with the input type "TextFile" of CarsCSVInterpreter (as a CSVInterpreter)
or simpler (preferred):
The output type "None" of CarsLoader is incompatible with the input type "TextFile" of CarsCSVInterpreter
e9e9fca
to
8e68450
Compare
8e68450
to
35e5247
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -81,9 +61,18 @@ function checkPipesOfBlock( | |||
isCompositeBlocktypeDefinition(block.$container) && | |||
block.$container.blocks.at(0)?.name === block.name; | |||
|
|||
const isExtractorBlock = !blockType.hasInput() && whatToCheck === 'input'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is somewhat confusing since it may be an ExtractorBlock even if we don't check for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be refactored in a future PR.
In the process of fixing #497, I'd like to simplify some validations.
I plan to refactor all validations in
validateBlockDefinition
because they should rather be located invalidatePipelineDefinition
andvalidateCompositeBlockTypeDefinition
.In this attempt, I noticed that we can simplify the validation whether a loader is connected via its output port, and whether an extractor is connected via its input port.
Improved the validation messages along the way..
Before
After
I think the error message is clear enough to cover this edge case as well.