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

feat: add query consistency params #180

Merged
merged 6 commits into from
Jul 23, 2024

Conversation

ewanharris
Copy link
Member

@ewanharris ewanharris commented Jul 16, 2024

Description

Adds the consistency parameter to the following endpoints:

  • Check
  • List Users
  • List Objects + Streamed List Objects
  • Expand
  • Read

The parameter is an enum with two values:

  • UNSPECIFIED - This value should not be sent to the API but is the default. Intended to mean value not provided and will imply MINIMIZE_LATENCY behavior
  • MINIMIZE_LATENCY - behavior is as-is today, prefer the usage of caching methods to reduce query time
  • HIGHER_CONSISTENCY - used to signal to the API to prefer higher consistency at the expense of potentially reduced performance

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

jimmyjames and others added 4 commits June 21, 2024 11:01
* feat: add consistency enum parameter for query APIs

* fix CI workflow branch name

* ignore enum suffix lint rule

* ignore enum val prefix lint warning

* fix up generated files

* docs formatting fix

* review feedback: update enum vals for future additions, update docs

* fix up docs clarification for all endpoints
@ewanharris ewanharris requested review from a team as code owners July 16, 2024 10:45
.github/CODEOWNERS Outdated Show resolved Hide resolved
rhamzeh
rhamzeh previously approved these changes Jul 16, 2024
* doc: correct consistency reference in doc string

* chore: remove dx from codeowners as we're moving off feature branch
rhamzeh
rhamzeh previously approved these changes Jul 18, 2024
jpadilla
jpadilla previously approved these changes Jul 23, 2024
ci: don't pin version of buf (#181)

* ci: don't pin version of buf

Instead we will use the version that correlates to the action version

* chore(deps): update buf-setup-action version

* style: run buf format to make formatting changes
@ewanharris ewanharris dismissed stale reviews from jpadilla and rhamzeh via a6e3fd1 July 23, 2024 15:38
@ewanharris ewanharris merged commit 7e5be7b into main Jul 23, 2024
7 checks passed
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

6 participants