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

Add format: duration to duration property

Open The-DevBlog opened this issue 2 years ago • 6 comments

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow. Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo. If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.

Changelog

Add a changelog entry for 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
    • [x] update existing version to fix swagger quality issue in s360
    • [ ] Other, please clarify
  2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month. - August
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month. - August
  4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the 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
    • [x] No refresh required for updates in this PR

Contribution checklist:

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

ARM API Review Checklist

Applicability: :warning:

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

  • [ ] Check this box if any of the following appy to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review. Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version -[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
  • [ ] 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 any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

  • [ ] Removing API(s) in a stable version
  • [ ] Removing properties in a stable version
  • [ ] Removing API version(s) in a stable version
  • [x] Updating API in a 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.

The-DevBlog avatar Aug 05 '22 21:08 The-DevBlog

Hi, @AndrewCS149 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]

    Swagger Validation Report

    ️❌BreakingChange: 1 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.9.7)] new version base version
    automanage.json 2022-05-04(0fa1bb1) 2022-05-04(main)
    Rule Message
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2296:9
    Old: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2296:9
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    compared tags (via openapi-validator v1.13.0) new version base version
    package-2022-05 package-2022-05(0fa1bb1) package-2022-05(main)

    The following errors/warnings exist before current PR submission:

    Rule Message
    R4039 - ParametersOrder The parameters:configurationProfileName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L221
    R4039 - ParametersOrder The parameters:configurationProfileName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L287
    R4039 - ParametersOrder The parameters:configurationProfileName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L388
    R4039 - ParametersOrder The parameters:configurationProfileName,versionName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L543
    R4039 - ParametersOrder The parameters:configurationProfileName,versionName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L616
    R4039 - ParametersOrder The parameters:configurationProfileName,resourceGroupName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L733
    R4039 - ParametersOrder The parameters:configurationProfileAssignmentName,resourceGroupName,vmName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L788
    R4039 - ParametersOrder The parameters:resourceGroupName,configurationProfileAssignmentName,vmName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L857
    R4039 - ParametersOrder The parameters:resourceGroupName,configurationProfileAssignmentName,vmName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L910
    R4039 - ParametersOrder The parameters:resourceGroupName,configurationProfileAssignmentName,reportName,vmName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L1152
    R4039 - ParametersOrder The parameters:resourceGroupName,configurationProfileAssignmentName,vmName should be kept in the same order as they present in the path.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L1214
    :warning: R3010 - TrackedResourceListByImmediateParent The child tracked resource, 'versions' with immediate parent 'ConfigurationProfile', must have a list by immediate parent operation.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2117
    :warning: R3010 - TrackedResourceListByImmediateParent The child tracked resource, 'reports' with immediate parent 'ConfigurationProfileAssignment', must have a list by immediate parent operation.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2257
    :warning: R3010 - TrackedResourceListByImmediateParent The child tracked resource, 'reports' with immediate parent 'ConfigurationProfileAssignment', must have a list by immediate parent operation.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2257
    :warning: R3010 - TrackedResourceListByImmediateParent The child tracked resource, 'reports' with immediate parent 'ConfigurationProfileAssignment', must have a list by immediate parent operation.
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2257
    :warning: R3018 - EnumInsteadOfBoolean Booleans are not descriptive and make them hard to use. Consider using string enums with allowed set of values defined. Property: authorizationSet
    Location: Microsoft.Automanage/stable/2022-05-04/automanage.json#L2412
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️❌~[Staging] ServiceAPIReadinessTest: 60 Errors, 0 Warnings failed [Detail] Test run on tag: package-2022-05, operation coverage: 37/37, failed operations: 23

    Service API Readiness Test failed. Check pipeline artifact for detail report.

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

    Rule Message
    CLIENT_ERROR "statusCode: 400,
    errorCode: undefined,
    errorMessage: undefined"
    ASSERTION_ERROR "expected response code to be 2XX but found 400"
    INVALID_CONTENT_TYPE "Invalid Content-Type (text/plain). These are supported: application/json"
    INVALID_TYPE "Expected type object but found type string"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.HybridCompute/machines/machinenamzxasuq' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.HybridCompute/machines/machinenamzxasuq' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.AzureStackHci/clusters/clusternammurzvl' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.AzureStackHci/clusters/clusternammurzvl' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.Compute/virtualMachines/vmnamearz9ir' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.Compute/virtualMachines/vmnamearz9ir' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.HybridCompute/machines/machinenamzxasuq' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.Compute/virtualMachines/vmnamearz9ir' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.AzureStackHci/clusters/clusternammurzvl' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 400,
    errorCode: undefined,
    errorMessage: undefined"
    ASSERTION_ERROR "expected response code to be 2XX but found 400"
    INVALID_CONTENT_TYPE "Invalid Content-Type (application/octet-stream). These are supported: application/json"
    INVALID_RESPONSE_BODY "Body is required in response but not provided"
    CLIENT_ERROR "statusCode: 404,
    errorCode: ResourceNotFound,
    errorMessage: The Resource 'Microsoft.Automanage/configurationProfiles/configuratn6f0ah/versions/versionnamhksbv2' under resource group 'apiTest-diOuWl' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    CLIENT_ERROR "statusCode: 404,
    errorCode: undefined,
    errorMessage: undefined"
    ASSERTION_ERROR "expected response code to be 2XX but found 404"
    ️⚠️~[Staging] TrafficValidation: 1 Warnings warning [Detail]

    restlerResult: Request coverage (successful / total): 13 / 37 Attempted requests: 23 / 37 Traffic validation failed. Check pipeline artifact for restler output and detail report.

    Rule Message
    :warning: Traffic validation result. "Starting task Test...\nUsing python: 'python3' (Python 3.10.5)\nRequest coverage (successful / total): 13 / 37\nAttempted requests: 23 / 37\nNo bugs were found.\nTask Test succeeded.\nCollecting logs...\n"
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️⚠️SDK Track2 Validation: 0 Warnings warning [Detail]
    • The following tags are being changed in this PR
      • "https://github.com/Azure/azure-rest-api-specs/blob/0fa1bb1c05fa9a16d8b5105004ae8de4ee20d51c/specification/automanage/resource-manager/readme.md#tag-package-2022-05">automanage/resource-manager/readme.md#package-2022-05
    The following errors/warnings exist before current PR submission:
    Rule Message
    :warning: UnkownSecurityScheme "readme":"automanage/resource-manager/readme.md",
    "tag":"package-2022-05",
    "details":"Security scheme azure_auth is unknown and will not be processed. Only supported types are AADToken,
    AzureKey,
    Anonymous"
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    Posted by Swagger Pipeline | How to fix these errors?

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking




    ️❌ azure-sdk-for-net failed [Detail]
    • Failed [Logs]Release - Generate from e1b31e4c9744bad4b8e8e29c57878b1e645e2968. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	sudo apt-get install -y dotnet-sdk-6.0
      command	autorest --version=2.0.4421 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION [email protected]/[email protected] --csharp-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/automanage/resource-manager/readme.md
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] No usable version of the libssl was found
      cmderr	[Autorest] FATAL: csharp/simplifier - FAILED
      cmderr	[Autorest] FATAL: Error: [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.
      cmderr	[Autorest] Process() cancelled due to exception : [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-net]: autorest
      warn	Skip package processing as generation is failed
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from e1b31e4c9744bad4b8e8e29c57878b1e645e2968. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 8.15.0 -> 8.19.1
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.1>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️track2_azure-mgmt-automanage [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from e1b31e4c9744bad4b8e8e29c57878b1e645e2968. SDK Automation 14.0.0
      command	sh ./eng/scripts/automation_init.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	generator automation-v2 ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️sdk/resourcemanager/automanage/armautomanage [View full logs]  [Release SDK Changes]
      info	[Changelog] ### Other Changes
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 0 additive change(s).
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from e1b31e4c9744bad4b8e8e29c57878b1e645e2968. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
      cmderr	[automation_generate.sh] [ERROR] Cannot generate changelog because the codes of local and npm may be the same.
    • ️✔️@azure/arm-automanage [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️️✔️ azure-powershell succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from e1b31e4c9744bad4b8e8e29c57878b1e645e2968. SDK Automation 14.0.0
      command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
      command	pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
    • ️✔️Az.Automanage [View full logs]  [Release SDK Changes]
    Posted by Swagger Pipeline | How to fix these errors?

    Generated ApiView

    Language Package Name ApiView Link
    Go sdk/resourcemanager/automanage/armautomanage Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.
    Python track2_azure-mgmt-automanage Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.
    JavaScript @azure/arm-automanage Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.

    Hi @AndrewCS149, 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. Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    Hi, @AndrewCS149. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

    ghost avatar Aug 21 '22 16:08 ghost

    Since this pr has no update, I will close it .

    xiaoxuqi-ms avatar Sep 03 '22 02:09 xiaoxuqi-ms

    #sign-off

    The-DevBlog avatar Sep 09 '22 23:09 The-DevBlog