-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Gabe Jackson <[email protected]>
- Loading branch information
Showing
23 changed files
with
155 additions
and
136 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.12.4 | ||
0.13.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
--- | ||
title: Release 2021-06-22 | ||
menuTitle: 2021-06-22 | ||
any: true | ||
description: >- | ||
Changelog for Release 2021-06-22 (oso 0.13.0, sqlalchemy-oso 0.9.0) | ||
containing new features, bug fixes, and more. | ||
--- | ||
|
||
## `oso` 0.13.0 | ||
|
||
### Core | ||
|
||
#### Breaking changes | ||
|
||
Attempting to create a dictionary with a repeated key is now a parser error. | ||
Previously, the first (key, value) pair would be taken and the others would be | ||
dropped. | ||
|
||
Before: | ||
|
||
```polar | ||
query> d = {a: 1, a: 2} | ||
d = {'a': 1} | ||
``` | ||
|
||
After: | ||
|
||
```polar | ||
query> d = {a: 1, a: 2} | ||
ParserError | ||
Duplicate key: a at line 1, column 6 | ||
``` | ||
|
||
#### Other bugs & improvements | ||
|
||
Trailing commas are now supported in dictionaries and lists. For example: | ||
|
||
```polar | ||
allow(_user, action, repository: Repository) if | ||
action in [ | ||
"read", | ||
"write", | ||
]; | ||
``` | ||
|
||
### Node.js & Python | ||
|
||
#### New features | ||
|
||
##### Built-in Role-Based Access Control (RBAC) policy | ||
|
||
<!-- TODO(gj): usual caveat about this being an experimental feature; talk to us | ||
if you want to use it in prod. --> | ||
|
||
<!-- TODO(gj): link to new docs --> | ||
|
||
### Ruby | ||
|
||
#### Breaking changes | ||
|
||
{{% callout "Warning" "orange" %}} | ||
This release contains breaking changes. Be sure to follow migration steps | ||
before upgrading. | ||
{{% /callout %}} | ||
|
||
The `Query` object returned by `Polar::Polar#query` is now an `Enumerable`. | ||
Previously, you would need to access the `results` attribute which was an | ||
enumerator. | ||
|
||
The main impact of this change is that queries are no longer run on a Fiber, and | ||
therefore any methods using Fiber-local variables (e.g. `Thread.current[:var]`) | ||
will work fine. | ||
|
||
If you are only using `Oso#allowed?` there is no change needed. | ||
|
||
Before: | ||
|
||
```ruby | ||
query = oso.query_rule('allow', actor, action, resource) | ||
first = query.results.next | ||
# raises StopIterator if no results | ||
``` | ||
|
||
After: | ||
|
||
```ruby | ||
query = oso.query_rule('allow', actor, action, resource) | ||
first = query.first | ||
# first is nil if there are no results | ||
``` | ||
|
||
### Java | ||
|
||
#### Other bugs & improvements | ||
|
||
Thanks to the ever-helpful [`@joshrotenberg`](https://github.com/joshrotenberg) | ||
for a pair of contributions: | ||
|
||
- Making sure the `junit` dependency doesn't get packaged in our released JARs | ||
([#964](https://github.com/osohq/oso/pull/964)). | ||
- Starting to align the Java test suite with the other language test suites | ||
([#967](https://github.com/osohq/oso/pull/967)). | ||
|
||
## `sqlalchemy-oso` 0.9.0 | ||
|
||
### Breaking changes | ||
|
||
{{% callout "Warning" "orange" %}} | ||
This release contains breaking changes. Be sure to follow migration steps | ||
before upgrading. | ||
{{% /callout %}} | ||
|
||
#### Renamed `parent` and `user_in_role` predicates for Role-Based Access Control policies | ||
|
||
Two built-in Polar predicates used for [implementing Role-Based Access | ||
Control]({{< ref path="/new-roles/" lang="python" >}}) have been renamed for | ||
clarity and consistency: | ||
|
||
- The `parent(child, parent)` predicate has been renamed to | ||
`parent_child(parent, child)`. | ||
- The `user_in_role(actor, role, resource)` predicate has been renamed to | ||
`actor_can_assume_role(actor, role, resource)`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
oso~=0.12.0 | ||
oso~=0.13.0 | ||
django>=2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
oso~=0.12.0 | ||
oso~=0.13.0 | ||
flask>=0.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
oso~=0.12.4 | ||
oso~=0.13.0 | ||
SQLAlchemy>=1.3.17,<1.5 | ||
packaging~=20.9 | ||
dataclasses; python_version<"3.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.8.0" | ||
__version__ = "0.9.0" | ||
|
||
|
||
from .auth import register_models | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
oso-oso (0.12.4) | ||
oso-oso (0.13.0) | ||
ffi (~> 1.0) | ||
|
||
GEM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Oso | ||
VERSION = '0.12.4' | ||
VERSION = '0.13.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
c1cff36
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust Benchmark
rust_get_attribute
63746
ns/iter (± 3296
)62911
ns/iter (± 7025
)1.01
n_plus_one/100
3089010
ns/iter (± 136890
)2814577
ns/iter (± 127676
)1.10
n_plus_one/500
14864177
ns/iter (± 485793
)13938395
ns/iter (± 782029
)1.07
n_plus_one/1000
29830226
ns/iter (± 1403756
)25852637
ns/iter (± 1252540
)1.15
unify_once
1013
ns/iter (± 72
)895
ns/iter (± 82
)1.13
unify_twice
2900
ns/iter (± 103
)2532
ns/iter (± 188
)1.15
many_rules
74405
ns/iter (± 5141
)63261
ns/iter (± 6344
)1.18
fib/5
619133
ns/iter (± 21566
)531020
ns/iter (± 50096
)1.17
prime/3
24894
ns/iter (± 1646
)21572
ns/iter (± 1712
)1.15
prime/23
25044
ns/iter (± 2628
)21329
ns/iter (± 1629
)1.17
prime/43
24933
ns/iter (± 4820
)22061
ns/iter (± 1366
)1.13
prime/83
24885
ns/iter (± 1885
)21757
ns/iter (± 2206
)1.14
prime/255
22297
ns/iter (± 2699
)19628
ns/iter (± 1799
)1.14
indexed/100
7265
ns/iter (± 1825
)5920
ns/iter (± 1818
)1.23
indexed/500
10046
ns/iter (± 1901
)7123
ns/iter (± 2071
)1.41
indexed/1000
11349
ns/iter (± 2066
)9358
ns/iter (± 1187
)1.21
indexed/10000
31700
ns/iter (± 3151
)26050
ns/iter (± 264254
)1.22
not
7492
ns/iter (± 281
)6991
ns/iter (± 535
)1.07
double_not
17057
ns/iter (± 1964
)16028
ns/iter (± 1523
)1.06
De_Morgan_not
10206
ns/iter (± 769
)8965
ns/iter (± 665
)1.14
load_policy
1024799
ns/iter (± 50096
)977941
ns/iter (± 76512
)1.05
partial_and/1
30831
ns/iter (± 3125
)31815
ns/iter (± 6130
)0.97
partial_and/5
115809
ns/iter (± 6307
)105695
ns/iter (± 22710
)1.10
partial_and/10
247373
ns/iter (± 9321
)226261
ns/iter (± 17077
)1.09
partial_and/20
616866
ns/iter (± 51964
)562287
ns/iter (± 36603
)1.10
partial_and/40
1745922
ns/iter (± 75049
)1455207
ns/iter (± 83872
)1.20
partial_and/80
5746315
ns/iter (± 308698
)4676316
ns/iter (± 367111
)1.23
partial_and/100
8336991
ns/iter (± 482988
)6800792
ns/iter (± 473980
)1.23
partial_rule_depth/1
107264
ns/iter (± 6935
)93059
ns/iter (± 7249
)1.15
partial_rule_depth/5
390026
ns/iter (± 30380
)324832
ns/iter (± 24918
)1.20
partial_rule_depth/10
969118
ns/iter (± 49857
)825533
ns/iter (± 50274
)1.17
partial_rule_depth/20
3212890
ns/iter (± 133929
)2674716
ns/iter (± 167128
)1.20
partial_rule_depth/40
14242138
ns/iter (± 1168442
)10670385
ns/iter (± 633528
)1.33
partial_rule_depth/80
89007124
ns/iter (± 3215749
)76743887
ns/iter (± 4492402
)1.16
partial_rule_depth/100
161507041
ns/iter (± 3842706
)142928358
ns/iter (± 8227845
)1.13
This comment was automatically generated by workflow using github-action-benchmark.