Skip to content

[AppConfig] BREAKING CHANGE: az appconfig feature filter add: Support adding JSON objects as feature filter parameter values#16536

Merged
qwordy merged 3 commits intoAzure:devfrom
avanigupta:avanigupta/featurefilter
Jan 18, 2021
Merged

[AppConfig] BREAKING CHANGE: az appconfig feature filter add: Support adding JSON objects as feature filter parameter values#16536
qwordy merged 3 commits intoAzure:devfrom
avanigupta:avanigupta/featurefilter

Conversation

@avanigupta
Copy link
Copy Markdown
Member

@avanigupta avanigupta commented Jan 14, 2021

Description
Fix #16374

  • Affected Command:
    Az appconfig feature filter add -n TestAppConfig --feature Beta –filter-name TestFilter --filter-parameters name1=value1 name2=value2

  • Current Behavior:
    Always treat the value in --filter-parameters name=value as string value.

  • New Behavior:
    Accept only escaped JSON string as value in --filter-parameters name=value, and convert it to the correct data type accordingly.

Testing Guide

The following command should fail since the value is not a JSON escaped string:
az appconfig feature filter add -n TestAppConfig --feature Beta --filter-name TestFilter --filter-parameters stringValue=SomeText

This modified version should pass:
az appconfig feature filter add -n TestAppConfig --feature Beta --filter-name TestFilter --filter-parameters stringValue=\"SomeText\"

History Notes

[AppConfig] BREAKING CHANGE: az appconfig feature filter add:

  • Support adding JSON objects as feature filter parameter values
  • Accept only JSON escaped string as value in --filter-parameters name=value
  • name cannot be empty in --filter-parameters name=value
  • Sample inputs for common data types:
    • String value: --filter-parameters stringValue=\"This is some text\"
    • Numeric value: --filter-parameters numberValue=75
    • Array value: --filter-parameters arrayValue=[1,2,3]
    • Boolean value: --filter-parameters boolValue=true
    • Object value: --filter-parameters objectValue={\"Test\":{\"Level\":\"Debug\"}}

This checklist is used to make sure that common guidelines for a pull request are followed.

@avanigupta avanigupta requested a review from qwordy as a code owner January 14, 2021 19:58
@avanigupta
Copy link
Copy Markdown
Member Author

Hi @shenmuxiaosen, could you help review this change?

@yungezz
Copy link
Copy Markdown
Member

yungezz commented Jan 15, 2021

hi @qwordy could you pls help to review?

Copy link
Copy Markdown
Contributor

@shenmuxiaosen shenmuxiaosen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@qwordy
Copy link
Copy Markdown
Member

qwordy commented Jan 18, 2021

It is not easy to input JSON.

@qwordy qwordy merged commit 8fb0be5 into Azure:dev Jan 18, 2021
@avanigupta avanigupta deleted the avanigupta/featurefilter branch January 18, 2021 21:54
@MarshallMoorman
Copy link
Copy Markdown

When is this new feature expected to be released? Was it included in today's release?

@avanigupta
Copy link
Copy Markdown
Member Author

Hi @MarshallMoorman, this feature did not make it in today's release. It will be included in the next release. You can refer to the release notes to see which CLI version will contain this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature manager filter parameters parsed incorrectly

5 participants