Azure / AppConfiguration

Questions, feedback and samples for Azure App Configuration service
MIT License
241 stars 73 forks source link

import mode "all" only works with "--yes" #998

Open hereicq opened 14 hours ago

hereicq commented 14 hours ago

import mode "all" only works with "--yes"

Here's the azure cli command line for reproduce. (need to set $AacName, $SampleFilePath and $ConfigPrefix first)

az appconfig kv import -n $AacName -s file --path $SampleFilePath --prefix $ConfigPrefix --format json --import-mode all --separator :

This command line works the first time when we import kvs in the $SampleFilePath to $AacName. This is expected because we don't have any kvs in the app configuration store. The second time we run the same command, it is supposed to replace all kvs in the last run with a new lastModified according to the definition of "import-mode"

Import mode "all" writes all key-values to the destination regardless of whether they exist or not.

However, the real behavior here is the command line exits with no action. The message is

---------------- Key Values Preview ----------------
Target configuration already contains all configuration settings in source. No changes will be made.

Then, when I add --yes to indicate Do not prompt for confirmation. The command line works as expected. This is weird because the behavior of the "import-mode" should not be impacted by the "--yes" option.

zhenlan commented 14 hours ago

@hereicq, agreed. This sounds like a bug. Thanks for reporting it.

@albertofori can you please follow up?