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

Azure CDN : Change casing for subscription ID and API version #12159

Merged
merged 5 commits into from
Jan 19, 2021

Conversation

jorinmejia
Copy link

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

Hi, @jorinmejia 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 cross api-version diff. See OpenAPI Hub Diff
  • 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

    Hi, @jorinmejia 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-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Dec 17, 2020

    Swagger Validation Report

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

    Rule Message
    1007 - RemovedClientParameter The new version is missing a client parameter that was found in the old version. Was 'SubscriptionIdParameter' removed or renamed?
    New: Microsoft.Cdn/stable/2020-09-01/cdnwebapplicationfirewall.json#L890:3
    Old: Microsoft.Cdn/stable/2020-09-01/cdnwebapplicationfirewall.json#L890:3
    1007 - RemovedClientParameter The new version is missing a client parameter that was found in the old version. Was 'ApiVersionParameter' removed or renamed?
    New: Microsoft.Cdn/stable/2020-09-01/cdnwebapplicationfirewall.json#L890:3
    Old: Microsoft.Cdn/stable/2020-09-01/cdnwebapplicationfirewall.json#L890:3
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.

    ️️✔️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.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Dec 17, 2020

    Swagger Generation Artifacts

    ️️✔️ azure-sdk-for-python succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from efdb4c9. 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 [email protected]/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/cdn/resource-manager/readme.md
    • ️✔️azure-mgmt-cdn [View full logs]  [Release SDK Changes]
      cmderr	[buildConf] INFO:packaging_tools:Building template azure-mgmt-cdn
      cmderr	[buildConf] INFO:packaging_tools.conf:Skipping default conf since the file exists
      cmderr	[buildConf] INFO:packaging_tools:Skipping CHANGELOG.md template, since a previous one was found
      cmderr	[buildConf] INFO:packaging_tools:Template done azure-mgmt-cdn
      cmderr	[buildPackage] warning: no files found matching '*.yaml' 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] INFO:__main__:Looking for Autorest generated package in azure.mgmt.cdn
      cmderr	[changelogReport] INFO:__main__:Found azure.mgmt.cdn
      cmderr	[changelogReport] INFO:__main__:Working on azure.mgmt.cdn
      cmderr	[changelogReport] INFO:__main__:Report written to sdk/cdn/azure-mgmt-cdn/code_reports/latest/report.json
      cmderr	[changelogReportLatest] INFO:__main__:Download versions of azure-mgmt-cdn on PyPI
      cmderr	[changelogReportLatest] INFO:__main__:Got ['0.30.0a1', '0.30.0rc1', '0.30.0rc2', '0.30.0rc3', '0.30.0rc4', '0.30.0rc5', '0.30.0rc6', '0.30.0', '0.30.1', '0.30.2', '0.30.3', '1.0.0', '2.0.0', '3.0.0', '3.1.0', '4.0.0', '4.1.0rc1', '5.0.0', '5.1.0', '5.2.0', '6.0.0', '10.0.0b1']
      cmderr	[changelogReportLatest] INFO:__main__:Only keep last PyPI version
      cmderr	[changelogReportLatest] INFO:__main__:Installing version 6.0.0 of azure-mgmt-cdn in a venv
      cmderr	[changelogReportLatest] Cache entry deserialization failed, entry ignored
      cmderr	[changelogReportLatest] INFO:__main__:Looking for Autorest generated package in azure.mgmt.cdn
      cmderr	[changelogReportLatest] INFO:__main__:Found azure.mgmt.cdn
      cmderr	[changelogReportLatest] INFO:__main__:Working on azure.mgmt.cdn
      cmderr	[changelogReportLatest] INFO:__main__:Report written to sdk/cdn/azure-mgmt-cdn/code_reports/6.0.0/report.json
      cmdout	[Changelog] Size of delta 0.001% size of original (original: 139117 chars, delta: 2 chars)
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from efdb4c9. SDK Automation 14.0.0
      command	sh ./initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	go run ./tools/generator/main.go ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️cdn/mgmt/2020-09-01/cdn [View full logs]  [Release SDK Changes] Breaking Change Detected
      Only show 14 items here, please refer to log for details.
      info	[Changelog] - Function `NewOperationsClient` parameter(s) have been changed from `(string, string)` to `(string)`
      info	[Changelog] - Function `NewPoliciesClient` parameter(s) have been changed from `(string, string)` to `(string)`
      info	[Changelog] - Function `NewRoutesClient` parameter(s) have been changed from `(string, string)` to `(string)`
      info	[Changelog] - Function `NewProfilesClientWithBaseURI` parameter(s) have been changed from `(string, string, string)` to `(string, string)`
      info	[Changelog] - Function `NewWithBaseURI` parameter(s) have been changed from `(string, string, string)` to `(string, string)`
      info	[Changelog] - Function `NewProfilesClient` parameter(s) have been changed from `(string, string)` to `(string)`
      info	[Changelog] - Function `NewRulesClientWithBaseURI` parameter(s) have been changed from `(string, string, string)` to `(string, string)`
      info	[Changelog] - Function `NewManagedRuleSetsClientWithBaseURI` parameter(s) have been changed from `(string, string, string)` to `(string, string)`
      info	[Changelog] - Function `NewPoliciesClientWithBaseURI` parameter(s) have been changed from `(string, string, string)` to `(string, string)`
      info	[Changelog] - Function `NewOriginGroupsClient` parameter(s) have been changed from `(string, string)` to `(string)`
      info	[Changelog] - Field `SubscriptionID1` of struct `BaseClient` has been removed
      info	[Changelog]
      info	[Changelog] Total 47 breaking change(s), 0 additive change(s).
      info	[Changelog]
    • ️✔️cdn/mgmt/2020-04-15/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2019-06-15/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2019-04-15/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2017-10-12/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2017-04-02/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2016-10-02/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2016-04-02/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cdn/mgmt/2015-06-01/cdn [View full logs]  [Release SDK Changes]
      info	[Changelog] No exported changes
    ️️✔️ azure-sdk-for-net succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from efdb4c9. 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 [email protected]/[email protected] --csharp-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/cdn/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.Cdn [View full logs]  [Release SDK Changes]
    ️🔄 azure-sdk-for-java inProgress [Detail]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from efdb4c9. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	autorest --version=V2 --typescript --license-header=MICROSOFT_MIT_NO_VERSION [email protected]/[email protected] --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js/azure-sdk-for-js ../../azure-rest-api-specs/specification/cdn/resource-manager/readme.md
    • ️✔️@azure/arm-cdn [View full logs]  [Release SDK Changes]
      cmderr	[npmPack] loaded rollup.config.js with warnings
      cmderr	[npmPack] (!) Unused external imports
      cmderr	[npmPack] default imported from external module 'rollup' but never used
      cmderr	[npmPack] ./esm/cdnManagementClient.js → ./dist/arm-cdn.js...
      cmderr	[npmPack] created ./dist/arm-cdn.js in 806ms
    ️️✔️ azure-resource-manager-schemas succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from efdb4c9. Schema Automation 14.0.0
      warn	Skip initScript due to not configured
      command	npx n 12
      command	autorest --use=@autorest/[email protected] --version=3.0.6351 --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/cdn/resource-manager/readme.md
    • cmderr	[resource-manager] node-pre-gyp
      cmderr	[resource-manager] WARN Using request for node-pre-gyp https download
      cmderr	[resource-manager] WARN [email protected] No repository field.
      cmderr	[resource-manager]  SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
      cmderr	[resource-manager] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    ️❌[Staging] ApiDocPreview: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    RestBuild error "logUrl":"https://apidrop.visualstudio.com/Content%20CI/_build/results?buildId=188153&view=logs&j=fd490c07-0b22-5182-fac9-6d67fe1e939b",
    "detail":"Run.ps1 failed with exit code 1 "
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-workflow-bot
    Copy link

    Hi @jorinmejia, 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.

    @weidongxu-microsoft
    Copy link
    Member

    @ghost
    Copy link

    ghost commented Jan 10, 2021

    Hi, @jorinmejia. 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 ghost added the no-recent-activity label Jan 10, 2021
    @openapi-workflow-bot
    Copy link

    Hi @jorinmejia, 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.

    @openapi-workflow-bot
    Copy link

    Hi @jorinmejia, 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."

    @jorinmejia
    Copy link
    Author

    jorinmejia commented Jan 15, 2021

    @weidongxu-microsoft,

    1. For the SDK azure-sdk-for-go, we do not get any helpful error information. It only mentions this error here :
    1. For Swagger ApiDocPreview, we get an error saying the yml files could not be generated? Can you help us understand why?

    2. For Swagger BreakingChange , we are only changing the casing on 2 parameters to maintain consistency. Do we still need a full ARM API review?

    Comment on lines -891 to 899
    "SubscriptionIdParameter": {
    "subscriptionIdParameter": {
    "name": "subscriptionId",
    "in": "path",
    "description": "Azure Subscription ID.",
    "required": true,
    "type": "string"
    },
    "ApiVersionParameter": {
    "apiVersionParameter": {
    "name": "api-version",

    Choose a reason for hiding this comment

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

    Is there reason to make these casing changes?

    Copy link
    Author

    Choose a reason for hiding this comment

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

    We need to make these casing changes because the Python SDK generation was failing. It was failing because the casing for subscriptionIdParameter and apiVersionParameter was not consistent in the afdx.json and cdn.json files.

    @weidongxu-microsoft
    Copy link
    Member

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 2 pipeline(s).

    @weidongxu-microsoft weidongxu-microsoft added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Jan 18, 2021
    @weidongxu-microsoft
    Copy link
    Member

    @ArcturusZhang This PR make some casing change on type name to make it consistent across 3 JSONs. Go SDK reports breaking changes, do you know whether they are OK or not?

    @weidongxu-microsoft
    Copy link
    Member

    @jorinmejia Go SDK is OK with it. Let me know when you need it merged.

    @jorinmejia
    Copy link
    Author

    @weidongxu-microsoft, please merge the changes ASAP. Thank you.

    @weidongxu-microsoft weidongxu-microsoft merged commit efdb4c9 into Azure:master Jan 19, 2021
    This was referenced Jan 19, 2021
    @jorinmejia jorinmejia deleted the jomejia/name-fixes branch June 28, 2021 22:05
    mkarmark pushed a commit to mkarmark/azure-rest-api-specs that referenced this pull request Jul 21, 2021
    …12159)
    
    * change casing of for subId and apiVersion
    
    * fix references
    
    * fix mismacth in apiVersion description
    
    * fix description in cdnwaf
    
    Co-authored-by: Jorin Mejia <[email protected]>
    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-BreakingChange-Go
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants