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

fix: ensure Check evaluates deterministically on the eval boundary case #732

Merged
merged 7 commits into from May 12, 2023

Conversation

jon-whit
Copy link
Member

@jon-whit jon-whit commented May 10, 2023

Description

This PR ensures Check evaluations are deterministic when two concurrent evaluation paths are on the boundary of evaluating a path that would encounter the AuthorizationModelTooComplexError case and another concurrent path that would yield an {allowed: true} outcome.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@jon-whit jon-whit requested a review from a team as a code owner May 10, 2023 16:16
@adriantam adriantam marked this pull request as draft May 10, 2023 16:21
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07 🎉

Comparison is base (6b70b06) 78.05% compared to head (e3a07ba) 78.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #732      +/-   ##
==========================================
+ Coverage   78.05%   78.12%   +0.07%     
==========================================
  Files          59       59              
  Lines        7088     7092       +4     
==========================================
+ Hits         5532     5540       +8     
+ Misses       1269     1267       -2     
+ Partials      287      285       -2     
Impacted Files Coverage Δ
internal/graph/check.go 91.71% <100.00%> (+1.40%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jon-whit jon-whit marked this pull request as ready for review May 10, 2023 22:47
internal/graph/check.go Outdated Show resolved Hide resolved
internal/graph/check.go Show resolved Hide resolved
pkg/testfixtures/storage/storage.go Outdated Show resolved Hide resolved
@jon-whit jon-whit merged commit 6c5456d into main May 12, 2023
12 checks passed
@jon-whit jon-whit deleted the deterministic-check-eval branch May 12, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants