Skip to content

[App Config] az appconfig enhanced-feature-flag: Add command group for enhanced feature flags - #34043

Open
Christine Wanjau (ChristineWanjau) wants to merge 1 commit into
Azure:devfrom
ChristineWanjau:cwanjau/enhancedFeatureFlags
Open

[App Config] az appconfig enhanced-feature-flag: Add command group for enhanced feature flags#34043
Christine Wanjau (ChristineWanjau) wants to merge 1 commit into
Azure:devfrom
ChristineWanjau:cwanjau/enhancedFeatureFlags

Conversation

@ChristineWanjau

@ChristineWanjau Christine Wanjau (ChristineWanjau) commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️appconfig
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd appconfig enhanced-feature-flag sub group appconfig enhanced-feature-flag added

Related command

az appconfig enhanced-feature-flag

Description

Adds a new az appconfig enhanced-feature-flag command group backed by the new App Configuration data-plane FeatureFlagClient (from azure-appconfiguration==1.10.0b1).

Commands:

  • az appconfig enhanced-feature-flag set (required: --feature)
  • az appconfig enhanced-feature-flag show (required: --feature)
  • az appconfig enhanced-feature-flag list
  • az appconfig enhanced-feature-flag delete (required: --feature)
  • az appconfig enhanced-feature-flag enable (required: --feature)
  • az appconfig enhanced-feature-flag disable (required: --feature)

Highlights:

  • Enhanced feature flags are identified by name + label; the reserved .appconfig.featureflag/ --key property is intentionally not exposed (the dedicated /ff/ endpoint manages the key server-side).
  • Supports --telemetry-enabled, --requirement-type, --description, and --tags on set.
  • --fields supports name, enabled, label, description, conditions, variants, allocation, tags, last_modified.
  • set performs a get-then-update so unspecified fields (e.g. enabled, description, telemetry, tags) are preserved on update.

Testing

  • Added test_azconfig_enhanced_feature scenario test (with recording) covering create/update/show/list/enable/disable/delete plus not-found error paths.

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

Add set/show/list/delete/enable/disable commands backed by the new data-plane FeatureFlagClient. Supports --telemetry-enabled and --fields (including variants and allocation); drops the --key property. Includes help, output formatting, params, a scenario test with recording, and a HISTORY entry.
Copilot AI lite review requested due to automatic review settings September 8, 2026 10:26
@ChristineWanjau Christine Wanjau (ChristineWanjau) changed the title {App Config} az appconfig enhanced-feature-flag: Add command group for enhanced feature flags [App Config] az appconfig enhanced-feature-flag: Add command group for enhanced feature flags Sep 8, 2026
@yonzhan

Copy link
Copy Markdown
Collaborator

App Config

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The enhanced feature flag serializer returns last_modified without normalizing datetime values, which can break downstream formatting/output handling.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new az appconfig enhanced-feature-flag command group to manage “enhanced feature flags” via the App Configuration data-plane FeatureFlagClient, wiring it into the App Config module’s command table, args, help, output formatting, and scenario tests.

Changes:

  • Introduces appconfig enhanced-feature-flag commands (set/show/list/delete/enable/disable) backed by FeatureFlagClient.
  • Extends App Config command plumbing: new args/validators, help text, output formatting, and constants.
  • Adds a new scenario test + recording; refactors shared data-plane client auth helper for --auth-mode login.
File summaries
File Description
src/azure-cli/HISTORY.rst Release note entry for the new command group
src/azure-cli/azure/cli/command_modules/appconfig/enhanced_feature.py Implements enhanced feature flag CRUD/enable/disable and serialization
src/azure-cli/azure/cli/command_modules/appconfig/commands.py Registers the new appconfig enhanced-feature-flag command group
src/azure-cli/azure/cli/command_modules/appconfig/_params.py Adds parameters for enhanced feature flags (fields, tags, etc.)
src/azure-cli/azure/cli/command_modules/appconfig/_validators.py Adds validator for enhanced feature --fields
src/azure-cli/azure/cli/command_modules/appconfig/_utils.py Adds FeatureFlagClient factory + refactors login credential resolution
src/azure-cli/azure/cli/command_modules/appconfig/_help.py Adds help + examples for the new commands
src/azure-cli/azure/cli/command_modules/appconfig/_format.py Adds table output formatting for enhanced feature flags
src/azure-cli/azure/cli/command_modules/appconfig/_constants.py Adds constants used in enhanced feature flag serialization
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_enhanced_feature_commands.py Adds scenario coverage for enhanced feature flags
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/recordings/test_azconfig_enhanced_feature.yaml Adds recording for the new scenario test
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +214 to +231
def _serialize_feature_flag(feature_flag, fields=None):
result = {
FeatureFlagConstants.NAME: feature_flag.name,
FeatureFlagConstants.ENABLED: feature_flag.enabled,
FeatureFlagConstants.LABEL: feature_flag.label,
FeatureFlagConstants.DESCRIPTION: feature_flag.description,
FeatureFlagConstants.CONDITIONS: feature_flag.conditions.as_dict() if feature_flag.conditions is not None else None,
FeatureFlagConstants.VARIANTS: [variant.as_dict() for variant in feature_flag.variants] if feature_flag.variants is not None else None,
FeatureFlagConstants.ALLOCATION: feature_flag.allocation.as_dict() if feature_flag.allocation is not None else None,
FeatureFlagConstants.TELEMETRY: feature_flag.telemetry.as_dict() if feature_flag.telemetry is not None else None,
FeatureFlagConstants.TAGS: feature_flag.tags,
FeatureFlagConstants.LAST_MODIFIED: feature_flag.last_modified,
}

if fields:
return {field: result[field] for field in fields if field in result}

return result
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.

4 participants