Closed philippemerle closed 2 years ago
This requires some discussion.
The issue here is actually not during parsing. The parser will only check that the artifact file
(that's what this short notation sets) matches the artifact type's extensions. So if you use puccini-tosca parse
there will be no problem.
The problem is in compiling to Clout. The purpose of Clout is to have something that an orchestrator can immediately use, and so what happens during compilation is that the relative file
is turned into a canonical path. But, the truth is that I was never comfortable with this implementation. This path would be calculated on the host in which you are compiling, which of course may not be the orchestrator host. So it could make sense to remove this feature entirely.
But ... we can't really remove it entirely. If we are dealing with a CSAR file, then there must be some way to extract the artifacts from CSAR so that the orchestrator can use them together with the Clout.
In short, the whole artifact management system needs to be rethought for Puccini.
For now, I can recommend two things for you, because I think you're mostly interested in validation:
1) Use puccini-tosca parse
instead of compile
2) Could your validation tooling create these files? It's enough for them to be empty. For the above: touch an_artifact
.
By the way, you seem to have discovered a different bug here. In your example you did not give the artifact a type. Puccini should mark this as a problem. I will fix this separately.
By the way, you seem to have discovered a different bug here. In your example you did not give the artifact a type. Puccini should mark this as a problem. I will fix this separately.
I fixed this issue in the separate commit. So the test case you presented here must be fixed by adding a type to the artifact.
Thank @tliron for the explanation.
puccini-tosca compile
by puccini-tosca parse
fully adresses my issue.
Given the following template
since v0.20.0, puccini signals the following problem
The problem is correct as the
an_artifact
file does not exist.Moreover, could we have a quirk to not check presence of artifact files? This new quirk should be added to the etsinfv quirk.