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

Add api version 2024-10-01-preview for Azure SignalR and Azure Web PubSub #31544

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

bjqian
Copy link
Contributor

@bjqian bjqian commented Nov 14, 2024

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.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • 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 OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • 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:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • 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
suppressions guide 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.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • 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.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • 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.

@bjqian bjqian requested a review from tadelesh as a code owner November 14, 2024 03:02
Copy link

openapi-pipeline-app bot commented Nov 14, 2024

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

Copy link

openapi-pipeline-app bot commented Nov 14, 2024

@bjqian bjqian changed the title Biqian/2024 10 01 preview Add api version 2024-10-01-preview for Azure SignalR and Azure Web PubSub Nov 14, 2024
@AzureRestAPISpecReview AzureRestAPISpecReview added ARMReview new-api-version resource-manager WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Nov 14, 2024
This was referenced Nov 14, 2024
@AzureRestAPISpecReview AzureRestAPISpecReview added the ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test label Nov 14, 2024
@razvanbadea-msft
Copy link
Contributor

    "maxInboundMessageBytes": {

if there is a 1GB as default why did you not set it? like you added for aggregationWindowInSeconds


Refers to: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/signalr.json:3743 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

@razvanbadea-msft
Copy link
Contributor

      "description": "Gets or sets the Keep-Alive Interval. Optional to set.\r\nValue is in seconds.\r\nThe default value is 15 seconds.\r\nCustomers should set this value to a shorter period if they want the service to send keep-alive messages more frequently, \r\nensuring timely checks of the connection status.\r\nConversely, customers can set this value to a longer period if they want the service to send keep-alive messages less frequently, \r\nreducing network traffic, but note that it may take longer to detect a disconnection.\r\nThis interval ensures that the connection is maintained by sending periodic keep-alive messages to the client.",

same thing about adding also a default


Refers to: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/signalr.json:3044 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

@razvanbadea-msft
Copy link
Contributor

      "description": "Rules to control the client traffic",

you can specify in the description that you cant add more than 10


Refers to: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/signalr.json:2157 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

@razvanbadea-msft
Copy link
Contributor

    "maxInboundMessageBytes": {

same comment in this file about default attribute


Refers to: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/webpubsub.json:3776 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

@razvanbadea-msft razvanbadea-msft added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Nov 14, 2024
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Nov 14, 2024
@bjqian
Copy link
Contributor Author

bjqian commented Nov 15, 2024

      "description": "Gets or sets the Keep-Alive Interval. Optional to set.\r\nValue is in seconds.\r\nThe default value is 15 seconds.\r\nCustomers should set this value to a shorter period if they want the service to send keep-alive messages more frequently, \r\nensuring timely checks of the connection status.\r\nConversely, customers can set this value to a longer period if they want the service to send keep-alive messages less frequently, \r\nreducing network traffic, but note that it may take longer to detect a disconnection.\r\nThis interval ensures that the connection is maintained by sending periodic keep-alive messages to the client.",

same thing about adding also a default

Refers to: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/signalr.json:3044 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

Hi @razvanbadea-msft . In this PR review , I found a new rule:
image
It's telling us to remove the swagger default value in the patch body. I'm confused whether or not we should mark the default value in the swagger. 😂

@bjqian bjqian added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Nov 15, 2024
@razvanbadea-msft
Copy link
Contributor

      "description": "Gets or sets the Keep-Alive Interval. Optional to set.\r\nValue is in seconds.\r\nThe default value is 15 seconds.\r\nCustomers should set this value to a shorter period if they want the service to send keep-alive messages more frequently, \r\nensuring timely checks of the connection status.\r\nConversely, customers can set this value to a longer period if they want the service to send keep-alive messages less frequently, \r\nreducing network traffic, but note that it may take longer to detect a disconnection.\r\nThis interval ensures that the connection is maintained by sending periodic keep-alive messages to the client.",

same thing about adding also a default
Refers to: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2024-10-01-preview/signalr.json:3044 in beb58ba. [](commit_id = beb58ba, deletion_comment = False)

Hi @razvanbadea-msft . In this PR review , I found a new rule: image It's telling us to remove the swagger default value in the patch body. I'm confused whether or not we should mark the default value in the swagger. 😂

for patch operations: A recommended way is to define a new model that only contains the patchable properties to replace the original parameter in request body. - https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-body-parameters-schema.md#how-to-fix

are those properties patchable or can be excluded from it?

@razvanbadea-msft razvanbadea-msft added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Nov 15, 2024
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Nov 15, 2024
@bjqian
Copy link
Contributor Author

bjqian commented Nov 19, 2024

Hi @razvanbadea-msft .

Thanks for the clarification! I understand the recommended approach is to use a separate model for patch if a model contains "default/required" properties.

Let me elaborate a bit on the issue:

Yes, those properties are pachable. However, the two properties in question were introduced in a model from a previous API version. Switching to a new model could potentially break existing client code.

In our Resource Provider, the actual behavior for default value in the comment is as follows:

  • For Create operations, our RP fills in the default value if these properties are omitted.
  • For Patch operations, the fields are left untouched if they are not provided.

In this way, we could avoid introducing "swagger default" in the client side.

Thank you again for highlighting this issue! Please let us know if you'd like more details or further clarification.

@bjqian bjqian added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Nov 19, 2024
@ms-bogdan-rotaru ms-bogdan-rotaru added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Nov 19, 2024
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Nov 19, 2024
@bjqian bjqian added the PublishToCustomers Acknowledgement the changes will be published to Azure customers. label Nov 20, 2024
@bjqian bjqian enabled auto-merge (squash) November 20, 2024 01:27
@bjqian
Copy link
Contributor Author

bjqian commented Nov 26, 2024

Hi guys, can we get merged for this PR 😃

@bjqian bjqian merged commit edc6e6a into Azure:main Nov 28, 2024
27 of 31 checks passed
danieljurek pushed a commit to danieljurek/azure-rest-api-specs that referenced this pull request Dec 9, 2024
…bSub (Azure#31544)

* Init from 2024-08-01-preview

* Update to 2024-10-01-preview

* Update readme

* Remove swagger default
danieljurek pushed a commit to danieljurek/azure-rest-api-specs that referenced this pull request Dec 9, 2024
…bSub (Azure#31544)

* Init from 2024-08-01-preview

* Update to 2024-10-01-preview

* Update readme

* Remove swagger default
digvijaymali94 pushed a commit to digvijaymali94/azure-rest-api-specs that referenced this pull request Dec 17, 2024
…bSub (Azure#31544)

* Init from 2024-08-01-preview

* Update to 2024-10-01-preview

* Update readme

* Remove swagger default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review new-api-version PublishToCustomers Acknowledgement the changes will be published to Azure customers. ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants