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

[AzureStack] [Admin API] Compute ScaleUnit Open API Spec #14133

Merged
merged 8 commits into from
Jun 7, 2021

Conversation

travist13
Copy link
Contributor

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Changelog

Please ensure to add changelog with this PR by answering the following questions.

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet. Response: Target:2106/2107.
  3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet. Response: Release of 2106/2017.
  4. If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No, no need to refresh for updates in this PR

Contribution checklist:

  • I commit to follow the Breaking Change Policy of "no breaking changes"
  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?
    Response: I have ran oav and autorest validation tools. Autorest is flagging new errors for old specs which we aim to fix after this PR, if possible, in order to avoid interrupting current work streams.

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Ensure to copy the existing version into new directory structure for first commit (including refactoring) and then push new changes including version updates in separate commits. This is required to review the changes efficiently.
    • Adding a new service
  • Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If there are following updates in the PR, ensure to request an approval from Breaking Change Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable or public preview version with Breaking Change Validation errors
  • Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.

Please follow the link to find more details on PR review process.

@openapi-workflow-bot
Copy link

Hi, @travist13 Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-workflow-bot
    Copy link

    [Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks.

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 26, 2021

    Swagger Validation Report

    ️❌BreakingChange: 19 Errors, 0 Warnings failed [Detail]

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

    Rule Message
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/Compute.json#L42:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L49:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L101:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L166:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L211:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L58:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L120:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L170:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L216:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/preview/2018-07-30-preview/DiskMigrationJobs.json#L52:11

    Rule Message
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L52:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L102:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L146:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L192:11
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    The following errors/warnings exist before current PR submission:

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

    Rule Message
    R3021 - PathResourceTypeNameCamelCase Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/VMExtension/publishers/{publisher}/types/{type}/versions/{version}'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L12
    R3021 - PathResourceTypeNameCamelCase Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/VMExtension'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L179
    R3021 - PathResourceTypeNameCamelCase Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/VMExtension/publishers/{publisher}/types/{type}/versions/{version}'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L12
    R3021 - PathResourceTypeNameCamelCase Resource type naming must follow camel case. Path: '/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/VMExtension'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L179
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L210
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L166
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L142
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json#L210
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json#L166
    R4011 - DeleteOperationResponses The delete operation is defined without a 200 or 204 error response implementation,please add it.'
    Location: Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json#L142
    ️⚠️Avocado: 2 Warnings warning [Detail]
    Rule Message
    ⚠️ MULTIPLE_API_VERSION The default tag contains multiple API versions swaggers.
    readme: azsadmin/resource-manager/compute/readme.md
    tag: azsadmin/resource-manager/compute/readme.md#tag-package-2021-04-01
    ⚠️ CIRCULAR_REFERENCE The JSON file has a circular reference.
    readme: azsadmin/resource-manager/compute/readme.md
    json: Microsoft.Compute.Admin/stable/2021-03-30/ScaleUnits.json
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️Cross-Version Breaking Changes succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
    Validation passes for SDKTrack2Validation

    The following errors/warnings are introduced by current PR:

    |:speech_balloon: AutorestCore/Exception|"readme":"azsadmin/resource-manager/compute/readme.md",
    "tag":"package-2021-04-01",
    "details":"> Installing AutoRest extension '@microsoft.azure/openapi-validator' (1.8.0)"|
    |:speech_balloon: AutorestCore/Exception|"readme":"azsadmin/resource-manager/compute/readme.md",
    "tag":"package-2021-04-01",
    "details":"> Installed AutoRest extension '@microsoft.azure/openapi-validator' (1.8.0->1.8.0)"|
    |:speech_balloon: AutorestCore/Exception|"readme":"azsadmin/resource-manager/compute/readme.md",
    "tag":"package-2021-04-01",
    "details":"> Loading AutoRest extension '@autorest/modelerfour' (4.15.456->4.15.456)"|

    ️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 26, 2021

    Swagger pipeline restarted successfully, please wait for status update in this comment.

    @openapi-workflow-bot
    Copy link

    Hi @travist13, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff.

    TaskHow to fixPrioritySupport (Microsoft alias)
    AvocadoFix-AvocadoHighruowan
    Semantic validationFix-SemanticValidation-ErrorHighraychen, jianyxi
    Model validationFix-ModelValidation-ErrorHighraychen,jianyxi
    LintDiffFix-LintDiffhighjianyxi, ruoxuan
    If you need further help, please feedback via swagger feedback."

    @PhoenixHe-NV
    Copy link
    Contributor

    @travist13 Please fix modelvalidation issue

    @openapi-workflow-bot
    Copy link

    Hi @travist13, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

    @travist13
    Copy link
    Contributor Author

    travist13 commented Apr 30, 2021

    Hi @travist13, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

    This last iteration was just adding a default error response as required by autorest validation. Nothing has changed for the API so is this really a breaking change? These changes that were flagged are simply bugfixes for the spec. @PhoenixHe-msft

    @bganapa
    Copy link
    Member

    bganapa commented May 6, 2021

    @PhoenixHe-msft The model validation error here looks to me like an issue in the tool. Could you please check?
    https://dev.azure.com/azure-sdk/internal/_build/results?buildId=871284&view=logs&j=14c5c170-9612-5b44-a650-13d3ca524cf8&t=4cbe29ed-7ee5-5ae8-5fbd-e8766d681690&l=58

    @bganapa
    Copy link
    Member

    bganapa commented May 6, 2021

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @PhoenixHe-NV
    Copy link
    Contributor

    @raych1 @jianyexi Anyone to help on the exception from modelvalidation?

    @raych1
    Copy link
    Member

    raych1 commented May 7, 2021

    @raych1 @jianyexi Anyone to help on the exception from modelvalidation?

    @travist13 , I sent you the detail errors which can be got when run the tool locally.

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label May 10, 2021
    @bganapa bganapa changed the title Implement Compute ScaleUnit Open API Spec [AzureStack] [Admin API] Compute ScaleUnit Open API Spec May 14, 2021
    @PhoenixHe-NV
    Copy link
    Contributor

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @bganapa
    Copy link
    Member

    bganapa commented May 20, 2021

    @PhoenixHe-msft Could you pls merge this PR?

    @bganapa
    Copy link
    Member

    bganapa commented May 20, 2021

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @PhoenixHe-NV
    Copy link
    Contributor

    @bganapa Please resolve the conflicts.

    @travist13
    Copy link
    Contributor Author

    @PhoenixHe-msft , I fixed the conflicts. Can you merge the PR?

    @PhoenixHe-NV PhoenixHe-NV merged commit a252633 into Azure:master Jun 7, 2021
    mkarmark pushed a commit to mkarmark/azure-rest-api-specs that referenced this pull request Jul 21, 2021
    * Fixed issues for Avocado, Semantic, Model, and LintDiff.
    
    * Implement Compute Admin GET Scale Unit View Open API spec and example.
    
    * Updating readme and List operations.
    
    * Adding default error responses
    
    * Removing ReadOnly=True from ARM resource.
    
    * Adding back ReadOnly property to ARM resource type; Adding suppression to readme.md file.
    
    * Reverting suppression and removing the unnecessary parameters from the examples.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 CI-FixRequiredOnFailure
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants