Looking at the terraform module, and that it uses ...
# plugins
c
Looking at the terraform module, and that it uses infer dependencies, compared to the docker plugin, where I’ve used the inject dependencies.. I was still a bit confused about the difference between the two, but after reading up on the doc string of the request types of each, I get the feeling that I ought to use the infer dependency variant also in the docker plugin, as it is analysing the Dockerfile source .. should I change this?
f
The “inject” and “infer” dependencies rules are invoked from the same rule and the results merged. The difference is what triggers each kind of rule: a
dependencies
field or a
sources
field.
So which does it make more sense to trigger the Docker plugin from?
c
Not sure, it was that the infer was described to pick up its dependencies by analysing sources, which I feel is what we kind of do in the Docker case too, when we analyse the Dockerfile that is pulled in via a Sources field.. so that feels like the more correct approach.
f
then “infer” is probably the right choice
👍 1
although having “infer” and “inject” steps be separate still seems an arbitrary distinction to me. the rules could have been designed to just have a single infer/inject step using a FieldSet to allow the engine to differentiate. so whatever choice you think is closest to the current design is the “right” choice.