-
Notifications
You must be signed in to change notification settings - Fork 39
Add option to hide successful tuple imports and display import summary #437
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
Add option to hide successful tuple imports and display import summary #437
Conversation
|
Thanks a lot @Siddhant-K-code! Can you change it to output something like: { So, we always detail the errors, as they are valuable, and output to the total count. |
|
@aaguiarz do you think, we should remove the separate txt summary from below? |
|
Yes, let's remove it, so we keep it a json output that can be easily parsed if needed |
This comment was marked as outdated.
This comment was marked as outdated.
|
lint fixes 🫠 |
|
💭 |
|
@Siddhant-K-code yeah, I like that more :) |
|
@aaguiarz, We are good to go now 🚀 do you think, we should also add this to the documentation? |
|
@Siddhant-K-code yes, it should be added to the documentation, thanks in advance for that! |
|
@aaguiarz, I've raised the docs PR, here: openfga/openfga.dev#926 |
|
I think, we are good to release it now, after release, we can merge the docs PR. |
ewanharris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks @Siddhant-K-code!
Would you mind squashing into a single commit?
Minder Vulnerability Report ✅Minder analyzed this PR and found it does not add any new vulnerable dependencies.
|
|
@ewanharris, it is good to go now 🚀 |
Description
This PR adds a new flag
--hide-imported-tuplesto the tuple write command that improves the output handling for large tuple imports.tl;dr; Changes:
--hide-imported-tuplesflag to suppress successful import outputtotal_count,failed_count,successful_countprocessedExample usage:
Example outputs:
With successful imports (without --hide-imported-tuples):
{ "successful": [ { "user": "user:anne", "relation": "viewer", "object": "document:roadmap" } ], "failed_count":0, "successful_count":1, "total_count":1 }With failed imports:
{ "failed": [ { "tuple_key": { "user": "user:carl", "relation": "writer", "object": "document:roadmap" }, "reason": "Write validation error ..." } ], "failed_count":1, "successful_count":0, "total_count":1 }References
fixes #376
Review Checklist
main