Create a CI test to detect unexpected changes in generated networks
The following discussion from !37 (merged) should be addressed:
-
@jnewsome started a discussion: (+1 comment) Is the premise that we want to create a parallel "arti_common.i" that will (eventually) support every option, and that therefore we will not want to re-duplicate all of the template files?
Basically; though I'm tentatively thinking to build up the arti config as a python object and dump the result at the end with
tomli_w
rather than doing string templating.I also think it makes usage and maintenance easier in general, though maybe not worth prioritizing if not for facilitating arti support. For example IMO it was pretty confusing that the node configs had an
exit
parameter, but whether the node was actually configured as an exit was determined by template selection and not that. And you had to look around through multiple layers of templates to actually figure out which templates do/don't configure a relay as an exit. Conversely now you can look in the unified template to see exactly how every torrc configuration option is set.Second: I haven't done a super careful line-by-line comparison in every case,
Done as a one-off using shadow and diffoscope as per other comment.
I'm thinking about whether it makes sense to add something like that to the CI. e.g. requiring MRs that change the template output to also update the "expected output" that's also checked in. I'm on the fence of whether it's worth it, but I think either way not as part of this MR :).