-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Azure App Configuration] - Normalize the query parameters in request url #35962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Azure App Configuration] - Normalize the query parameters in request url #35962
Conversation
There was a problem hiding this 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 adds query parameter normalization to the Azure App Configuration client to support Azure Front Door as a CDN. The implementation ensures all query parameters are converted to lowercase and sorted alphabetically for consistent, canonical request URLs.
Key changes:
- New pipeline policy for query parameter normalization
- Comprehensive test coverage for the normalization behavior
- File naming correction for consistency
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/internal/queryParamPolicy.ts |
New pipeline policy that normalizes query parameters to lowercase and sorts them alphabetically |
src/appConfigurationClient.ts |
Integrates the query param normalization policy into the client pipeline and fixes import path |
test/public/queryParam.spec.ts |
End-to-end tests verifying query parameter ordering in real client operations |
test/internal/queryParamPolicy.spec.ts |
Unit tests for the query parameter normalization policy |
test/internal/node/http.spec.ts |
Updates import path to match corrected filename casing |
CHANGELOG.md |
Documents the new feature and minor formatting cleanup |
sdk/appconfiguration/app-configuration/test/public/queryParam.spec.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/test/internal/queryParamPolicy.spec.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
|
I didn't update the test recording. Waiting for PR #35952 to be merged, which fixes the listLabels test. |
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
…or-js into zhiyuanliang/sort-query-param
…or-js into zhiyuanliang/sort-query-param
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
xirzec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A suggestion on how to implement the correct behavior without encoding side-effects
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
…or-js into zhiyuanliang/sort-query-param
sdk/appconfiguration/app-configuration/src/internal/queryParamPolicy.ts
Outdated
Show resolved
Hide resolved
### Packages impacted by this PR @azure/app-configuration ### Issues associated with this PR See [comment](#35962 (comment)) ### Describe the problem that is addressed by this PR ### 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](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary) --------- Co-authored-by: Minh-Anh Phan <[email protected]>
Packages impacted by this PR
@azure/app-configuration
Issues associated with this PR
Describe the problem that is addressed by this PR
Adds a new pipeline to update the query params to make sure they are all lowercase and in alphabetical order. This is required for support of Azure Front Door as a CDN.
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?)
Yes
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists