Skip to content

Comments

Workload monitor add api version2#11039

Merged
markcowl merged 19 commits intoAzure:masterfrom
juliaweingart:workloadMonitor-addApiVersion2
Oct 6, 2020
Merged

Workload monitor add api version2#11039
markcowl merged 19 commits intoAzure:masterfrom
juliaweingart:workloadMonitor-addApiVersion2

Conversation

@juliaweingart
Copy link
Contributor

@juliaweingart juliaweingart commented Oct 5, 2020

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

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
  • 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

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

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Oct 5, 2020

[Staging] Swagger Validation Report

️✔️BreakingChange [Detail]
 There are no breaking changes. 
️✔️LintDiff [Detail]
 Validation passes for LintDiff. 
️✔️Avocado [Detail]
 Validation passes for Avocado. 
️✔️ModelValidation [Detail]
 Validation passes for ModelValidation. 
️✔️SemanticValidation [Detail]
 Validation passes for SemanticValidation. 
Posted by Swagger Pipeline | How to fix these errors?

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Oct 5, 2020

Azure CLI Extension Generation - Release

No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Oct 5, 2020

azure-sdk-for-go - Release

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from ed46144 with merge commit dd550d9. SDK Automation 13.0.17.20200918.2
  • ⚠️preview/workloadmonitor/mgmt/2018-08-31-preview [View full logs
    No file is changed.
  • ️✔️preview/workloadmonitor/mgmt/2020-01-13-preview [View full logs]  [Release SDK Changes]
    Unable to get details about the head commit. This is probably because the head commit is in a fork that we don't have permission to read from. HttpError: Not Found {"name":"HttpError","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","connection":"close","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Tue, 06 Oct 2020 19:44:29 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","status":"404 Not Found","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; param=machine-man-preview; format=json","x-github-request-id":"07C2:800D:22E19:294B5:5F7CC91D","x-xss-protection":"1; mode=block"},"request":{"method":"POST","url":"https://api.github.com/app/installations//access_tokens","headers":{"accept":"application/vnd.github.machine-man-preview+json","user-agent":"octokit.js/16.43.1 Node.js/13.14.0 (Linux 5.4; x64)","authorization":"bearer [REDACTED]","content-type":"application/json; charset=utf-8"},"body":"{}","request":{"validate":{"commit_sha":{"alias":"ref","deprecated":true,"type":"string"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"alias":"ref","deprecated":true,"type":"string"}}}},"documentation_url":"https://docs.github.com/rest"}

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Oct 5, 2020

azure-sdk-for-java

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from ed46144 with merge commit 3c8544a167d77c73ce53481207e4e7acffe9ee29. SDK Automation 13.0.17.20200918.2
  • ⚠️sdk/workloadmonitor/mgmt-v2018_08_31_preview [View full logs]  [Preview SDK Changes]
      [mvn] [ERROR] COMPILATION ERROR : 
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/MonitorsInner.java:[544,194] cannot find symbol
      [mvn]   symbol:   variable body
      [mvn]   location: class com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorsInner
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/NotificationSettingsInner.java:[526,208] cannot find symbol
      [mvn]   symbol:   variable body
      [mvn]   location: class com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.NotificationSettingsInner
      [mvn] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project azure-mgmt-workloadmonitor: Compilation failure: Compilation failure: 
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/MonitorsInner.java:[544,194] cannot find symbol
      [mvn] [ERROR]   symbol:   variable body
      [mvn] [ERROR]   location: class com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorsInner
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/NotificationSettingsInner.java:[526,208] cannot find symbol
      [mvn] [ERROR]   symbol:   variable body
      [mvn] [ERROR]   location: class com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.NotificationSettingsInner
      [mvn] [ERROR] -> [Help 1]
      [mvn] [ERROR] 
      [mvn] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [mvn] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [mvn] [ERROR] 
      [mvn] [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [mvn] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    • ⚠️sdk/workloadmonitor/mgmt-v2020-01-13-preview [View full logs]  [Preview SDK Changes]
        [mvn] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:jar (default-cli) on project azure-mgmt-workloadmonitor: MavenReportException: Error while creating archive: 
        [mvn] [ERROR] Exit code: 1 - javadoc: error - Illegal package name: "com.microsoft.azure.management.workloadmonitor.v2020-01-13-preview"
        [mvn] [ERROR] 
        [mvn] [ERROR] Command line was: /usr/lib/jvm/java-8-openjdk-amd64/jre/../bin/javadoc @options @packages
        [mvn] [ERROR] 
        [mvn] [ERROR] Refer to the generated Javadoc files in '/z/work/azure-sdk-for-java/sdk/workloadmonitor/mgmt-v2020-01-13-preview/target/apidocs' dir.
        [mvn] [ERROR] -> [Help 1]
        [mvn] [ERROR] 
        [mvn] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [mvn] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [mvn] [ERROR] 
        [mvn] [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [mvn] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

      @openapi-sdkautomation
      Copy link

      openapi-sdkautomation bot commented Oct 5, 2020

      azure-sdk-for-js - Release

      No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

      @openapi-sdkautomation
      Copy link

      openapi-sdkautomation bot commented Oct 5, 2020

      azure-sdk-for-net - Release

      ️✔️ succeeded [Logs] [Expand Details]
      • ️✔️ Generate from ed46144 with merge commit dd550d9. SDK Automation 13.0.17.20200918.2
        [AutoRest] realpath(): Permission denied
        [AutoRest] realpath(): Permission denied
        [AutoRest] realpath(): Permission denied
        [AutoRest] realpath(): Permission denied
        [AutoRest] realpath(): Permission denied
        [AutoRest] realpath(): Permission denied
      • ️✔️Microsoft.Azure.Management.WorkloadMonitor [View full logs]  [Release SDK Changes]
          Unable to get details about the head commit. This is probably because the head commit is in a fork that we don't have permission to read from. HttpError: Not Found {"name":"HttpError","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","connection":"close","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Tue, 06 Oct 2020 19:40:14 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","status":"404 Not Found","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; param=machine-man-preview; format=json","x-github-request-id":"0742:31CD:6C1E:13DB8:5F7CC81E","x-xss-protection":"1; mode=block"},"request":{"method":"POST","url":"https://api.github.com/app/installations//access_tokens","headers":{"accept":"application/vnd.github.machine-man-preview+json","user-agent":"octokit.js/16.43.1 Node.js/13.14.0 (Linux 5.4; x64)","authorization":"bearer [REDACTED]","content-type":"application/json; charset=utf-8"},"body":"{}","request":{"validate":{"commit_sha":{"alias":"ref","deprecated":true,"type":"string"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"alias":"ref","deprecated":true,"type":"string"}}}},"documentation_url":"https://docs.github.com/rest"}

        @openapi-sdkautomation
        Copy link

        openapi-sdkautomation bot commented Oct 5, 2020

        azure-sdk-for-python - Release

        ⚠️ warning [Logs] [Expand Details]
        • ⚠️ Generate from ed46144 with merge commit dd550d9. SDK Automation 13.0.17.20200918.2
          [azure-mgmt-workloadmonitor][ChangeLog] WARNING: Failed to generate ChangeLog.
        • ⚠️azure-mgmt-workloadmonitor [View full logs]  [Release SDK Changes]
          [build_conf] INFO:packaging_tools:Building template azure-mgmt-workloadmonitor
          [build_conf] INFO:packaging_tools.conf:Build default conf for azure-mgmt-workloadmonitor
          [build_conf] INFO:packaging_tools:Template done azure-mgmt-workloadmonitor
          [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
          [build_package]   warnings.warn(msg)
          [build_package] /z/venv/lib/python3.6/site-packages/setuptools/dist.py:406: UserWarning: The version specified ('2020-01-13-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.
          [build_package]   "details." % self.metadata.version
          [build_package] warning: no files found matching '*.py' under directory 'tests'
          [build_package] warning: no files found matching '*.yaml' under directory 'tests'
          [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
          [build_package]   warnings.warn(msg)
          [build_package] /z/venv/lib/python3.6/site-packages/setuptools/dist.py:406: UserWarning: The version specified ('2020-01-13-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.
          [build_package]   "details." % self.metadata.version
          [build_package] warning: no files found matching '*.py' under directory 'tests'
          [build_package] warning: no files found matching '*.yaml' under directory 'tests'
          Unable to get details about the head commit. This is probably because the head commit is in a fork that we don't have permission to read from. HttpError: Not Found {"name":"HttpError","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","connection":"close","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Tue, 06 Oct 2020 19:39:31 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","status":"404 Not Found","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; param=machine-man-preview; format=json","x-github-request-id":"06C2:0EDC:A7C2D:C65D2:5F7CC7F2","x-xss-protection":"1; mode=block"},"request":{"method":"POST","url":"https://api.github.com/app/installations//access_tokens","headers":{"accept":"application/vnd.github.machine-man-preview+json","user-agent":"octokit.js/16.43.1 Node.js/13.14.0 (Linux 5.4; x64)","authorization":"bearer [REDACTED]","content-type":"application/json; charset=utf-8"},"body":"{}","request":{"validate":{"commit_sha":{"alias":"ref","deprecated":true,"type":"string"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"alias":"ref","deprecated":true,"type":"string"}}}},"documentation_url":"https://docs.github.com/rest"}
          [breaking_change_setup] Ignoring mock: markers 'python_version <= "2.7"' don't match your environment
          Not exact 2 reports found:
          Not generating changelog.
          [ChangeLog] WARNING: Failed to generate ChangeLog.

        @openapi-sdkautomation
        Copy link

        openapi-sdkautomation bot commented Oct 5, 2020

        Trenton Generation - Release

        No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

        @openapi-sdkautomation
        Copy link

        openapi-sdkautomation bot commented Oct 5, 2020

        azure-resource-manager-schemas - Release

        ⚠️ warning [Logs] [Expand Details]
        • ⚠️ Generate from ed46144 with merge commit dd550d9. Schema Automation 13.0.17.20200918.2
          Failed to find any diff after autorest so no changed packages was found.

        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        @openapi-sdkautomation
        Copy link

        openapi-sdkautomation bot commented Oct 5, 2020

        azure-sdk-for-python-track2 - Release

        No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}": {
        "get": {
        "summary": "Get the current status of a monitor of a resource.",
        "operationId": "MonitorInfo_Get",
        Copy link
        Member

        Choose a reason for hiding this comment

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

        The OperationId is important in client generation, it uses the form _, where OperationGroup is used to group together operations over the same resource. In this case, the OperationGroup should likely be 'Monitors' to match the OperationGroup in the list operation above.

        Copy link
        Contributor Author

        Choose a reason for hiding this comment

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

        I updated the operation ids to be: Operations_List, Monitors_ListMonitors, Monitors_GetMonitor, MonitorHistory_ListStateChanges, MonitorHistory_GetStateChange. Are these okay? I guess in this case the operation groups would be 'operations' 'monitors' and 'monitorhistory' -- is this okay or are these meant to match something in the url?

        Copy link
        Member

        Choose a reason for hiding this comment

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

        Generally you don't want to repeat the operation group name in the operation name, so these should be:
        Operations_list
        Monitors_List

        I would also argu that you want to have ListStateChanges and GetStateChange as operations organized as monitor operations, i.e.:

        Monitors_ListStateChanges
        Monitors_GetStateChange

        When generating clients, this will organize these operations with the other monitor operations

        if not, then 'MonitorHistory' or 'MonitorStateChanges' should be an operations group, and this would give you:
        MonitorStateChanges_List
        MonitorStateChanges_Get

        "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history": {
        "get": {
        "summary": "Get history of a monitor of a resource (with optional filter).",
        "operationId": "MonitorStateChanges_List",
        Copy link
        Member

        Choose a reason for hiding this comment

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

        Likely this shoudkl be 'Monitors_ListStateChanges'

        Copy link
        Contributor Author

        Choose a reason for hiding this comment

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

        Changed to MonitorHistory_ListStateChanges?

        "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/monitors/{monitorId}/history/{timestampUnix}": {
        "get": {
        "summary": "Get the status of a monitor at a specific timestamp in history.",
        "operationId": "MonitorHistoricalStateChange_Get",
        Copy link
        Member

        Choose a reason for hiding this comment

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

        Likely this should be 'Monitors_GetStateChange'

        Copy link
        Contributor Author

        @juliaweingart juliaweingart Oct 5, 2020

        Choose a reason for hiding this comment

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

        Changed to MonitorHistory_GetStateChange

        "type": "string",
        "example": "Microsoft.WorkloadMonitor/monitors"
        },
        "properties": {
        Copy link
        Member

        Choose a reason for hiding this comment

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

        The suggested modelling of this is to have a specific schema definition that defines the properties property, rether than an inline definition. See: as an example: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/Microsoft.Compute/stable/2020-06-30/disk.json#L1538

        Copy link
        Contributor Author

        Choose a reason for hiding this comment

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

        I think I followed this example by defining an additional monitorProperties and a monitorStateChangeProperties

        }
        }
        },
        "Monitor": {
        Copy link
        Member

        Choose a reason for hiding this comment

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

        Copy link
        Contributor Author

        Choose a reason for hiding this comment

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

        Added an allOf encompassing the underlying MonitorResource - is this correct?

        @markcowl markcowl added the Reviewed-ChangesRequested <valid label in PR review process>add this label when assignee request changes after review label Oct 5, 2020
        @chiragg4u
        Copy link
        Contributor

        Reviewed the changes from previously approved PR #10817.
        Signing off from ARM side.

        @chiragg4u chiragg4u added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Oct 5, 2020
        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        }
        ]
        },
        "MonitorResource": {
        Copy link
        Member

        Choose a reason for hiding this comment

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

        You should just call this Resource, otherwise, this looks correct.

        @azure-pipelines
        Copy link

        Azure Pipelines successfully started running 1 pipeline(s).

        @markcowl markcowl merged commit dd550d9 into Azure:master Oct 6, 2020
        @markcowl markcowl mentioned this pull request Oct 6, 2020
        10 tasks
        Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

        Labels

        ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Reviewed-ChangesRequested <valid label in PR review process>add this label when assignee request changes after review

        Projects

        None yet

        Development

        Successfully merging this pull request may close these issues.

        3 participants