Skip to content
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

Fixing id encoding issues when using special characters for custome already on ComputeGateway #22818

Merged

Conversation

FabianMeiswinkel
Copy link
Member

Packages impacted by this PR

@azure/cosmos

Issues associated with this PR

ICM#315831633

Describe the problem that is addressed by this PR

PR #22548 - #22548 changed the encoding of special characters in the documentId to make sure it work with RoutingGateway - it turned out that ComputeGateway and RoutingGateway expect different encoding (RoutingGateway expects id in the Uri to be double-percent-encoded - while Compute expects it to be only single percent-encoded. Aftersome discussion we decided that ComputeGateway behavior is actually correct - and making sure SDK works weel even when id has special characters in ComputeGateway means there are no regressions for customers on RoutingGateway (same failures as before #22548) - but at least it allows us to unblock customers who want to use special characters in id by moving them from RoutingGateway to ComputeGateway. The automatic migration from RoutingGateway to ComputeGateway will also accelerate - and over time the issues in RoutingGateway will vanish.

This PR moves back to a behavior working well with ComuteGateway - and ass tests against RountingGateway and ComputeGateway in the emulator.

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?

n/a

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

yes

Provide a list of related PRs (if any)

22548

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

n/a

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)

sdk/cosmosdb/cosmos/CHANGELOG.md Outdated Show resolved Hide resolved
sdk/cosmosdb/cosmos/src/common/helper.ts Outdated Show resolved Hide resolved
Copy link
Member

@sajeetharan sajeetharan left a comment

Choose a reason for hiding this comment

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

LGTM!

@FabianMeiswinkel FabianMeiswinkel merged commit c71b220 into Azure:main Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants