azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

[CosmosDB] Microsoft.DocumentDB 2024-02-15-preview API version

Open carjackson-msft opened this issue 1 year ago • 5 comments

ARM (Control Plane) API Specification Update Pull Request

Tip: overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

diagram

Click here to see the details of Step 1

Breaking changes review (Diagram Step 1)

If the automation determines you have breaking changes, i.e. Step 1 from the diagram applies to you, you must follow the breaking changes process.
IMPORTANT This applies even if:

  • The tool fails while it shouldn't, e.g. due to runtime exception, or incorrect detection of breaking changes.
  • You believe there is no need for you to request breaking change approval, for any reason. Such claims must be reviewed, and the process is the same.
Click here to see the details of Step 2

ARM API changes review (Diagram Step 2)

  • If this PR is in purview of ARM review then automation will add the ARMReview label.
  • If you want to force ARM review, add the label yourself.
  • Proceed according to the diagram at the top of this comment.
Click here to see the diagram footnotes

Diagram footnotes

[1] ARM review queue (for merge queues, see [2])
The PRs are processed by time opened, ascending. Your PR may show up on 2nd or later page. If you addressed Step 1 from the diagram and your PR is not showing up in the queue, ensure the label ARMChangesRequested is removed from your PR. This should cause the label WaitForARMFeedback to be added. [2] public repo merge queue, private repo merge queue (for ARM review queue, [1])

If you need further help with anything, see Getting help section below.

Purpose of this PR

What's the purpose of this PR? Check all that apply. This is mandatory!

  • [ ] New API version. (If API spec is not defined in TypeSpec, the PR should have been generated using OpenAPI Hub).
  • [ ] Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • [ ] Update existing version to fix swagger quality issues in S360.
  • [ ] Other, please clarify:
    • edit this with your clarification

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood and followed the instructions by checking all the boxes:

  • [x] I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • [x] I have reviewed following Resource Provider guidelines, including ARM resource provider contract and REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the Diagram Step 2, "ARM API changes Review", for this PR.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the Swagger-Suppression-Process to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure and https://aka.ms/ci-fix.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run. This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

carjackson-msft avatar Jan 16 '24 23:01 carjackson-msft

Next Steps to Merge

✅ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM).

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️⚠️Breaking Change(Cross-Version): 4 Warnings warning [Detail]
compared swaggers (via Oad v0.10.4)] new version base version
cosmos-db.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
cosmos-db.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
dataTransferService.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
managedCassandra.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
managedCassandra.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
mongoCluster.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
mongorbac.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
mongorbac.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
notebook.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
notebook.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
privateEndpointConnection.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
privateEndpointConnection.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
privateLinkResources.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
privateLinkResources.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
rbac.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
rbac.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
restorable.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
restorable.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
services.json 2024-02-15-preview(c172fe0) 2023-11-15(main)
services.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)
throughputpool.json 2024-02-15-preview(c172fe0) 2023-11-15-preview(main)

The following breaking changes are detected by comparison with the latest stable version:

Rule Message
1022 - RemovedAdditionalProperties The new version removes the 'additionalProperties' element.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L1534:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L1202:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L49:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L49:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L85:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L85:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L121:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L121:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L159:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L159:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L197:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L197:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L250:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L250:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L305:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L305:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L586:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L356:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L625:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L395:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L666:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L436:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L707:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L477:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L763:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L533:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L821:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L591:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L861:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L628:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L897:9
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L664:9
1023 - TypeFormatChanged The new version has a different format than the previous one.
New: common-types/resource-management/v5/types.json#L632:5
Old: common-types/resource-management/v2/types.json#L649:5
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'readwrite' renamed or removed?
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L1529:7
Old: Microsoft.DocumentDB/stable/2023-11-15/managedCassandra.json#L1197:7
:warning: 1014 - RemovingHeader The new version removs a required header 'azure-AsyncOperation'.
Old: Microsoft.DocumentDB/stable/2023-11-15/services.json#L140:15
:warning: 1014 - RemovingHeader The new version removs a required header 'location'.
Old: Microsoft.DocumentDB/stable/2023-11-15/services.json#L144:15


The following breaking changes are detected by comparison with the latest preview version:

Rule Message
:warning: 1026 - TypeChanged The new version has a different type 'string' than the previous one 'boolean'.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L821:9
Old: Microsoft.DocumentDB/preview/2023-11-15-preview/managedCassandra.json#L821:9
:warning: 1026 - TypeChanged The new version has a different type 'string' than the previous one 'boolean'.
New: Microsoft.DocumentDB/preview/2024-02-15-preview/managedCassandra.json#L951:5
Old: Microsoft.DocumentDB/preview/2023-11-15-preview/managedCassandra.json#L951:5
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️🔄LintDiff inProgress [Detail]
️❌Avocado: 1 Errors, 1 Warnings failed [Detail]
Rule Message
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/cosmos-db/resource-manager/readme.md
json: preview/2024-02-15-preview/examples/CosmosDBManagedCassandraCommandResultList.json
:warning: CIRCULAR_REFERENCE The JSON file has a circular reference.
readme: specification/cosmos-db/resource-manager/readme.md
json: Microsoft.DocumentDB/preview/2024-02-15-preview/privateEndpointConnection.json
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️❌SDK Breaking Change Tracking failed [Detail]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-sdk-for-python-track2 warning [Detail]

Only 0 items are rendered, please refer to log for more details.

️❌ azure-sdk-for-net-track2 failed [Detail]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-sdk-for-java warning [Detail]

Only 0 items are rendered, please refer to log for more details.

️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-resource-manager-schemas warning [Detail]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-powershell warning [Detail]

Only 0 items are rendered, please refer to log for more details.

Posted by Swagger Pipeline | How to fix these errors?

Hi @carjackson-msft! For review efficiency consideration, when creating a new API version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version.
For more details refer to the wiki.

Breaking changes should not apply here since this is a preview release.

Waiting for ARM review.

carjackson-msft avatar Feb 05 '24 18:02 carjackson-msft

Please address or respond to feedback from the ARM API reviewer.
When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
This will notify the reviewer to have another look.
If the feedback provided needs further discussion, please use this Teams channel to post your questions - aka.ms/azsdk/support/specreview-channel.
Please include [ARM Query] in the title of your question to indicate that it is ARM-related.

Per discussion with @mikekistler I've shared the previous preview PR: [Hub Generated] Review request for Microsoft.DocumentDB to add version preview/2023-11-15-preview by pjohari-ms · Pull Request #26206 · Azure/azure-rest-api-specs (github.com)

Since this is adding fields to existing preview apis, should not be breaking.

Waiting for breaking changes approval.

carjackson-msft avatar Feb 05 '24 19:02 carjackson-msft

Breaking changes previously reviewed and approved in #26206

mikekistler avatar Feb 05 '24 21:02 mikekistler

    "enablePerRegionPerPartitionAutoscale": {

Recommend enum over boolean, e.g. autoscaleMode: { None, PerRegionPerPartition, ... }


Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:8598 in 6419a79. [](commit_id = 6419a791c8857ab43dcb1dfe616c051d0b794987, deletion_comment = False)

mentat9 avatar Feb 09 '24 20:02 mentat9

    "enablePerRegionPerPartitionAutoscale": {

Same


Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:8778 in 6419a79. [](commit_id = 6419a791c8857ab43dcb1dfe616c051d0b794987, deletion_comment = False)

mentat9 avatar Feb 09 '24 20:02 mentat9

    "enablePerRegionPerPartitionAutoscale": {

Same


Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:8982 in 6419a79. [](commit_id = 6419a791c8857ab43dcb1dfe616c051d0b794987, deletion_comment = False)

mentat9 avatar Feb 09 '24 20:02 mentat9

    "restoreWithTtlDisabled": {

Prefer enum, something like timeToLivePolicy: { DisableOnRestore, Default, ... }


Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:11691 in 6419a79. [](commit_id = 6419a791c8857ab43dcb1dfe616c051d0b794987, deletion_comment = False)

mentat9 avatar Feb 09 '24 20:02 mentat9

    "restoreWithTtlDisabled": {

Prefer enum, something like timeToLivePolicy: { DisableOnRestore, Default, ... }

Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:11691 in 6419a79. [](commit_id = 6419a79, deletion_comment = False)

This property is just an optional toggle property within already existing RestoreParameter object to leave the target restored account with TTL disabled upon the restore completion. There is no reason to make it into an enum.

minhokang242 avatar Feb 09 '24 20:02 minhokang242

    "enablePerRegionPerPartitionAutoscale": {

Recommend enum over boolean, e.g. autoscaleMode: { None, PerRegionPerPartition, ... }

Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:8598 in 6419a79. [](commit_id = 6419a79, deletion_comment = False)

Autoscale do not have any other mode, enablePerRegionPerPartitionAutoscale it is just a property we want to enable for some accounts. Since all such properties are defined in Boolean, we want to make it consistent. Also it would be easier for user to define it.

kushalwarke1 avatar Feb 13 '24 05:02 kushalwarke1

Hi @mentat9, we had a discussion regarding refactoring the booleans enablePerRegionPerPartitionAutoscale and restoreWithTtlDisabled to be enums. We agree that this is the right approach.

We will make the service side code changes to refactor the booleans into enums for the next preview API release which we are planning for (2024-05-15-preview). In the meantime, we do not anticipate any changes for these in the near future, so we would like to release this version as is.

carjackson-msft avatar Feb 13 '24 17:02 carjackson-msft

Swagger Generation Artifacts

️🔄ApiDocPreview inProgress [Detail]
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking



️⌛ azure-sdk-for-python-track2 pending [Detail]
️⌛ azure-sdk-for-net-track2 pending [Detail]
️⌛ azure-sdk-for-java pending [Detail]
️⌛ azure-sdk-for-go pending [Detail]
️⌛ azure-sdk-for-js pending [Detail]
️⌛ azure-resource-manager-schemas pending [Detail]
️⌛ azure-powershell pending [Detail]
Posted by Swagger Pipeline | How to fix these errors?

/pr RequestMerge

carjackson-msft avatar Feb 15 '24 17:02 carjackson-msft

Hi @mentat9, just wanted to update you on the previous plan to change restoreWithTtlDisabled from a boolean into an enum.

    "restoreWithTtlDisabled": {

Prefer enum, something like timeToLivePolicy: { DisableOnRestore, Default, ... }

Refers to: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2024-02-15-preview/cosmos-db.json:11691 in 6419a79. [](commit_id = 6419a79, deletion_comment = False)

We had a deeper conversation with the Backup & Restore team who explained the domain-side justification for this to be a boolean. We typically do not change any account state as part of the restore process. Certain scenarios, however, such as network settings or TTL, need an override for security purposes. Since it is a exception scenario, changing it to an enum doesn't make sense as we do not foresee any extension of this scenario. Given this, we have decided to keep this as an boolean moving forward. Thank you again for your thorough review.

CC: @minhokang242

carjackson-msft avatar Mar 06 '24 22:03 carjackson-msft