flipt-io / flipt

Enterprise-ready, GitOps enabled, CloudNative feature management solution
https://flipt.io
GNU General Public License v3.0
3.83k stars 218 forks source link

[Bug]: import metadata issue #3635

Closed kvnhmn closed 4 days ago

kvnhmn commented 5 days ago

Bug Description

I export the flags with the following command: /opt/flipt/flipt export --config /opt/flipt/flipt.yml --all-namespaces -o backup-flipt-export.yaml

and then import them as follows: /opt/flipt/flipt --config /opt/flipt/flipt.yml import --drop backup-flipt-export.yaml

but get the error: Error: proto: invalid type: map[interface {}]interface {}

Flipt uses gopkg.in/yaml.v2 which convert data to map[any]any and protobuf expects map[string]any.

Version Info

v1.51.0

Search

Steps to Reproduce

Create a Flag with Metadata. Export it, and try to import it.

Expected Behavior

No response

Additional Context

No response

erka commented 5 days ago

This is a minimal backup file which allows to reproduce the issue

# exported by Flipt (v1.51.1) on 2024-11-21T11:39:38Z

version: "1.4"
namespace:
  key: default
  name: Default
  description: Default namespace
flags:
  - key: test
    name: test
    type: BOOLEAN_FLAG_TYPE
    enabled: false
    metadata:
      args:
        name: value