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

Flipt CLI: Import issue when --address and --drop is used #3222

Open
GeorgeMac opened this issue Jun 26, 2024 · 0 comments
Open

Flipt CLI: Import issue when --address and --drop is used #3222

GeorgeMac opened this issue Jun 26, 2024 · 0 comments

Comments

@GeorgeMac
Copy link
Contributor

I have a Flipt running in a minikube which is accessible through http://localhost:8000 in my computer.

There is no content in Flipt at the beginning

$ flipt export --address http://localhost:8000

version: "1.2"
namespace: default

Then, I created a yaml file to import content there

$ cat init-state.yaml

version: "1.2"
namespace: default
flags:
- key: my-first-flag
  name: my-first-flag
  type: VARIANT_FLAG_TYPE
  enabled: false

I'm able to import this data there

$ flipt import --address http://localhost:8000 init-state.yaml

$ flipt export --address http://localhost:8000

version: "1.2"
namespace: default
flags:
- key: my-first-flag
  name: my-first-flag
  type: VARIANT_FLAG_TYPE
  enabled: false  

However, if I try to import that yaml file again, I get an error because of the conflicts. This is normal

$ flipt import --address http://localhost:8000 init-state.yaml

Error: creating flag: rpc error: code = InvalidArgument desc = flag "default/my-first-flag" is not unique

For that reason, I added the --drop flag to the import. But, it seems it is doing nothing

$ flipt import --address http://localhost:8000 --drop init-state.yaml

Error: creating flag: rpc error: code = InvalidArgument desc = flag "default/my-first-flag" is not unique

Could you tell me what I'm doing wrong?

Thanks

Originally posted by @jordi-gou-flyr in #3221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant