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

Update Blueprints swagger files for live validation linter errors #11918

Merged
merged 2 commits into from
Dec 11, 2020
Merged

Update Blueprints swagger files for live validation linter errors #11918

merged 2 commits into from
Dec 11, 2020

Conversation

filizt
Copy link
Contributor

@filizt filizt commented Dec 3, 2020

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.
  3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
  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:

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
    • 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 API 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 version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

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-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 3, 2020

Swagger Validation Report

️❌BreakingChange: 22 Errors, 0 Warnings failed [Detail] Only 10 items are listed, please refer to log for more details.

Rule Message
1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}/WhoIsBlueprint' removed or restructured?
New: azure-rest-api-specs/blob/e131fd65e68d4c6d65fdeaadb95fb307e3535798/
Old: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json#L180:5
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/assignmentOperation.json#L70:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L724:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json#L85:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json#L125:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json#L189:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L165:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintAssignment.json#L267:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L574:11
1011 - AddingResponseCode The new version adds a response code 'default'.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L679:11
️⚠️LintDiff: 2 Warnings warning [Detail]

Rule Message
⚠️ R4021 - DescriptionAndTitleMissing 'CloudError' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L1388
⚠️ R4021 - DescriptionAndTitleMissing 'error' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
New: Microsoft.Blueprint/preview/2018-11-01-preview/blueprintDefinition.json#L1391
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
There are no breaking changes.
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Dec 3, 2020

Swagger Generation Artifacts

️⚠️ azure-sdk-for-net warning [Detail]
  • ⚠️Warning [Logs]Release - Generate from 2682c91. SDK Automation 14.0.0
    warn	Skip initScript due to not configured
    command	sudo apt-get install -y dotnet-sdk-5.0
    command	autorest --version=V2 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.csharp@2.3.82 --csharp-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/blueprint/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
  • ️✔️Microsoft.Azure.Management.Blueprint [View full logs]  [Release SDK Changes]
️❌ azure-sdk-for-go failed [Detail]
  • Failed [Logs]Release - Generate from 2682c91. SDK Automation 14.0.0
    command	sh ./initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
    error	Script return with result [failed] code [52] signal [null] cwd [azure-sdk-for-go/src/github.com/Azure/azure-sdk-for-go]: sh ./initScript.sh
    warn	File azure-sdk-for-go_tmp/initOutput.json not found to read
    command	go run ./tools/generator/main.go ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-go/src/github.com/Azure/azure-sdk-for-go]: go run ./tools/generator/main.go
    warn	Skip package processing as generation is failed
️⚠️ azure-sdk-for-js warning [Detail]
  • ⚠️Warning [Logs]Release - Generate from 2682c91. SDK Automation 14.0.0
    warn	Skip initScript due to not configured
    command	autorest --version=V2 --typescript --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.typescript@4.4.4 --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js/azure-sdk-for-js ../../azure-rest-api-specs/specification/blueprint/resource-manager/readme.md
    warn	No file changes detected after generation
    warn	No package detected after generation
️️✔️ azure-resource-manager-schemas succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs]Release - Generate from 2682c91. Schema Automation 14.0.0
    warn	Skip initScript due to not configured
    command	npx n 12
    command	autorest --use=@autorest/azureresourceschema@3.0.92 --version=3.0.6320 --azureresourceschema --multiapi --title=none --pass-thru:subset-reducer --azureresourceschema-folder=/home/vsts/work/1/s/azure-resource-manager-schemas/azure-resource-manager-schemas ../../azure-rest-api-specs/specification/blueprint/resource-manager/readme.md
  • ️✔️blueprint [View full logs]  [Release Schema Changes]
    cmderr	[resource-manager] node-pre-gyp
    cmderr	[resource-manager] WARN Using request for node-pre-gyp https download
    cmderr	[resource-manager] npm WARN template-schema-validation-tools@1.0.0 No repository field.
    cmderr	[resource-manager] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
    cmderr	[resource-manager] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
️⚠️ azure-sdk-for-python warning [Detail]
  • ⚠️Warning [Logs]Release - Generate from 2682c91. SDK Automation 14.0.0
    warn	Skip initScript due to not configured
    command	npx n 12
    command	python3 -m venv venv
    command	pip install --upgrade setuptools wheel pip
    command	pip install pathlib jinja2 msrestazure
    command	autorest --version=V2 --use=@microsoft.azure/autorest.python@~4.0.71 --python --python-mode=update --multiapi --keep-version-file --no-async --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk ../azure-rest-api-specs/specification/blueprint/resource-manager/readme.md
  • ⚠️azure-mgmt-blueprint [View full logs]  [Release SDK Changes]
    cmderr	[buildConf] INFO:packaging_tools:Building template azure-mgmt-blueprint
    cmderr	[buildConf] INFO:packaging_tools.conf:Build default conf for azure-mgmt-blueprint
    cmderr	[buildConf] INFO:packaging_tools:Template done azure-mgmt-blueprint
    cmderr	[buildPackage] /home/vsts/work/1/s/azure-sdk-for-python_tmp/venv/lib/python3.6/site-packages/setuptools/dist.py:470: UserWarning: The version specified ('2018-11-01-preview') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
    cmderr	[buildPackage]   "details." % version
    cmderr	[buildPackage] warning: no files found matching '*.py' under directory 'tests'
    cmderr	[buildPackage] warning: no files found matching '*.yaml' under directory 'tests'
    cmderr	[buildPackage] /home/vsts/work/1/s/azure-sdk-for-python_tmp/venv/lib/python3.6/site-packages/setuptools/dist.py:470: UserWarning: The version specified ('2018-11-01-preview') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
    cmderr	[buildPackage]   "details." % version
    cmderr	[buildPackage] warning: no files found matching '*.py' under directory 'tests'
    cmderr	[buildPackage] warning: no files found matching '*.yaml' under directory 'tests'
    cmderr	[changelogSetup] WARNING: Skipping azure-nspkg as it is not installed.
    cmderr	[changelogReport] Traceback (most recent call last):
    cmderr	[changelogReport]   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    cmderr	[changelogReport]     "__main__", mod_spec)
    cmderr	[changelogReport]   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    cmderr	[changelogReport]     exec(code, run_globals)
    cmderr	[changelogReport]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 354, in <module>
    cmderr	[changelogReport]     main(args.package_name, args.version, args.no_venv, args.pypi, args.last_pypi, args.output)
    cmderr	[changelogReport]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 209, in main
    cmderr	[changelogReport]     path_to_package = resolve_package_directory(package_name)
    cmderr	[changelogReport]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 133, in resolve_package_directory
    cmderr	[changelogReport]     return packages[0]
    cmderr	[changelogReport] IndexError: list index out of range
    warn	Script return with result [warning] code [1] signal [null] cwd [azure-sdk-for-python]: python
    cmderr	[changelogReportLatest] Traceback (most recent call last):
    cmderr	[changelogReportLatest]   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    cmderr	[changelogReportLatest]     "__main__", mod_spec)
    cmderr	[changelogReportLatest]   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    cmderr	[changelogReportLatest]     exec(code, run_globals)
    cmderr	[changelogReportLatest]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 354, in <module>
    cmderr	[changelogReportLatest]     main(args.package_name, args.version, args.no_venv, args.pypi, args.last_pypi, args.output)
    cmderr	[changelogReportLatest]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 209, in main
    cmderr	[changelogReportLatest]     path_to_package = resolve_package_directory(package_name)
    cmderr	[changelogReportLatest]   File "/home/vsts/work/1/s/azure-sdk-for-python/tools/azure-sdk-tools/packaging_tools/code_report.py", line 133, in resolve_package_directory
    cmderr	[changelogReportLatest]     return packages[0]
    cmderr	[changelogReportLatest] IndexError: list index out of range
    warn	Script return with result [warning] code [1] signal [null] cwd [azure-sdk-for-python]: python
    warn	Not exact 2 reports found:
    warn	Not generating changelog.
️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
Posted by Swagger Pipeline | How to fix these errors?

@openapi-workflow-bot
Copy link

Hi @filizt, 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 think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ma/swaggerfeedback.

@openapi-workflow-bot
Copy link

NewApiVersionRequired reason:

A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

@openapi-workflow-bot
Copy link

Hi, @filizt 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.
  • 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. vsswagger@microsoft.com

    @fengzhou-msft
    Copy link
    Member

    fengzhou-msft commented Dec 7, 2020

    @filizt Please follow this doc: https://aka.ms/bcforapi  to send a breaking change request if you don't want to use a new API version.
    For detailed steps:

    You can contact azureapirbcore@microsoft.com for the breaking change review progress or other related questions.

    @filizt filizt requested a review from JeffreyRichter December 9, 2020 16:17
    @filizt
    Copy link
    Contributor Author

    filizt commented Dec 9, 2020

    @JeffreyRichter we were granted exception for the changes in this PR. Here' s the link to the breaking change review:
    https://msazure.visualstudio.com/One/_workitems/edit/8937303

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Dec 9, 2020
    @msyyc
    Copy link
    Member

    msyyc commented Dec 10, 2020

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 2 pipeline(s).

    @majastrz
    Copy link
    Member

    Removed the NewApiVersionRequired label since the change is approved by breaking changes board.

    @majastrz majastrz added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Dec 10, 2020
    Copy link
    Member

    @majastrz majastrz left a comment

    Choose a reason for hiding this comment

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

    Signed off from ARM side.

    giromm2ms pushed a commit to giromm2ms/azure-rest-api-specs that referenced this pull request Dec 20, 2020
    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 ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants