-
Notifications
You must be signed in to change notification settings - Fork 29
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
Importing with --store-id
leads to invalid state if store does not exist
#428
Comments
Can you describe your current workflow for local development? We are discussing some options here to allow using a unique store name openfga/rfcs#27. You'd be able to configure SDKs/CLI to use the store name instead of the ID. The CLI/SDK will retrieve the store Id once and then use it. Do you think that would help? Thanks a lot in advance |
Hey @aaguiarz, yes, a name would be fantastic! Would save us a lot of headaches. In the meantime, I'd say the current behaviour is still a bug 😅 |
@aaguiarz While the name would help - that's a separate issue. The main issue here is: |
Yep, the behavior is a bug. The way they'd prefer us to fix the bug is to use the |
Running
fga store import
with the--store-id
flag will result in an incorrect state if the store does not exist.Essentially, it'll create the
authorization_model
record just fine, but thestore_id
column will be referencing a store that does not exist. Personally, my preferred behaviour in this case would be that the store is created, but the Go SDK doesn't currently support creating a store with a preset ID, as far as I can tell.The reason for doing so would be to allow teams using shared environment variables to have a consistent setting for the store ID, as opposed to having to change it in local development every time a new store is created - this has become a bit of a pain for us at Documatic.
The text was updated successfully, but these errors were encountered: