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

Dataplane policy states and events API swagger #8562

Merged
merged 16 commits into from
Apr 7, 2020
Merged

Dataplane policy states and events API swagger #8562

merged 16 commits into from
Apr 7, 2020

Conversation

NarineM
Copy link
Contributor

@NarineM NarineM commented Feb 28, 2020

Latest improvements:

Added data plane events and states API under version 2019-10-01. Added samples.

@pilor

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 28, 2020

azure-sdk-for-net

️✔️ succeeded [Logs] [Expand Details]

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 28, 2020

azure-sdk-for-js

️✔️ succeeded [Logs] [Expand Details]
  • ️✔️ Generate from 4996fbd with merge commit 55b21727f58d451f2d033ad23448d7838cef50c7. SDK Automation 13.0.17.20200326.3
  • ️✔️@azure/arm-policyinsights [Logs]  [Preview SDK Changes]
    [npmPack] npm WARN lifecycle @azure/arm-policyinsights@3.2.0~prepack: cannot run in wd @azure/arm-policyinsights@3.2.0 npm install && npm run build (wd=/z/work/azure-sdk-for-js/sdk/policyinsights/arm-policyinsights)

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 28, 2020

azure-sdk-for-python

️✔️ succeeded [Logs] [Expand Details]
  • ️✔️ Generate from 4996fbd with merge commit 55b21727f58d451f2d033ad23448d7838cef50c7. SDK Automation 13.0.17.20200326.3
  • ️✔️azure-mgmt-policyinsights [Logs]  [Preview SDK Changes]
    [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] 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] warning: no files found matching '*.py' under directory 'tests'
    [build_package] warning: no files found matching '*.yaml' under directory 'tests'
    [breaking_change_setup] Ignoring mock: markers 'python_version <= "2.7"' don't match your environment
    [breaking_change_setup] Cannot uninstall requirement azure-nspkg, not installed
    [breaking_change_setup] Command '['/usr/local/bin/python', '-m', 'pip', 'uninstall', '-y', 'azure-nspkg']' returned non-zero exit status 1.
    [ChangeLog] Size of delta 4.557% size of original (original: 45890 chars, delta: 2091 chars)
    [ChangeLog] **Features**
    [ChangeLog] 
    [ChangeLog]   - Model PolicyEvent has a new parameter compliance_state
    [ChangeLog]   - Model PolicyEvent has a new parameter components
    [ChangeLog]   - Model PolicyState has a new parameter components

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Feb 28, 2020

azure-sdk-for-java

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from 4996fbd with merge commit 55b21727f58d451f2d033ad23448d7838cef50c7. SDK Automation 13.0.17.20200326.3
  • ️✔️sdk/policyinsights/mgmt-v2018_04_04 [Logs]  [Preview SDK Changes]
  • ⚠️sdk/policyinsights/mgmt-v2018_07_01_preview [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-policyinsights: MavenReportException: Error while creating archive: 
      [mvn] [ERROR] Exit code: 1 - /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/Remediation.java:94: error: '{' expected
      [mvn] [ERROR]         interface WithMicrosoft.PolicyInsight {
      [mvn] [ERROR]                                ^
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/Remediation.java:100: error: = expected
      [mvn] [ERROR]             WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
      [mvn] [ERROR]                                             ^
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/Remediation.java:100: error:  expected
      [mvn] [ERROR]             WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
      [mvn] [ERROR]                                                           ^
      [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/policyinsights/mgmt-v2018_07_01_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
    • ⚠️sdk/policyinsights/mgmt-v2019_10_01 [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-policyinsights: MavenReportException: Error while creating archive: 
        [mvn] [ERROR] Exit code: 1 - /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/policyinsights/v2019_10_01/Remediation.java:99: error: '{' expected
        [mvn] [ERROR]         interface WithMicrosoft.PolicyInsight {
        [mvn] [ERROR]                                ^
        [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/policyinsights/v2019_10_01/Remediation.java:105: error: = expected
        [mvn] [ERROR]             WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
        [mvn] [ERROR]                                             ^
        [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/policyinsights/mgmt-v2019_10_01/src/main/java/com/microsoft/azure/management/policyinsights/v2019_10_01/Remediation.java:105: error:  expected
        [mvn] [ERROR]             WithCreate withExistingMicrosoft.PolicyInsight(String managementGroupId);
        [mvn] [ERROR]                                                           ^
        [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/policyinsights/mgmt-v2019_10_01/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 Feb 28, 2020

      azure-sdk-for-go

      ⚠️ warning [Logs] [Expand Details]
      • ⚠️ Generate from 4996fbd with merge commit 55b21727f58d451f2d033ad23448d7838cef50c7. SDK Automation 13.0.17.20200326.3
      • ⚠️policyinsights/mgmt/2018-04-04 [Logs
          No file is changed.
        • ️✔️policyinsights/mgmt/2019-10-01 [Logs]  [Preview SDK Changes]
        • ⚠️preview/policyinsights/mgmt/2018-07-01-preview [Logs
            No file is changed.

          @azuresdkci
          Copy link
          Contributor

          Can one of the admins verify this patch?

          Fix model validator errors
          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 1 pipeline(s).

          Remove aggrigate data plane events and states examples from swagger
          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 1 pipeline(s).

          1 similar comment
          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 1 pipeline(s).

          @ArcturusZhang ArcturusZhang added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Mar 2, 2020
          @ravbhatnagar
          Copy link
          Contributor

          @NarineM - can you please set something up with armapireview to go over this? It will be much quicker in person since this is a new type.

          @ravbhatnagar ravbhatnagar added ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReviewMeetingRequired and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Mar 3, 2020
          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 18, 2020

          @pilor Just pushed a new iteration that addresses your comments. I can see this warning from cli-extension, do you know what it complains about?:
          "azure-cli-extensions
          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 "

          @pilor
          Copy link
          Contributor

          pilor commented Mar 18, 2020

          @pilor Just pushed a new iteration that addresses your comments. I can see this warning from cli-extension, do you know what it complains about?:
          "azure-cli-extensions
          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 "

          No, I don't know the specifics on that but I have seen it on my own PRs which went through just fine. The SDK reviewer is a better contact.

          SDK automation is throwing an error if the parameter descriptions for $expand do not match across PolicyStates and PolicyEvents API.
          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 1 pipeline(s).

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 19, 2020

          @raych1 Can you help with this new error from SDK automation log?, it says branch changes need to be squished. Looks like something with the tool. Now this issue impacts all language SDK.

          @raych1
          Copy link
          Member

          raych1 commented Mar 20, 2020

          @NullMDR , can you help with the SDK automation failures?

          @PhoenixHe-NV
          Copy link
          Contributor

          /azp run

          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 3 pipeline(s).

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 25, 2020

          @raych1 thanks. So far all PR merge validation issues have been resolved except prettier check. This PR can be merged unless you tell me the prettier check issue is blocking. As of now I can not figure out why the tool is not running or what it complains about. The log says something with formatting, but can not figure out. can you run prettier on your local box for any of the files it complains about and let me know what is the issue? Here is the log that has file names that failed in prettier checks: https://dev.azure.com/azure-sdk/public/_build/results?buildId=326037&view=logs&j=b56e9678-4dad-5642-289c-5530cc4dad11&t=9e18c5d1-dc43-58a1-0344-6ef37d05bd7f&l=65

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 25, 2020

          Please go ahead with merging this PR when you get a chance if you do not find anything with prettier check.

          @raych1
          Copy link
          Member

          raych1 commented Mar 25, 2020

          @NarineM, prettierCheck is required to pass. @NullMDR , can you help Narine, he failed to run prettier?

          @PhoenixHe-NV PhoenixHe-NV self-requested a review March 25, 2020 04:52
          @azure-pipelines
          Copy link

          Pull request contains merge conflicts.

          @PhoenixHe-NV
          Copy link
          Contributor

          @NarineM I've fixed your prettier failure by running
          npm run prettier -- --write "specification/policyinsights/**/*.json"
          But please fix the merge conflict.

          @azure-pipelines
          Copy link

          Pull request contains merge conflicts.

          1 similar comment
          @azure-pipelines
          Copy link

          Pull request contains merge conflicts.

          @azure-pipelines
          Copy link

          No commit pushedDate could be found for PR 8562 in repo Azure/azure-rest-api-specs

          @azure-pipelines
          Copy link

          Pull request contains merge conflicts.

          @azure-pipelines
          Copy link

          Azure Pipelines successfully started running 1 pipeline(s).

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 26, 2020

          @NullMDR, thank you. I have resolved merge conflicts. The only failure now remaining is related to api version (under breaking change category). As we discussed earlier this change needs to be published for the same api version 2019-10-01. Please go ahead with merging this PR.

          @PhoenixHe-NV
          Copy link
          Contributor

          PhoenixHe-NV commented Mar 27, 2020

          @jianyexi Why adding property in response will be considered as breaking change?

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Mar 27, 2020

          @NullMDR It is not breaking change because this property is only appended when the client specifies it in request URL with $expand clause. This functionality is available in the current version of API on the RP side, so it should be published under the same API version 2019-10-01 and not a new version.

          @NarineM
          Copy link
          Contributor Author

          NarineM commented Apr 1, 2020

          @NullMDR , can you go ahead with merging this PR? Let me know what is blocking if anything. thanks.

          @ArcturusZhang
          Copy link
          Member

          @NullMDR It is not breaking change because this property is only appended when the client specifies it in request URL with $expand clause. This functionality is available in the current version of API on the RP side, so it should be published under the same API version 2019-10-01 and not a new version.

          I think this is reasonable.

          Hi @akning-ms would you please have us merge this PR? This breaking change should be acceptable based on the author's comments

          @akning-ms akning-ms merged commit 41c4f56 into Azure:master Apr 7, 2020
          00Kai0 pushed a commit to 00Kai0/azure-rest-api-specs that referenced this pull request Oct 12, 2020
          * swagger documentation for data plane PolicyStates API
          
          * enable events api in 2019-10-01 api version
          
          * data plane events API and data plane states API fixes
          
          * Data plane sample fixes and resolving autorest tool compile errors
          
          Data plane sample fixes and resolving autorest tool compile errors
          
          * Added more examples for dp and minor fixes
          
          Added more examples for dp and minor fixes
          
          * Update api version in exisiting events API examples
          
          Update api version in exisiting events API examples to be 2019-10-01
          
          * Fix model validator errors
          
          Fix model validator errors
          
          * Remove aggrigate data plane events and states examples from swagger
          
          Remove aggrigate data plane events and states examples from swagger
          
          * Revert - Add back references to aggrigated component counts
          
          Revert - Add back references to aggrigated component counts
          
          * Added additional properties bag to data plane json object
          
          Added additional properties bag to data plane json object
          
          * Added policyEvents for 2019-10-01 in readme
          
          * fixed sample ref file path
          
          * Addressed PR review feedback
          
          Addressed PR review feedback
          
          * Fix SDK automation error
          
          SDK automation is throwing an error if the parameter descriptions for $expand do not match across PolicyStates and PolicyEvents API.
          
          * Fix prettier
          
          Co-authored-by: Phoenix He <tih@microsoft.com>
          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
          Projects
          None yet
          Development

          Successfully merging this pull request may close these issues.

          9 participants