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

Support referencing tuple file in the store file #144

Open
1 of 2 tasks
rhamzeh opened this issue Jan 11, 2024 · 3 comments
Open
1 of 2 tasks

Support referencing tuple file in the store file #144

rhamzeh opened this issue Jan 11, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Jan 11, 2024

Currently, we support a model_file option in addition to model for users who prefer to edit their model in a separate file.

We should support a tuple_file that does the same for tuples.

That file will be the same format as accepted by write

name: Some Store
model_file: ./model.fga
tuple_file: ./tuples.yaml
tests:
  - name: test 1
    tuple_file: ./test1_tuples.json
    check: ...
    list_objects: ...
  - name: test 2
    tuple_file: ./test2_tuples.json
    check: ...
    list_objects: ...

This follows on the work completed on the CLI: openfga/cli#179

On VS Code, this includes:

  • Do not mark tuple_file as invalid, both globally and in tests
  • Validate tests (Checks and List objects) according to the tuples, including those in the model file
@rhamzeh rhamzeh added the enhancement New feature or request label Jan 11, 2024
@d-jeffery
Copy link
Contributor

d-jeffery commented Jan 25, 2024

tuple_file fields no longer marked invalid as long as file being referenced exists. As of #147

@mikesouza
Copy link

mikesouza commented May 1, 2024

Would definitely be nice to have the second task finished, since I assume it's why we get this warning using the extension:
image

Reproducible by simply using the FGA CLI testing docs example and moving the tuples to ./tuples.yaml.

@gurleensethi
Copy link

Getting the same warning as @mikesouza above.

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

No branches or pull requests

4 participants