Skip to content

mgmt, local generation for Cosmos DB 2025-04-15 Stable SDK #45273

Merged
v-hongli1 merged 11 commits into
Azure:mainfrom
v-hongli1:issues#6122
May 14, 2025
Merged

mgmt, local generation for Cosmos DB 2025-04-15 Stable SDK #45273
v-hongli1 merged 11 commits into
Azure:mainfrom
v-hongli1:issues#6122

Conversation

@v-hongli1
Copy link
Copy Markdown
Contributor

@v-hongli1 v-hongli1 commented May 9, 2025

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions Bot added the Mgmt This issue is related to a management-plane library. label May 9, 2025
@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented May 9, 2025

API Change Check

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

com.azure.resourcemanager:azure-resourcemanager-cosmos

@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented May 9, 2025

API change check

API changes are not detected in this pull request.

@v-hongli1 v-hongli1 marked this pull request as ready for review May 9, 2025 07:38
Copilot AI review requested due to automatic review settings May 9, 2025 07:38
Copy link
Copy Markdown
Contributor

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 the Cosmos DB SDK to the 2025-04-15 Stable release by regenerating the code based on the latest swagger spec and adjusting model definitions. Key changes include:

  • Disabling tests that rely on local authentication methods.
  • Refactoring model classes (e.g., SqlDedicatedGatewayServiceResourceProperties, MaterializedViewsBuilderServiceResourceProperties, DataTransferServiceResourceProperties) to use fluent setters for properties like creationTime and status.
  • Introducing a new FullTextPolicy model along with its integration in SqlContainerResource and related classes, and updating API version references in the client implementation and assets.

Reviewed Changes

Copilot reviewed 204 out of 204 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CosmosDBTests.java Disabled several tests that use local authentication methods.
SqlDedicatedGatewayServiceResourceProperties.java, MaterializedViewsBuilderServiceResourceProperties.java, DataTransferServiceResourceProperties.java, GraphApiComputeServiceResourceProperties.java Removed legacy fields and refactored property assignments to use fluent setters.
SqlContainerResource.java, SqlContainerGetPropertiesResource.java, RestorableSqlContainerPropertiesResourceContainer.java Integrated new FullTextPolicy support with corresponding JSON serialization/deserialization and validation logic.
FullTextPolicy.java, FullTextPath.java Added new models for handling full text search features in Cosmos DB.
CosmosDBManagementClientImpl.java, assets.json, CHANGELOG.md, api-specs.json Updated API version references and related metadata.
Comments suppressed due to low confidence (2)

sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java:67

  • Disabling tests for local authentication may reduce coverage for those scenarios. Consider adding alternative tests or documentation to ensure that local authentication behavior is adequately tested in other environments.
@Disabled("Local authentication methods are not allowed.")

sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerResource.java:420

  • Since the FullTextPolicy integration is new, ensure there are comprehensive unit tests covering its serialization and deserialization to confirm consistent behavior across model classes.
jsonWriter.writeJsonField("fullTextPolicy", this.fullTextPolicy);

Copy link
Copy Markdown
Contributor

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 the Cosmos DB management SDK to the 2025-04-15 stable API version with local generation and introduces fullTextPolicy support in container resource models while removing direct status and creationTime fields in favor of fluent setters.

  • Removed direct fields (status, creationTime) from several service resource properties and replaced assignments with fluent setters.
  • Added fullTextPolicy support (getter, setter, validation, and JSON serialization/deserialization) to container resource models.
  • Updated the apiVersion in the management client and api-specs, and adjusted CHANGELOG accordingly.

Reviewed Changes

Copilot reviewed 202 out of 202 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlDedicatedGatewayServiceResourceProperties.java Removed status and creationTime fields; updated JSON deserialization to use fluent setters.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerResource.java Added fullTextPolicy field and its getter, setter, JSON serialization/deserialization, and validation.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/SqlContainerGetPropertiesResource.java Extended fullTextPolicy support via fluent setter and updated JSON methods.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/RestorableSqlContainerPropertiesResourceContainer.java Introduced fullTextPolicy fluent setter and integrated validation and JSON updates.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/MaterializedViewsBuilderServiceResourceProperties.java Removed status and creationTime; updated deserialization to use fluent setters.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/GraphApiComputeServiceResourceProperties.java Similar removal of direct fields with updates to use fluent setters in JSON deserialization.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/FullTextPolicy.java New file implementing the full text policy model with appropriate JSON support and validation.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/FullTextPath.java New file representing full text path specs with validation and JSON methods.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/DataTransferServiceResourceProperties.java Removed obsolete fields; updated deserialization to use fluent setters.
sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBManagementClientImpl.java Updated apiVersion from 2024-11-15 to 2025-04-15.
sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md Updated CHANGELOG to reflect the apiVersion change and other modifications.
sdk/resourcemanager/api-specs.json Updated generation arguments to use the new apiVersion.

@v-hongli1 v-hongli1 merged commit 0cf0541 into Azure:main May 14, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants