Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPA conformance: Ensure that withkeyword OPA tests pass #88

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

anakrish
Copy link
Collaborator

@anakrish anakrish commented Jan 4, 2024

  • ignore worktrees
  • feature guard time module
  • Apply with modifiers before evaluating loop expressions
  • Support value modifier for functions
  • stubs for http.send and io.jwt.decode_verify
  • Initialize with-document after initializing init data
  • In case of conflict, with modifier override init-data values.
  • In case of conflict, subsequent with modifier overrides earlier ones.
  • Ensure that zero parameter functions are evaluated and added to document
  • opa.runtime builtin returns:
    • git commit hash
    • environment vars
    • regorus features enabled
    • builtins available
    • deprecated builtins available
  • If sort_bindings is specified, sort the bindings in OPA tests
  • gather inputs, used vars and comprehensions in with modifiers
  • For refs starting with data, ensure that modules are evaluated before looking up value of the expression. Thie ensures that modules that have only been partly populated (E.g via with mods) are completely evaluated before the value is looked up
  • Mark rules overridden using with modifiers are evaluated.
  • Exclude env vars in opa.runtime.
  • Include regorus version in OPA runtime
  • update to opa v0.60.0
  • scheduler: Handle function refs in with modifers. Error out only if a truly undefined ref.
  • Handle undefined params, parameter expression evaluation errors before applying with modifiers.
  • When applying with modifiers, first determine whether the target is a function. If so, handle cleanly.
  • concat: raise error only in strict mode
  • In strict mode, propagate errors raised by function rule execution in case of multiple function definitions for same rule
  • skip "withkeyword/builtin-builtin: arity 0" test which can never pass.
  • When a mock has is being applied, clear with_function so that other mocks won't be applied during the evaluation of the mock.
  • Ability to specify strictness in tests

Closes #87

- ignore worktrees
- feature guard time module
- Apply with modifiers before evaluating loop expressions
- Support value modifier for functions
- stubs for http.send and io.jwt.decode_verify
- Initialize with-document after initializing init data
- In case of conflict, with modifier override init-data values.
- In case of conflict, subsequent with modifier overrides earlier ones.
- Ensure that zero parameter functions are evaluated and added to document
- opa.runtime builtin
  returns:
   - git commit hash
   - environment vars
   - regorus features enabled
   - builtins available
   - deprecated builtins available
- If `sort_bindings` is specified, sort the bindings in OPA tests
- gather inputs, used vars and comprehensions in with modifiers
- For refs starting with `data`, ensure that modules are evaluated before looking up
  value of the expression. Thie ensures that modules that have only been partly populated
  (E.g via with mods) are completely evaluated before the value is looked up
- Mark rules overridden using with modifiers are evaluated.
- Exclude env vars in opa.runtime.
- Include regorus version in OPA runtime
- update to opa v0.60.0
- scheduler: Handle function refs in with modifers. Error out only if
  a truly undefined ref.
- Handle undefined params, parameter expression evaluation errors before
  applying with modifiers.
- When applying with modifiers, first determine whether the target is a
  function. If so, handle cleanly.
- concat: raise error only in strict mode
- In strict mode, propagate errors raised by function rule execution
  in case of multiple function definitions for same rule
- skip "withkeyword/builtin-builtin: arity 0" test which can never pass.
- When a mock has is being applied, clear with_function so that
  other mocks won't be applied during the evaluation of the mock.
- Ability to specify strictness in tests

Signed-off-by: Anand Krishnamoorthi <[email protected]>
@anakrish anakrish merged commit 25dec7e into microsoft:main Jan 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass OPA withkeyword tests
1 participant