Skip to content

Conversation

zhiyuanliang-ms
Copy link
Member

Packages impacted by this PR

Issues associated with this PR

Describe the problem that is addressed by this PR

The Azure App Configuration team developed configuration provider library. It is built on the azure sdk. The Azure App Configuration team really wants the customers to use the configuration provider library.

For a long time, we did not provide a configuration provider library for JavaScript development. As a result, a large number of users have been relying on the Azure JS SDK, which is a problem for us. Many features, such as feature flags and secret references, are not suitable for direct usage through the SDK. The samples for feature flags and secret references in the SDK repo serve as misleading examples. This has even polluted the answers generated by current AI models.

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 15:50
@github-actions github-actions bot added the App Configuration Azure.ApplicationModel.Configuration label Aug 26, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates Azure App Configuration samples to use the configuration provider library instead of directly using the SDK for feature flags and secret references. The Azure App Configuration team wants customers to use the configuration provider library as it provides better support for features like feature flags and secret references that are not suitable for direct SDK usage.

Key changes:

  • Replace direct SDK usage with configuration provider pattern for both feature flags and secret references
  • Add new dependencies on @azure/app-configuration-provider and @microsoft/feature-management packages
  • Simplify sample code by removing complex parsing and filtering logic in favor of provider-based consumption

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
secretReference.ts (TypeScript) Updated to use configuration provider for secret reference resolution instead of manual parsing
featureFlag.ts (TypeScript) Replaced direct SDK feature flag manipulation with configuration provider and feature management library
package.json (TypeScript) Added dependencies for configuration provider and feature management libraries
secretReference.js (JavaScript) JavaScript version of the updated secret reference sample
featureFlag.js (JavaScript) JavaScript version of the updated feature flag sample
package.json (JavaScript) Added dependencies for JavaScript samples
secretReference.ts (samples-dev) Development version of the updated secret reference sample
featureFlag.ts (samples-dev) Development version of the updated feature flag sample
package.json (main) Added dev dependencies for the new libraries
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

sdk/appconfiguration/app-configuration/samples/v1/javascript/featureFlag.js:1

  • Missing import statements for the configuration provider and feature management libraries. These require statements should be added after the existing imports.
// Copyright (c) Microsoft Corporation.

@zhiyuanliang-ms zhiyuanliang-ms merged commit 31eeffc into Azure:main Sep 17, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Configuration Azure.ApplicationModel.Configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants