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

Updated @azure/cosmos version to 3.17.3-beta.1 #25007

Merged

Conversation

v1k1
Copy link
Contributor

@v1k1 v1k1 commented Feb 27, 2023

Packages impacted by this PR

Issues associated with this PR

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 repository and link it here)
  • Added a changelog (if necessary)

@v1k1
Copy link
Contributor Author

v1k1 commented Feb 27, 2023

/azp run js - cosmosdb - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-cosmos

@v1k1 v1k1 merged commit 226549b into Azure:feature/hierarchical-partition Mar 6, 2023
v1k1 added a commit to v1k1/azure-sdk-for-js that referenced this pull request Apr 3, 2023
Packages impacted by this PR
@azure/cosmos

Issues associated with this PR

Describe the problem that is addressed by this PR
Added Hierarchical Partition Key Support

Refactored Definition of PartitionKey.
Old definition - type PartitionKey = PartitionKeyDefinition | string | number | unknown;
New definition - type PartitionKey = PrimitivePartitionKeyValue | PrimitivePartitionKeyValue[];
The main change here is
a) Separating out PartitionKeyDefinition [May seem like a breaking change. But the actual functions which need PartitionKeyDefinition were always taking PartitionKeyDefinition as an input i.e. ContainerDefinition, the existing definition seems confusing.]
b) Removal of unknown from definition (along with adding boolean). Defining it as PartitionKeyDefinition | string | number | unknown was effectively equivalent to unknown, since or of anything with unknown is unknown. Which essentially means we had no structure upon PartitionKey. This seems like a huge bug.
Introduced PartitionKeyInternal to create a boundary beyond with PartitionKey would be sanitized. The idea is to use ClientContext as that boundary.
Changed bulk/batch api Operation/OperationInput DTOs partitionKey field to PartitionKey type.
Clearly defined order for choosing partitionKey for an operation during bulk api. Now if the user has provided partitionKey in OperationInput it will be used, if not it will be derived from resource body (for create and upsert).
Added logic for MultiHash calculation.
Changed FeedOption.partitionKey filed to PartitionKey type.
[[Bugs fixes]]

In bulk api, The case when partition key path has escaped characters was not handled. In batch.ts -> deepFind() method.
In bulk/batch api Operation/OperationInput DTOs were inconsistent in supporting type of partition key values.
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
 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)
v1k1 added a commit to v1k1/azure-sdk-for-js that referenced this pull request Jun 7, 2023
Packages impacted by this PR
@azure/cosmos

Issues associated with this PR

Describe the problem that is addressed by this PR
Added Hierarchical Partition Key Support

Refactored Definition of PartitionKey.
Old definition - type PartitionKey = PartitionKeyDefinition | string | number | unknown;
New definition - type PartitionKey = PrimitivePartitionKeyValue | PrimitivePartitionKeyValue[];
The main change here is
a) Separating out PartitionKeyDefinition [May seem like a breaking change. But the actual functions which need PartitionKeyDefinition were always taking PartitionKeyDefinition as an input i.e. ContainerDefinition, the existing definition seems confusing.]
b) Removal of unknown from definition (along with adding boolean). Defining it as PartitionKeyDefinition | string | number | unknown was effectively equivalent to unknown, since or of anything with unknown is unknown. Which essentially means we had no structure upon PartitionKey. This seems like a huge bug.
Introduced PartitionKeyInternal to create a boundary beyond with PartitionKey would be sanitized. The idea is to use ClientContext as that boundary.
Changed bulk/batch api Operation/OperationInput DTOs partitionKey field to PartitionKey type.
Clearly defined order for choosing partitionKey for an operation during bulk api. Now if the user has provided partitionKey in OperationInput it will be used, if not it will be derived from resource body (for create and upsert).
Added logic for MultiHash calculation.
Changed FeedOption.partitionKey filed to PartitionKey type.
[[Bugs fixes]]

In bulk api, The case when partition key path has escaped characters was not handled. In batch.ts -> deepFind() method.
In bulk/batch api Operation/OperationInput DTOs were inconsistent in supporting type of partition key values.
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
 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)
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