Skip to content

[Hub Generated] Review request for Microsoft.ContainerService/aks to add version preview/2024-03-02-preview #28612

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

Conversation

FumingZhang
Copy link
Member

This is a PR generated at OpenAPI Hub. You can view your work branch via this link.

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.

Note

As of January 2024 there is no PR assignee. This is expected. See https://aka.ms/azsdk/pr-arm-review.

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

If you are in purview of Step 1 of the diagram, follow the Breaking Changes review process.
IMPORTANT! This applies even if you believe your PR was mislabeled, for any reason, including tool failure.

Click here to see the details of Step 2, ARM review

See https://aka.ms/azsdk/pr-arm-review.

Click here to see the diagram footnotes

Diagram footnotes

[1] See ARM review queue (for PR merge queues, see [2]).
[2] public repo merge queue, private repo merge queue (for ARM review queue, [1])
The ARM reviewer on-call engineer visits the merge queue twice a day, so the approximate ETA for merges is 12 - 24 hours.

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 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 OpenAPI spec 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:

  • 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.
  • 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 PR workflow diagram Step 2 (ARM review), 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.

Copy link

openapi-pipeline-app bot commented Apr 8, 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 Apr 8, 2024

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️⚠️Breaking Change(Cross-Version): 8 Warnings warning [Detail]
Compared specs (v0.10.8) new version base version
managedClusters.json 2024-03-02-preview(830c127) 2024-02-01(main)
managedClusters.json 2024-03-02-preview(830c127) 2024-02-02-preview(main)

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

Rule Message
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L4983:9
Old: aks/stable/2024-02-01/managedClusters.json#L3636:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L4987:9
Old: aks/stable/2024-02-01/managedClusters.json#L3664:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L4991:9
Old: aks/stable/2024-02-01/managedClusters.json#L3681:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L4995:9
Old: aks/stable/2024-02-01/managedClusters.json#L3708:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L5000:9
Old: aks/stable/2024-02-01/managedClusters.json#L3731:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L5056:9
Old: aks/stable/2024-02-01/managedClusters.json#L3805:9
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L5091:11
Old: aks/stable/2024-02-01/managedClusters.json#L3854:11
⚠️ 1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: aks/preview/2024-03-02-preview/managedClusters.json#L6023:13
Old: aks/stable/2024-02-01/managedClusters.json#L4643:13
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 50 Warnings warning [Detail]
Compared specs (v2.2.0) new version base version
package-preview-2024-03 package-preview-2024-03(830c127) default(main)

[must fix]The following errors/warnings are introduced by current PR:

Only 30 items are listed, please refer to log for more details.

Rule Message Related RPC [For API reviewers]
⚠️ RequiredReadOnlySystemData The response of operation:'Machines_Get' is defined without 'systemData'. Consider adding the systemData to the response.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1514
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2534
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2537
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2540
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2579
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2582
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2585
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2591
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2624
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2627
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2630
⚠️ LatestVersionOfCommonTypesMustBeUsed Use the latest version v5 of types.json.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2639
⚠️ UniqueXmsExample Do not have duplicate name of x-ms-example, make sure every x-ms-example name unique. Duplicate x-ms-example: Get OperationStatusResult
Location: aks/preview/2024-03-02-preview/managedClusters.json#L2656
⚠️ UniqueXmsExample Do not have duplicate name of x-ms-example, make sure every x-ms-example name unique. Duplicate x-ms-example: List Agent Pools by Managed Cluster
Location: aks/preview/2024-03-02-preview/managedClusters.json#L3879
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L4373
⚠️ AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: aks/preview/2024-03-02-preview/managedClusters.json#L5098
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L5101
⚠️ AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: aks/preview/2024-03-02-preview/managedClusters.json#L5127
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L5760
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L5979
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L6008
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L6013
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L6018
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L6314
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7646
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7650
⚠️ SchemaDescriptionOrTitle Schema should have a description or title.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7657
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7660
⚠️ SchemaDescriptionOrTitle Schema should have a description or title.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7667
⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L7670


The following errors/warnings exist before current PR submission:

Only 30 items are listed, please refer to log for more details.

Rule Message
OperationsApiResponseSchema The response schema of operations API '/providers/Microsoft.ContainerService/operations' does not match the ARM specification. Please standardize the schema.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L52
OperationsApiSchemaUsesCommonTypes Operations API path must follow the schema provided in the common types.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L53
XmsPageableForListCalls x-ms-pageable extension must be specified for LIST APIs.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L74
ParametersInPointGet Query parameter resource-type should be removed. Point Get's MUST not have query parameters other than api version.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L80
XmsPageableForListCalls x-ms-pageable extension must be specified for LIST APIs.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L116
GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L137
XmsPageableForListCalls x-ms-pageable extension must be specified for LIST APIs.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L237
ResourceNameRestriction The resource name parameter 'roleName' should be defined with a 'pattern' restriction.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L278
ParametersInPost server-fqdn is a query parameter. Post operation must not contain any query parameter other than api-version.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L336
ParametersInPost server-fqdn is a query parameter. Post operation must not contain any query parameter other than api-version.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L381
ParametersInPost format is a query parameter. Post operation must not contain any query parameter other than api-version.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L381
ParametersInPost server-fqdn is a query parameter. Post operation must not contain any query parameter other than api-version.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L429
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L569
PatchResponseCodes Long-running PATCH operations must have responses with 200, 202 and default return codes. They also must not have other response codes.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L676
PatchIdentityProperty The patch operation body parameter schema should contain property 'identity'.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L695
LroPatch202 The async patch operation should return 202.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L713
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L723
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L781
ResourceNameRestriction The resource name parameter 'configName' should be defined with a 'pattern' restriction.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L841
PostResponseCodes Long-running POST operations must have responses with 202 and default return codes. They must also have a 200 return code if only if the final response is intended to have a schema, if not the 200 return code must not be specified. They also must not have other response codes.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1011
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1055
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1223
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1347
XmsPageableForListCalls x-ms-pageable extension must be specified for LIST APIs.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1363
XmsPageableForListCalls x-ms-pageable extension must be specified for LIST APIs.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1562
OperationIdNounVerb Per the Noun_Verb convention for Operation Ids, the noun 'AgentPools' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1566
GetCollectionOnlyHasValueAndNextLink Get endpoints for collections of resources must only have the value and nextLink properties in their model.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1586
PostResponseCodes 200 return code does not have a schema specified. LRO POST must have a 200 return code if only if the final response is intended to have a schema, if not the 200 return code must not be specified.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1605
LroErrorContent Error response content of long running operations must follow the error schema provided in the common types v2 and above.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1651
PostResponseCodes 200 return code does not have a schema specified. LRO POST must have a 200 return code if only if the final response is intended to have a schema, if not the 200 return code must not be specified.
Location: aks/preview/2024-03-02-preview/managedClusters.json#L1667
️❌Avocado: 9 Errors, 0 Warnings failed [Detail]
Rule Message
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/providers/Microsoft.ContainerService/openShiftManagedClusters is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2019-10-27-preview/openShiftManagedClusters.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/openShiftManagedClusters is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2019-10-27-preview/openShiftManagedClusters.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/openShiftManagedClusters/{} is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2019-10-27-preview/openShiftManagedClusters.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/fleets/{} is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/fleets is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/providers/Microsoft.ContainerService/fleets is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/fleets/{}/members/{} is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/fleets/{}/members is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.json
MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/resourceGroups/{}/providers/Microsoft.ContainerService/fleets/{}/listCredentials is not in the default tag. Please make sure the missing API swaggers are in the default tag.
readme: resource-manager/Microsoft.ContainerService/aks/readme.md
json: aks/preview/2022-09-02-preview/fleets.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?

Copy link

openapi-pipeline-app bot commented Apr 8, 2024

Swagger Generation Artifacts

️❌ApiDocPreview: 1 Errors, 0 Warnings failed [Detail]

Only -1 items are listed, please refer to log for more details.

Rule Message
️⚠️ azure-sdk-for-python warning [Detail]

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

️❌ azure-sdk-for-java failed [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-sdk-for-net-track2 failed [Detail]

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

️❌ azure-resource-manager-schemas failed [Detail]

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

️️✔️ azure-powershell succeeded [Detail] [Expand]

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

Posted by Swagger Pipeline | How to fix these errors?

Copy link

openapi-pipeline-app bot commented Apr 8, 2024

@FumingZhang
Copy link
Member Author

For the failure in Swagger Avocado,

image

InduSridhar and others added 2 commits April 9, 2024 13:18
* Adding ETags to AKS RP APIs

* Fix breaking change

---------

Co-authored-by: indusridhar <[email protected]>
…28633)

* feat: Support multiple standard load balancers in 2024-03-02-preview

* fix pipeline errors
@snguyen64
Copy link
Contributor

    }

Please review all the newly added properies in this PR and see if these can be represented as enums instead of booleans :

https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-instead-of-boolean.md

Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:8826 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

hi,
for advanced networking.observability
we have discussed that boolean is the better route for our api. We are using enablement field to turn on/off our addon and we are tying our features into the aks sku tiers - different aks skus = different features. I don't see any value in changing the boolean to an enum here.
we also had some discussion here: Advanced Networking - Overview (azure.com)

@nilo19
Copy link
Member

nilo19 commented Apr 19, 2024

    }

Please review all the newly added properies in this PR and see if these can be represented as enums instead of booleans :
https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-instead-of-boolean.md
Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:8826 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

hi, for advanced networking.observability we have discussed that boolean is the better route for our api. We are using enablement field to turn on/off our addon and we are tying our features into the aks sku tiers - different aks skus = different features. I don't see any value in changing the boolean to an enum here. we also had some discussion here: Advanced Networking - Overview (azure.com)

I also don't see the benefit of using string to replace boolean. In this way I need an extra conversion from bool to string in our code and this is not meaningful. Boolean appears to be a more concise choice for me.

@nilo19
Copy link
Member

nilo19 commented Apr 24, 2024

    "operationId": "LoadBalancers_Rebalance",

https://github.com/Azure/azure-openapi-validator/blob/main/docs/post-operation-id-contains-url-verb.md

Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:3836 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

Can you suggest a operation id? Another error would be hit if change to LoadBalancers_RebalanceLoadBalancers.

@FumingZhang FumingZhang removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Apr 24, 2024
@openapi-workflow-bot openapi-workflow-bot bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Apr 24, 2024
@matthchr
Copy link
Member

They likely want it to be called ManagedCluster_RebalanceLoadBalancers because it's hanging off of the managedCluster rather than a LoadBalancer?

@ramoka178
Copy link
Contributor

They likely want it to be called ManagedCluster_RebalanceLoadBalancers because it's hanging off of the managedCluster rather than a LoadBalancer?

This can work

@ramoka178
Copy link
Contributor

    "operationId": "LoadBalancers_Rebalance",

Try matthchr's suggested operationId


In reply to: 2060107330


Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:3836 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

@ramoka178
Copy link
Contributor

    }

Please review all the newly added properies in this PR and see if these can be represented as enums instead of booleans :
https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-instead-of-boolean.md
Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:8826 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

hi, for advanced networking.observability we have discussed that boolean is the better route for our api. We are using enablement field to turn on/off our addon and we are tying our features into the aks sku tiers - different aks skus = different features. I don't see any value in changing the boolean to an enum here. we also had some discussion here: Advanced Networking - Overview (azure.com)

I also don't see the benefit of using string to replace boolean. In this way I need an extra conversion from bool to string in our code and this is not meaningful. Boolean appears to be a more concise choice for me.

Standard guidance is: replace boolean/switch properties with a more meaningful enum whenever possible.
A boolean will forever have two valid values (true or false). A string enum type is always preferred. Also, properties should always provide better values just than True and False. For example two switches "isTypeA" and "isTypeB" should be replaced with one enum "type": [A, B, DefaultType]. Enums are always a more flexible and future proof option because they allow additional values to be added in the future in a non-breaking way, e.g. [Enabled, Disabled, Suspended, Deallocated].
Note: do NOT define a 'boolean enum' with two values 'True and False'. This might be easier to 'extend' in terms of types, but semantically its confusing, and no better than a boolean.

Since its a strong suggestion, please review and confirm from your side.

  • you can always compare enum to enum in code

@ramoka178 ramoka178 added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Apr 24, 2024
@openapi-workflow-bot openapi-workflow-bot bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Apr 24, 2024
@snguyen64
Copy link
Contributor

    }

Please review all the newly added properies in this PR and see if these can be represented as enums instead of booleans :
https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-instead-of-boolean.md
Refers to: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-03-02-preview/managedClusters.json:8826 in 19d06fc. [](commit_id = 19d06fc, deletion_comment = False)

hi, for advanced networking.observability we have discussed that boolean is the better route for our api. We are using enablement field to turn on/off our addon and we are tying our features into the aks sku tiers - different aks skus = different features. I don't see any value in changing the boolean to an enum here. we also had some discussion here: Advanced Networking - Overview (azure.com)

I also don't see the benefit of using string to replace boolean. In this way I need an extra conversion from bool to string in our code and this is not meaningful. Boolean appears to be a more concise choice for me.

Standard guidance is: replace boolean/switch properties with a more meaningful enum whenever possible. A boolean will forever have two valid values (true or false). A string enum type is always preferred. Also, properties should always provide better values just than True and False. For example two switches "isTypeA" and "isTypeB" should be replaced with one enum "type": [A, B, DefaultType]. Enums are always a more flexible and future proof option because they allow additional values to be added in the future in a non-breaking way, e.g. [Enabled, Disabled, Suspended, Deallocated]. Note: do NOT define a 'boolean enum' with two values 'True and False'. This might be easier to 'extend' in terms of types, but semantically its confusing, and no better than a boolean.

Since its a strong suggestion, please review and confirm from your side.

  • you can always compare enum to enum in code

I see the value of enum overall, but for advanced network observability, we only want to use this field to turn our feature on or off. The different features will be determined from ask cluster sku, so I don't think this feature will have any value from updating it to enum as stated.
If this is blocking the api, then we can update it, but we don't plan on having other states such as "deallocated" or "suspended". Pretty much we only want a simple on/off for observability

@nilo19
Copy link
Member

nilo19 commented Apr 26, 2024

For a property with only two possible values, a boolean data type is the most suitable choice. Changing it to a string enum would introduce unnecessary complexity.

@FumingZhang FumingZhang removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Apr 26, 2024
@openapi-workflow-bot openapi-workflow-bot bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Apr 26, 2024
@ramoka178 ramoka178 added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Apr 26, 2024
@openapi-workflow-bot openapi-workflow-bot bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Apr 26, 2024
@FumingZhang
Copy link
Member Author

/pr RequestMerge

@TimLovellSmith
Copy link
Member

@ramoka178 want to mark this PR approved based on your review or does it need further review?

Copy link
Contributor

@ramoka178 ramoka178 left a comment

Choose a reason for hiding this comment

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

approved

@ramoka178 ramoka178 merged commit 41751f4 into main Apr 29, 2024
26 of 32 checks passed
@ramoka178 ramoka178 deleted the FumingZhang-containerservice-Microsoft.ContainerService-2024-03-02-preview branch April 29, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.