Closed flongford closed 4 years ago
I think the error messages being reported in ExecutionLayer.execute_layer
contain more useful information, but the BaseDataSourceModel.verify
method should be the location where they are being raised (since we always verify the workflow first).
In which case, we could move these messages to become the local_error
argument on the corresponding VerifierError
instances in BaseDataSourceModel.verify
(and then delete the code from ExecutionLayer.execute_layer
that raises them).
These local_error
attributes will then be added to the log in BaseOperation.verify_workflow
.
This is turning into another rabbit hole of unit test errors.
As identified in #323, the length of input and output slot lists are being verified in two different places:
Original discussion:
Ohhhh, I see what's going on now. Ok - this is worth a separate PR in its own right. It looks like there's two places where the input / output slot lengths are being checked - in the
BaseDataSourceModel.verify
method (which is called byverify_workflow
) and also as you spotted inExecutionLayer.execute_layer
(which would have been reported back if we hadn't calledverify_workflow
first).These means we would get 2 different error messages for the same error, depending on which method raised it - not ideal. We should make sure that this only happens in one place. I will make a new issue.
Originally posted by @flongford in https://github.com/force-h2020/force-bdss/pull/323