You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OPA 0.58.0, specifically #6323 appears to have introduced what I believe to be a regression in opa fmt where the assignment operator and term in the rule heads of chain rules are removed from the re-written rule head.
Steps To Reproduce
In OPA 0.58+ the OPA fmt'ing the following:
instances_or_clusters[id] = ret {
instances = input.resources["aws_db_instance"]
ret = instances[id]
} {
clusters = input.resources["aws_rds_cluster"]
ret = clusters[id]
}
Results in the following:
instances_or_clusters[id] = ret if {
instances = input.resources.aws_db_instance
ret = instances[id]
}
instances_or_clusters[id] if {
clusters = input.resources.aws_rds_cluster
ret = clusters[id]
}
Expected behavior
instances_or_clusters[id] = ret if {
instances = input.resources.aws_db_instance
ret = instances[id]
}
instances_or_clusters[id] = ret if {
clusters = input.resources.aws_rds_cluster
ret = clusters[id]
}
Additional context
The text was updated successfully, but these errors were encountered:
And add test cases using chained bodies, as that would previously
get mistaken for implicit return without chaining.
Fixesopen-policy-agent#6467
Signed-off-by: Anders Eknert <anders@styra.com>
And add test cases using chained bodies, as that would previously
get mistaken for implicit return without chaining.
Fixes#6467
Signed-off-by: Anders Eknert <anders@styra.com>
Short description
OPA 0.58.0, specifically #6323 appears to have introduced what I believe to be a regression in opa fmt where the assignment operator and term in the rule heads of chain rules are removed from the re-written rule head.
Steps To Reproduce
In OPA 0.58+ the OPA fmt'ing the following:
Results in the following:
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: