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

Bump github.com/open-policy-agent/opa from 0.54.0 to 0.57.0 in /src #184

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 2, 2023

Bumps github.com/open-policy-agent/opa from 0.54.0 to 0.57.0.

Release notes

Sourced from github.com/open-policy-agent/opa's releases.

v0.57.0

This release contains an updated Rego syntax to allow general references in rule heads, and a mix of new features and bugfixes.

Support for General References in Rule Heads

In OPA 0.56.0, we introduced support for general references in rule heads as an experimental feature. It has now graduated to a fully supported feature, and is no longer experimental.

A general reference is a reference with variables at arbitrary locations. In Rego, partial rules are used for generating sets and objects. In previous versions of OPA, variables were only allowed in the very last position in the rule's reference. Now, Rego has been expanded to allow rules to be declared with general references in their head, with variables at arbitrary locations. This allows for generating nested dynamic object structures:

package example
import future.keywords
Converting a flat list of users to a mapping by "role" and then "id".
users_by_role[role][id] := user if {
some user in data.users
id := user.id
role := user.role
}
Explicit "admin" key override to the above mapping.
users_by_role.admin[id] := user if {
some user in data.admins
id := user.id
}
Leaf entries can be multi-value.
users_by_country[country] contains user.id if {
some user in data.users
country := user.country
}

See the documentation for more information.

Authored by @​johanfylling.

Runtime, Tooling, SDK

Topdown and Rego

... (truncated)

Changelog

Sourced from github.com/open-policy-agent/opa's changelog.

0.57.0

This release contains an updated Rego syntax to allow general references in rule heads, and a mix of new features and bugfixes.

Support for General References in Rule Heads

In OPA 0.56.0, we introduced support for general references in rule heads as an experimental feature. It has now graduated to a fully supported feature, and is no longer experimental.

A general reference is a reference with variables at arbitrary locations. In Rego, partial rules are used for generating sets and objects. In previous versions of OPA, variables were only allowed in the very last position in the rule's reference. Now, Rego has been expanded to allow rules to be declared with general references in their head, with variables at arbitrary locations. This allows for generating nested dynamic object structures:

package example
import future.keywords
Converting a flat list of users to a mapping by "role" and then "id".
users_by_role[role][id] := user if {
some user in data.users
id := user.id
role := user.role
}
Explicit "admin" key override to the above mapping.
users_by_role.admin[id] := user if {
some user in data.admins
id := user.id
}
Leaf entries can be multi-value.
users_by_country[country] contains user.id if {
some user in data.users
country := user.country
}

See the documentation for more information.

Authored by @​johanfylling.

Runtime, Tooling, SDK

Topdown and Rego

... (truncated)

Commits
  • c2f42aa Prepare v0.57.0 release (#6256)
  • c36a605 docs: Documenting general refs in rule heads (#6244)
  • 974586e server: Add test case for bundle update - query API handler scenario
  • c5314e3 Removing EXPERIMENTAL_GENERAL_RULE_REFS feature flag (#6252)
  • c9d1a8d planner: Adding support for general ref rule heads (#6235)
  • 391cb0c Add rego-cpp to OPA Ecosystem
  • 83a295f [docs] Use links on support page (#6249)
  • 919b290 plugins: Surface AWS authentication error details
  • 276702f Updating all vars in rule ref
  • b07e60a nightly: skip Fri/Sat night (#6242)
  • Additional commits viewable in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
github.com/open-policy-agent/opa [>= 0.49.a, < 0.50]
github.com/open-policy-agent/opa [>= 0.55.a, < 0.56]

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.54.0 to 0.57.0.
- [Release notes](https://github.com/open-policy-agent/opa/releases)
- [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md)
- [Commits](open-policy-agent/opa@v0.54.0...v0.57.0)

---
updated-dependencies:
- dependency-name: github.com/open-policy-agent/opa
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Oct 2, 2023
@ghost ghost added dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #184 (bebc3bc) into main (2eaab37) will increase coverage by 6.22%.
The diff coverage is n/a.

❗ Current head bebc3bc differs from pull request most recent head d9175cc. Consider uploading reports for the commit d9175cc to get more accurate results

@@           Coverage Diff           @@
##           main    #184      +/-   ##
=======================================
+ Coverage      0   6.22%   +6.22%     
=======================================
  Files         0       5       +5     
  Lines         0     257     +257     
=======================================
+ Hits          0      16      +16     
- Misses        0     241     +241     

see 5 files with indirect coverage changes

@ghost ghost merged commit c05fea6 into main Oct 2, 2023
2 checks passed
@ghost ghost deleted the dependabot/go_modules/src/github.com/open-policy-agent/opa-0.57.0 branch October 2, 2023 15:48
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant