Comments (5)
@KlausVii any chance you can build from main and try this again? https://github.com/openfga/cli#building-from-source
from cli.
@KlausVii This should be fixed in the last release, could you please confirm that it works for you?
Thanks
from cli.
- 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 runningfga store get --store-id= 01H6933TA1CCCVZTPYBPQJS0VF
from cli.
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.
@aaguiarz @jpadilla Just pulled and tested, seems to be working now. Thanks for the quick fix!
from cli.
Related Issues (20)
- `store import` should return store_id, model_id, errors if tuples failed to write HOT 6
- `go install` could not find cli HOT 1
- Support Modular Models
- Extend ReadFromFile to allow referencing an `fga.mod` file
- When loading an `fga.mod` file, send it to language for parsing
- Load all files returned after parsing the `fga.mod` file
- Allow referencing an `fga.mod` file in the store file
- Allow referencing an `fga.mod` file in the commands
- `fga --version` should return the version of the OpenFGA server
- `fga model write` second example doesn't work HOT 4
- Allow pattern matching by CLI for `--tests` argument with `test` command
- Generate a tests report HOT 7
- `fga store import` should display the generated Store ID + Model ID
- Invalid go-sdk version during build HOT 5
- Support `list_users` in the Store File
- add `output-format` parameter to `fga model transform`
- Add support for `fga query list-users`
- Use file name as default store name for `fga store import
- Add a progress bar to `fga store import`
- Support for contextual tuples in model tests HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.