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

chore: added example of how to get the failed tuples to retry the call #451

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aaguiarz
Copy link
Member

@aaguiarz aaguiarz commented Feb 5, 2025

Description

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

@aaguiarz aaguiarz requested review from a team as code owners February 5, 2025 12:30
Copy link
Contributor

@Siddhant-K-code Siddhant-K-code left a comment

Choose a reason for hiding this comment

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

Looks good & accessible, i think we can also link our docs as learn more


And then process the file with `jq` to convert it to format that you can send the CLI again:

`jq -c '[.failed[] | {user: .tuple_key.user, relation: .tuple_key.relation, object: .tuple_key.object}]' result.json > failed_tuples.json`
Copy link
Member

Choose a reason for hiding this comment

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

Given that a write failure isn't always retryable (i.e existing tuple, invalid tuple etc.) do we not want to try and guide people to review these prior to this and maybe provide some examples of what can be retried?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I rephrased it, let me know what you think

Addressed comments
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.

3 participants