execgraph: Marshaling an unmarshaling of execution graphs

To support the workflow of saving a plan to disk and applying it on some
other machine we need to be able to represent the execution graph as a byte
stream and then reload it later to produce an equivalent execution graph.

This is an initial implementation of that, based on the way the execgraph
package currently represents execution graphs. We may change that
representation more in future as we get more experience working in the new
architecture, but this is intended as part of our "walking skeleton" phase
where we try to get the new architecture working end-to-end with simple
configurations as soon as possible to help verify that we're even on the
right track with this new approach, and try to find unknown unknowns that
we ought to deal with before we get too deep into this.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
Martin Atkins
2025-11-24 17:37:23 -08:00
parent 4d16e6f28c
commit a89667e29c
9 changed files with 2167 additions and 10 deletions

View File

@@ -60,6 +60,11 @@ var protocSteps = []protocStep{
"internal/plans/internal/planproto",
[]string{"--go_out=.", "--go_opt=paths=source_relative", "planfile.proto"},
},
{
"opentofu_execgraph (execution graph serialization)",
"internal/engine/internal/execgraph/execgraphproto",
[]string{"--go_out=.", "--go_opt=paths=source_relative", "execgraph.proto"},
},
}
func main() {