xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

Get all errors with opera validate command #192

Open mihaTrajbaric opened 3 years ago

mihaTrajbaric commented 3 years ago

In the case of error(s) in TOSCA, opera validate command returns the first one. It would be a useful feature if it could return all of them.

anzoman commented 3 years ago

Hi @mihaTrajbaric thanks for opening this. I have searched though history and have found a similar issue #50. I agree, it would be really helpful to see more than one error.

cankarm commented 3 years ago

Collecting all errors is practically impossible, due to the potential implication of the first error on the understanding of the following code. It would be good to limit on simple subsets of errors that we can cover.

dradX commented 3 years ago

@cankarm The issue here is to simply show any possible parsing error during the generation of the template tree - not going much into implementation checks.

cankarm commented 3 years ago

Sure @dradX, I assumed that, but it would be better if the issue would be more to the point with an example if possible. Anyway, I still think that this could be a very hard task to implement if we don't limit it to e.g. next few parsing errors. Or maybe just try also some other static analysis to achieve that.

anzoman commented 3 years ago

As @cankarm said, this feature seems easy to implement at first, but we might find some difficulties when trying to do so. Validation process includes some stages when going through the TOSCA service template and by catching all the TOSCA inconsistencies it would mean that we could ignore some fatal errors and continue with validation, which may result in some variables being undefined for the next step of validation. This is just an example of what might happen, but there is also a possibility that the potential implementation would go smooth and without any problems.