From 1a3fd34ce0d11126593d5ea7369a0b43fdb6cf68 Mon Sep 17 00:00:00 2001 From: Roman Dmytrenko Date: Wed, 2 Oct 2024 15:30:05 +0300 Subject: [PATCH] docs(export): added info about the flag sort-by-key for export command Signed-off-by: Roman Dmytrenko --- cli/commands/export.mdx | 1 + operations/import-export.mdx | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/cli/commands/export.mdx b/cli/commands/export.mdx index 4b3579f6..4651e74e 100644 --- a/cli/commands/export.mdx +++ b/cli/commands/export.mdx @@ -16,6 +16,7 @@ flipt export [flags] -h, --help help for export --namespaces string comma-delimited list of namespaces to export from. (mutually exclusive with --all-namespaces) (default "default") -o, --output string export to filename (default STDOUT) + --sort-by-key sort exported resources by key. (flags, flag variants and segments. namespaces will be sorted with --all-namespaces) -t, --token string client token used to authenticate access to remote Flipt instance when exporting. ``` diff --git a/operations/import-export.mdx b/operations/import-export.mdx index 655f7e93..576b5dc5 100644 --- a/operations/import-export.mdx +++ b/operations/import-export.mdx @@ -85,4 +85,11 @@ flipt export --namespaces production namespaces. +By default, Flipt exports resources in the _natural_ order of the selected storage type. While the output is typically consistent within the same storage type, +import/export operations can yield varying results across different storage types. To enhance consistency during export, the --sort-by-key flag can be used. + +```yaml +flipt export --sort-by-key --all-namespaces +``` + See the [CLI reference](/cli/commands/export) for more information on the `export` command.