Giter Club home page Giter Club logo

Comments (5)

jpadilla avatar jpadilla commented on June 9, 2024 1

@KlausVii any chance you can build from main and try this again? https://github.com/openfga/cli#building-from-source

from cli.

aaguiarz avatar aaguiarz commented on June 9, 2024 1

@KlausVii This should be fixed in the last release, could you please confirm that it works for you?

Thanks

from cli.

aaguiarz avatar aaguiarz commented on June 9, 2024
  • I could reproduce the issue about model-id not being accepted as flag, we'll fix it.
  • fga tuple import --store-id=<store-id> --file tuples.json should work, targeting the latest model. Make sure the store-id is valid by running fga store get --store-id= 01H6933TA1CCCVZTPYBPQJS0VF

from cli.

KlausVii avatar KlausVii commented on June 9, 2024

Thanks for the reply! I still cannot get import to work:

> fga tuple import --store-id 01H6933TA1CCCVZTPYBPQJS0VF --file=test.json  --server-url http://localhost:3070
Error: failed to import tuples due to ReadAuthorizationModel validation error for GET ReadAuthorizationModel with body {"code":"authorization_model_not_found","message":"Authorization Model '' not found"}
 with error code authorization_model_not_found error message: Authorization Model '' not found
> fga store get --server-url http://localhost:3070 --store-id 01H6933TA1CCCVZTPYBPQJS0VF
{
  "created_at":"2023-07-26T12:34:51.846295Z",
  "id":"01H6933TA1CCCVZTPYBPQJS0VF",
  "name":"Pactio",
  "updated_at":"2023-07-26T12:34:51.846295Z"
}
> fga model list --store-id 01H6933TA1CCCVZTPYBPQJS0VF --server-url  http://localhost:3070
{
  "authorization_models": [
    {
      "id":"01H70CA5NYV0RNRPJ4HEZ9SR1K",
      "created_at":"2023-08-04T13:38:09Z"
    },
    {
      "id":"01H70C9FXHXG1RDKDKMQ4WT27D",
      "created_at":"2023-08-04T13:37:46Z"
    }
  ]
}

As you can see the store exists and has models. The cli is making a call to ReadAuthorizationModel with an empty string:

 {"grpc_service": "openfga.v1.OpenFGAService", "grpc_method": "ReadAuthorizationModel", "grpc_type": "unary", "request_id": "6249cba1-403e-469c-85f0-5330415384a3", "raw_request": {"store_id":"01H6933TA1CCCVZTPYBPQJS0VF","id":""}, "raw_response": {"authorization_model":null}, "peer.address": "127.0.0.1:59962", "store_id": "01H6933TA1CCCVZTPYBPQJS0VF", "grpc_code": 2001, "error": "rpc error: code = Code(2001) desc = Authorization Model '' not found"}

Why its making that call, I don't know.

from cli.

KlausVii avatar KlausVii commented on June 9, 2024

@aaguiarz @jpadilla Just pulled and tested, seems to be working now. Thanks for the quick fix!

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.