Skip to content

Commit

Permalink
refactor: change sqlalchemy_oso authorization logs from INFO to DEB…
Browse files Browse the repository at this point in the history
…UG level (#1726)

refactor: change authorization logs from INFO to DEBUG level

Co-authored-by: Gabe Jackson <17556281+gj@users.noreply.github.com>
  • Loading branch information
Kevin Kirsche and gj authored Nov 18, 2023
1 parent 2c3813e commit 9f07507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions languages/python/sqlalchemy-oso/sqlalchemy_oso/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def do_orm_execute(execute_state):
return

entities = all_entities_in_statement(execute_state.statement)
logger.info(f"Authorizing entities: {entities}")
logger.debug(f"Authorizing entities: {entities}")
for entity in entities:
action = checked_permissions.get(entity)

Expand All @@ -316,7 +316,7 @@ def do_orm_execute(execute_state):
else:
filter = authorize_model(oso, user, action, session, entity)
if filter is not None:
logger.info(f"Applying filter {filter} to entity {entity}")
logger.debug(f"Applying filter {filter} to entity {entity}")
where = with_loader_criteria(entity, filter, include_aliases=True)
execute_state.statement = execute_state.statement.options(where)
else:
Expand Down

1 comment on commit 9f07507

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: 9f07507 Previous: 2c3813e Ratio
rust_get_attribute 28502 ns/iter (± 992) 28523 ns/iter (± 1130) 1.00
n_plus_one/100 1541884 ns/iter (± 23076) 1518334 ns/iter (± 25452) 1.02
n_plus_one/500 7491016 ns/iter (± 56534) 7362520 ns/iter (± 200785) 1.02
n_plus_one/1000 14841049 ns/iter (± 89963) 14564705 ns/iter (± 944152) 1.02
unify_once 629 ns/iter (± 280) 697 ns/iter (± 8) 0.90
unify_twice 1721 ns/iter (± 75) 1955 ns/iter (± 22) 0.88
many_rules 38451 ns/iter (± 1181) 40918 ns/iter (± 918) 0.94
fib/5 343854 ns/iter (± 4901) 352881 ns/iter (± 6015) 0.97
prime/3 10245 ns/iter (± 408) 10712 ns/iter (± 428) 0.96
prime/23 10225 ns/iter (± 381) 10687 ns/iter (± 408) 0.96
prime/43 10234 ns/iter (± 675) 10692 ns/iter (± 469) 0.96
prime/83 10226 ns/iter (± 443) 10681 ns/iter (± 527) 0.96
prime/255 9224 ns/iter (± 338) 9499 ns/iter (± 391) 0.97
indexed/100 3427 ns/iter (± 360) 3673 ns/iter (± 414) 0.93
indexed/500 3886 ns/iter (± 1032) 4214 ns/iter (± 1435) 0.92
indexed/1000 4307 ns/iter (± 213) 4586 ns/iter (± 226) 0.94
indexed/10000 7160 ns/iter (± 901) 9178 ns/iter (± 1526) 0.78
not 3954 ns/iter (± 873) 4319 ns/iter (± 183) 0.92
double_not 8584 ns/iter (± 168) 8614 ns/iter (± 145) 1.00
De_Morgan_not 5405 ns/iter (± 87) 5703 ns/iter (± 82) 0.95
load_policy 691766 ns/iter (± 3105) 692023 ns/iter (± 14852) 1.00
partial_and/1 20796 ns/iter (± 654) 21314 ns/iter (± 593) 0.98
partial_and/5 68684 ns/iter (± 1893) 70577 ns/iter (± 2483) 0.97
partial_and/10 129009 ns/iter (± 3565) 132807 ns/iter (± 3382) 0.97
partial_and/20 270651 ns/iter (± 8476) 278927 ns/iter (± 4712) 0.97
partial_and/40 590556 ns/iter (± 8517) 610662 ns/iter (± 10344) 0.97
partial_and/80 1367706 ns/iter (± 12809) 1424471 ns/iter (± 12860) 0.96
partial_and/100 1820600 ns/iter (± 121936) 1895939 ns/iter (± 80019) 0.96
partial_rule_depth/1 62242 ns/iter (± 2605) 64374 ns/iter (± 2173) 0.97
partial_rule_depth/5 215284 ns/iter (± 5721) 223237 ns/iter (± 5838) 0.96
partial_rule_depth/10 486410 ns/iter (± 9534) 508028 ns/iter (± 9764) 0.96
partial_rule_depth/20 1387108 ns/iter (± 24385) 1448233 ns/iter (± 21805) 0.96
partial_rule_depth/40 4971434 ns/iter (± 240346) 5167962 ns/iter (± 69135) 0.96
partial_rule_depth/80 27624841 ns/iter (± 241053) 28703082 ns/iter (± 284584) 0.96
partial_rule_depth/100 49917009 ns/iter (± 430891) 51572649 ns/iter (± 694986) 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.