Skip to content

Commit

Permalink
Revert "skip check evaluation when context is not prepared successful…
Browse files Browse the repository at this point in the history
…ly (#35408)" (#35410)

This reverts commit 874483f.
  • Loading branch information
liamcervante authored Jul 2, 2024
1 parent 874483f commit e2f5a39
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions internal/moduletest/eval_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ func (ec *EvalContext) Evaluate() (Status, cty.Value, tfdiags.Diagnostics) {

hclCtx, moreDiags := scope.EvalContext(refs)
ruleDiags = ruleDiags.Append(moreDiags)
if moreDiags.HasErrors() {
// if we can't evaluate the context properly, we can't evaulate the rule
// we add the diagnostics to the main diags and continue to the next rule
log.Printf("[TRACE] EvalContext.Evaluate: check rule %d for %s is invalid, could not evalaute the context, so cannot evaluate it", i, ec.run.Addr())
status = status.Merge(Error)
diags = diags.Append(ruleDiags)
continue
}

errorMessage, moreDiags := lang.EvalCheckErrorMessage(rule.ErrorMessage, hclCtx)
ruleDiags = ruleDiags.Append(moreDiags)
Expand Down

0 comments on commit e2f5a39

Please sign in to comment.