lang: Data methods now take context.Context

This caused a bunch of mechanical changes to callers, of course. Expression
evaluation is a very cross-cutting concern, so updating everything all at
once would be a lot and so this stops at a mostly-arbitrary point wiring
a bunch of callers to pass in contexts without changing anything that has
lots of callers.

We'll continue pulling on this thread in later commits.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
Martin Atkins
2025-06-17 14:55:20 -07:00
parent 782b817ff9
commit 1380154250
32 changed files with 235 additions and 220 deletions

View File

@@ -154,9 +154,9 @@ func (n *nodeVariableReferenceInstance) ModulePath() addrs.Module {
}
// GraphNodeExecutable
func (n *nodeVariableReferenceInstance) Execute(_ context.Context, evalCtx EvalContext, op walkOperation) tfdiags.Diagnostics {
func (n *nodeVariableReferenceInstance) Execute(ctx context.Context, evalCtx EvalContext, op walkOperation) tfdiags.Diagnostics {
log.Printf("[TRACE] nodeVariableReferenceInstance: evaluating %s", n.Addr)
diags := evalVariableValidations(n.Addr, n.Config, n.Expr, evalCtx)
diags := evalVariableValidations(ctx, n.Addr, n.Config, n.Expr, evalCtx)
if op == walkValidate {
var filtered tfdiags.Diagnostics