-
Notifications
You must be signed in to change notification settings - Fork 181
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: gw <[email protected]>
- Loading branch information
Showing
26 changed files
with
170 additions
and
94 deletions.
There are no files selected for viewing
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
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.25.1 | ||
0.26.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- | ||
title: Release 2022-01-26 | ||
menuTitle: 2022-01-26 | ||
any: true | ||
description: >- | ||
Changelog for Release 2022-01-26 (oso 0.26.0, VS Code extension 0.26.0, | ||
django-oso 0.26.0, flask-oso 0.26.0, sqlalchemy-oso 0.26.0) containing new | ||
features, bug fixes, and more. | ||
--- | ||
|
||
## `oso` 0.26.0 | ||
|
||
### Core | ||
|
||
#### Other bugs & improvements | ||
|
||
- Fixed a bug affecting runtime type checking on nested object attributes. | ||
- When using data filtering, the list of relations returned to the adapter | ||
is now topologically sorted. | ||
|
||
### Go | ||
|
||
#### Breaking changes | ||
|
||
{{% callout "Warning" "orange" %}} | ||
This release contains breaking changes. Be sure to follow migration steps | ||
before upgrading. | ||
{{% /callout %}} | ||
|
||
##### Updated Go type checking behavior | ||
|
||
When evaluating whether a given query variable matches a Go type Polar will now use direct instance comparisons instead of Go's `reflect.ConvertibleTo` functionality. This change resolves false-positive type checking results where discrete structs with identical sets of fields were considered to be equivalent. | ||
|
||
This change has implications for the use of NewTypes in Polar rule definitions. Rules that are defined using NewTypes will now only match instances of the NewType and no longer match the underlying wrapped type. | ||
|
||
Rules which consume NewTypes must now be specialized over the NewType directly and not the underlying wrapped type. | ||
|
||
```go | ||
type Action string | ||
const ( | ||
View Action = "view" | ||
Create Action = "create" | ||
Update Action = "update" | ||
) | ||
``` | ||
|
||
Where previously it was possible to utilize this `Action` type as interchangeable with that of `string`: | ||
|
||
```polar | ||
user_has_action(user: User, action: String, resource: Resource) if ... | ||
``` | ||
|
||
This rule definition must be rewritten as follows: | ||
|
||
```polar | ||
user_has_action(user: User, action: Action, resource: Resource) if ... | ||
``` | ||
|
||
#### New Features | ||
|
||
##### Data Filtering for Go | ||
|
||
Data filtering is now officially supported for Go! Check out | ||
[our docs]({{< ref path="guides/data_filtering" lang="go" >}}) | ||
for more details and usage information. | ||
|
||
#### Other bugs & improvements | ||
|
||
- Fixed regression in Go mod vendoring. Thank you | ||
[`@sourcec0de`](https://github.com/sourcec0de)! | ||
|
||
### Python | ||
|
||
#### Breaking Changes | ||
|
||
##### `@polar_class` is deprecated in favor of `Oso#register_class` | ||
|
||
The `@polar_class` decorator used to register classes with Polar has been deprecated. To register a class with Polar it is now necessary to use the [`Oso#register_class`](https://docs.osohq.com/reference/api/index.html#oso.Oso.register_class) API. | ||
|
||
##### New data filtering configuration API is now mandatory | ||
|
||
The original data filtering configuration API using per-class `build_query`, `exec_query`, and `combine_query` methods | ||
has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="python" >}}). | ||
|
||
### Ruby | ||
|
||
#### Breaking Changes | ||
|
||
{{% callout "Warning" "orange" %}} | ||
This release contains breaking changes. Be sure to follow migration steps | ||
before upgrading. | ||
{{% /callout %}} | ||
|
||
##### New data filtering configuration API is now mandatory | ||
|
||
The original data filtering configuration API using per-class `build_query`, `exec_query`, and `combine_query` methods | ||
has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="ruby" >}}). | ||
|
||
### Node.js | ||
|
||
#### Breaking Changes | ||
|
||
{{% callout "Warning" "orange" %}} | ||
This release contains breaking changes. Be sure to follow migration steps | ||
before upgrading. | ||
{{% /callout %}} | ||
|
||
##### New data filtering configuration API is now mandatory | ||
|
||
The original data filtering configuration API using per-class `buildQuery`, `execQuery`, and `combineQuery` methods | ||
has been removed. Data filtering is now configured through [the new Adapter API]({{< ref path="guides/data_filtering" lang="node" >}}). | ||
|
||
## VS Code extension 0.26.0 | ||
|
||
### New features | ||
|
||
#### Configuring which Polar files are treated as part of the same policy | ||
|
||
The `oso.polarLanguageServer.projectRoots` VS Code workspace configuration | ||
setting can be used to control which Polar files in a particular workspace | ||
folder are treated as part of the same Oso policy. For more details, see [the | ||
docs](reference/tooling/ide#configuring-which-polar-files-are-treated-as-part-of-the-same-policy). |
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 |
---|---|---|
|
@@ -243,4 +243,5 @@ unsafety | |
unspecialized | ||
untaken | ||
vec | ||
vendoring | ||
webpack |
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.25.0 | ||
oso~=0.26.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.25.0 | ||
oso~=0.26.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,3 +1,3 @@ | ||
oso~=0.25.0 | ||
oso~=0.26.0 | ||
SQLAlchemy>=1.3.17,<1.5 | ||
packaging~=20.9 |
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.25.1" | ||
__version__ = "0.26.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.25.1) | ||
oso-oso (0.26.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.25.1' | ||
VERSION = '0.26.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.
42f249a
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
45467
ns/iter (± 2095
)51159
ns/iter (± 4367
)0.89
n_plus_one/100
2282956
ns/iter (± 37527
)2446622
ns/iter (± 71120
)0.93
n_plus_one/500
10915377
ns/iter (± 102333
)12272661
ns/iter (± 542641
)0.89
n_plus_one/1000
21713821
ns/iter (± 337164
)24220250
ns/iter (± 719619
)0.90
unify_once
986
ns/iter (± 46
)1085
ns/iter (± 86
)0.91
unify_twice
2592
ns/iter (± 555
)2713
ns/iter (± 110
)0.96
many_rules
63884
ns/iter (± 1288
)68004
ns/iter (± 3302
)0.94
fib/5
537975
ns/iter (± 8039
)578905
ns/iter (± 27708
)0.93
prime/3
18196
ns/iter (± 772
)19516
ns/iter (± 5703
)0.93
prime/23
18188
ns/iter (± 826
)19548
ns/iter (± 1993
)0.93
prime/43
18196
ns/iter (± 788
)19661
ns/iter (± 1723
)0.93
prime/83
18188
ns/iter (± 770
)19452
ns/iter (± 1363
)0.94
prime/255
16536
ns/iter (± 654
)17920
ns/iter (± 1017
)0.92
indexed/100
5976
ns/iter (± 670
)6510
ns/iter (± 1387
)0.92
indexed/500
7469
ns/iter (± 2208
)8175
ns/iter (± 2227
)0.91
indexed/1000
9200
ns/iter (± 233
)10178
ns/iter (± 6351
)0.90
indexed/10000
25450
ns/iter (± 2303
)18000
ns/iter (± 4181
)1.41
not
6173
ns/iter (± 1194
)6619
ns/iter (± 369
)0.93
double_not
12517
ns/iter (± 252
)13582
ns/iter (± 814
)0.92
De_Morgan_not
8143
ns/iter (± 231
)8562
ns/iter (± 381
)0.95
load_policy
892721
ns/iter (± 3862
)950472
ns/iter (± 23137
)0.94
partial_and/1
32371
ns/iter (± 1398
)35222
ns/iter (± 2491
)0.92
partial_and/5
112883
ns/iter (± 3332
)121439
ns/iter (± 6603
)0.93
partial_and/10
214697
ns/iter (± 4353
)231602
ns/iter (± 16696
)0.93
partial_and/20
435840
ns/iter (± 6724
)467711
ns/iter (± 21105
)0.93
partial_and/40
924653
ns/iter (± 12083
)998808
ns/iter (± 29374
)0.93
partial_and/80
2080529
ns/iter (± 3605
)2317162
ns/iter (± 89088
)0.90
partial_and/100
2749677
ns/iter (± 4757
)3109555
ns/iter (± 168321
)0.88
partial_rule_depth/1
104268
ns/iter (± 4155
)111883
ns/iter (± 5461
)0.93
partial_rule_depth/5
337936
ns/iter (± 7429
)364256
ns/iter (± 23875
)0.93
partial_rule_depth/10
732416
ns/iter (± 12972
)806790
ns/iter (± 46649
)0.91
partial_rule_depth/20
2048639
ns/iter (± 5386
)2326833
ns/iter (± 180110
)0.88
partial_rule_depth/40
7499724
ns/iter (± 99796
)8727450
ns/iter (± 290968
)0.86
partial_rule_depth/80
44884121
ns/iter (± 436547
)58064723
ns/iter (± 1783949
)0.77
partial_rule_depth/100
82826994
ns/iter (± 606662
)109466550
ns/iter (± 3478705
)0.76
This comment was automatically generated by workflow using github-action-benchmark.