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: allow bypass of duplicate errors #139

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

golanglemonade
Copy link
Member

@golanglemonade golanglemonade commented Jan 27, 2025

When someone is doing an update on an object, they can add the same edge that already exists; however, we then try to re-add the tuple which fails.

This change will ignore duplicate (or non-existent) keys and just log a warning.

This is configurable by a config var, but defaults to true.

The duplicate error string check is kind of annoying, and it's on the OpenFGA backlog of making it better, but for now its the best way. (They always return a 400/bad request on these and you have to string match the error)

Unverified

This user has not yet uploaded their public signing key.
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
@golanglemonade golanglemonade requested a review from a team as a code owner January 27, 2025 20:24
@github-actions github-actions bot added the enhancement New feature or request label Jan 27, 2025
@golanglemonade golanglemonade enabled auto-merge (squash) January 27, 2025 20:27

Unverified

This user has not yet uploaded their public signing key.
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 20%)

See analysis details on SonarQube Cloud

@golanglemonade golanglemonade merged commit e1463e8 into main Jan 27, 2025
11 of 12 checks passed
@golanglemonade golanglemonade deleted the feat-ignore-dupe-writes branch January 27, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants