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
This issue deals with the intermittent type-checker behavior discussed in #6138.
Given the following policy:
package test
obj.foo :=42
obj[k] := v {
v := ["a", "b", "c"][k]
}
test_obj {
obj == {
0: "a",
1: "b",
2: "c",
"foo": 42,
}
}
compilation will fail intermittently, as rules aren't properly sorted before type-checking occurs. If a partial rule (data.test.obj) has a "child" rule (data.test.obj.foo) declaring a "key override", it is left to chance whether all rules contributing to the partial object's type have been added to the type-tree before type-checking is performed on any dependent rule (data.test.test_obj).
The text was updated successfully, but these errors were encountered:
In order to properly sort rules according to dependencies before performing type-checking.
Also, properly merging types when type-tree produces multiple types for a given ref.
Fixes: open-policy-agent#6182
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
* ast: Including "child" rules when fetching rules by ref
In order to properly sort rules according to dependencies before performing type-checking.
Also, properly merging types when type-tree produces multiple types for a given ref.
Fixes: #6182
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This issue deals with the intermittent type-checker behavior discussed in #6138.
Given the following policy:
compilation will fail intermittently, as rules aren't properly sorted before type-checking occurs. If a partial rule (
data.test.obj
) has a "child" rule (data.test.obj.foo
) declaring a "key override", it is left to chance whether all rules contributing to the partial object's type have been added to the type-tree before type-checking is performed on any dependent rule (data.test.test_obj
).The text was updated successfully, but these errors were encountered: