Skip to content

Refine the logs emitted during the import process #523

@rhamzeh

Description

@rhamzeh

When importing a store fga store import or writing tuples fga tuple write,

It would be nice if instead of logging to stdout in the end, we:

  • allow for an optional, opt-in output to files. E.g. folks can pass in --output-success-file and --failed-success-file to output to the files from the CLI at (without requiring shell redirection). We can make sure that the output format would be compatible with the read so that people can call read on that file again. It should also have metadata about each tuple, including the error message and the request ID to allow for debugging the failure later.
  • By default have the CLI output to STDOUT the failed tuples, could be hidden by (--show-failed-tuples=false) (and optionally the successful tuples, enabled by --show-successful-tuples=true) as they occur (not wait till the end). This will help in situations where e.g. the CLI stalls, encounters a bug or exits early for any reason. It will also help the user monitor the progress and don't have to sit wondering until the process is done.

Originally posted by @rhamzeh in #511 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions