Skip to content

Commit

Permalink
Prepare v0.4.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tsandall committed Feb 10, 2017
1 parent 2b20dfb commit efd5c11
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,39 @@
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
## 0.4.2

### Rego

This release changes the Rego syntax. The two main changes are:

- Expressions are now separated by semicolons (instead of commas). When writing rules, the semicolons are optional.
- Rules are no longer written in the form: `head :- body`. Instead they are written as `head { body }`.

Also:

- Set, array, and object literals now support trailing commas.
- To declare a set literal with one element, you must include a trailing comma, e.g., `{ foo, }`.
- Arithmetic and set operations can now be performed with infix notation, e.g., `x = 2 + 1`.
- Sets can be referred to like objects and arrays now ([#243](https://github.com/open-policy-agent/opa/issues/243)). E.g., `p[_].foo = 1 # check if element in has attr foo equal to 1`.

### Evaluation

This release changes the evaluation behaviour for packages. Previously, if a package contained no rules OR all of the rules were undefined when evaluated, a query against the package path would return undefined. As of v0.4.2 the query will return an empty object.

### REST API

This release changes the Data API to return an HTTP 200 response if the document is undefined. The message body will contain an object without the `result` property.

### Fixes

- Allow sets to be treated like objects/arrays

### Miscellaneous

- Added high level API for Go users. See `github.com/open-policy-agent/opa/rego` package.
- Improved expression String() function to handle infix operators better.
- Added support for set intersection and union built-ins. See language docs.

## 0.4.1

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by an Apache2
# license that can be found in the LICENSE file.

VERSION := 0.4.2-dev
VERSION := 0.4.2

PACKAGES := \
github.com/open-policy-agent/opa/ast/.../ \
Expand Down
2 changes: 1 addition & 1 deletion site/examples/docker-authorization/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $ mkdir -p policies
### 2. Download the latest version of OPA.

```shell
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.1/opa_linux_amd64 > opa
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.2/opa_linux_amd64 > opa
$ chmod u+x opa
```

Expand Down
12 changes: 6 additions & 6 deletions site/get-opa/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ title: Get Open Policy Agent
The binary releases for 64-bit Linux and Mac are available for download here. For other releases of OPA see the [GitHub Releases](https://github.com/open-policy-agent/opa/releases) page.
{: .opa-header--text}

* [64-bit Linux](https://github.com/open-policy-agent/opa/releases/download/v0.4.1/opa_linux_amd64){: .opa-header--download-list--link}
* [64-bit Mac OS X](https://github.com/open-policy-agent/opa/releases/download/v0.4.1/opa_darwin_amd64){: .opa-header--download-list--link}
* [Go Source](https://github.com/open-policy-agent/opa/archive/v0.4.1.tar.gz){: .opa-header--download-list--link}
* [64-bit Linux](https://github.com/open-policy-agent/opa/releases/download/v0.4.2/opa_linux_amd64){: .opa-header--download-list--link}
* [64-bit Mac OS X](https://github.com/open-policy-agent/opa/releases/download/v0.4.2/opa_darwin_amd64){: .opa-header--download-list--link}
* [Go Source](https://github.com/open-policy-agent/opa/archive/v0.4.2.tar.gz){: .opa-header--download-list--link}
{: .opa-header--download-list}

{% endcontentfor %}
Expand All @@ -25,22 +25,22 @@ The binary releases for 64-bit Linux and Mac are available for download here. Fo
## 64-bit Linux

```shell
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.1/opa_linux_amd64 > opa
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.2/opa_linux_amd64 > opa
$ chmod u+x opa
$ ./opa version
```

## 64-bit Mac OS X

```shell
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.1/opa_darwin_amd64 > opa
$ curl -L https://github.com/open-policy-agent/opa/releases/download/v0.4.2/opa_darwin_amd64 > opa
$ chmod u+x opa
$ ./opa version
```

## Docker Image (64-bit Linux)
```shell
$ docker run openpolicyagent/opa:0.4.1 version
$ docker run openpolicyagent/opa:0.4.2 version
```

{% endcontentfor %}

0 comments on commit efd5c11

Please sign in to comment.