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

[Purview - PDS] - 2021-01-01-preview

Open pansharm-ms opened this issue 3 years ago • 10 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?
    • [x] 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 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.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.
    • [x] 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 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
  • [ ] 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.

fix https://github.com/Azure/azure-rest-api-specs/issues/19479

pansharm-ms avatar Aug 07 '22 22:08 pansharm-ms

Hi, @pansharm-ms 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 succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 11 Warnings warning [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    package-2022-11-01-preview package-2022-11-01-preview(adc96fe) default(main)

    [must fix]The following errors/warnings are introduced by current PR:

    Rule Message Related RPC [For API reviewers]
    :warning: EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L27
    :warning: ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L44
    :warning: PaginationResponse Response body schema of pageable response should contain top-level array property value
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L93
    :warning: ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L97
    :warning: PageableOperation Based on the response model schema, operation 'PolicyEvents_List' might be pageable. Consider adding the x-ms-pageable extension.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L116
    :warning: PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L116
    :warning: ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L154
    :warning: AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L200
    :warning: EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L397
    :warning: EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L407
    :warning: EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Azure.Analytics.Purview.PDS/preview/2022-11-01-preview/pds.json#L411
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️~[Staging] SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️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.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    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-track2 failed [Detail]
    • Failed [Logs]Release - Generate from 89a1da5c735d5ef2107488fb5291dc3947cd7f79. SDK Automation 14.0.0
      Only show 24 items here, please refer to log for details.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m 615 | [0m         [96mGeneratePackage -projectFolder $projectFolder -sdkRootPath $s[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m     | [91m         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91m[96m     | [91mFailed to packe sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91mGet-ChildItem: [0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:702
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m 702 | [0m … rtifacts += [96mGet-ChildItem $artifactsPath -Filter *.nupkg -exclude *.s[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m     | [91m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91m[96m     | [91mCannot find path
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m     | [91m'/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/packages/Debug/' because it does not exist.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91mGeneratePackage: [0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:615
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m 615 | [0m         [96mGeneratePackage -projectFolder $projectFolder -sdkRootPath $s[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m     | [91m         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91m[96m     | [91mFailed to generate sdk artifact
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91mGeneratePackage: [0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:615
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m 615 | [0m         [96mGeneratePackage -projectFolder $projectFolder -sdkRootPath $s[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [96m     | [91m         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [91m[96m     | [91mFailed to build sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
    • Azure.Analytics.Purview.Account [View full logs]  [Release SDK Changes]
      info	[Changelog]
    • Azure.Analytics.Purview.Administration [View full logs]  [Release SDK Changes]
      info	[Changelog]
    • Azure.Analytics.Purview.Catalog [View full logs]  [Release SDK Changes]
      info	[Changelog]
    • Azure.Analytics.Purview.Scanning [View full logs]  [Release SDK Changes]
      info	[Changelog]
    • Azure.Analytics.Purview.Share [View full logs]  [Release SDK Changes]
      info	[Changelog]
    Posted by Swagger Pipeline | How to fix these errors?

    Generated ApiView

    Language Package Name ApiView Link
    swagger Azure.Analytics Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.

    Generated ApiView

    Language Package Name ApiView Link .Net Azure.Analytics.Purview.Share Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI. If issue still exists, please ask PR assignee for help

    As the folder structure of purview hasn't been changed to one readme: one sdk, please ignore the error in creating apiview or .net sdk pipeline because we don't support this kind of folder structure.

    dw511214992 avatar Aug 08 '22 02:08 dw511214992

    Hi, @pansharm-ms. 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 28 '22 16:08 ghost

    Hi, @pansharm-ms. The PR will be closed since the PR has no update for 28 days. If you still need the PR review to proceed, please reopen it and @ mention PR assignee.

    ghost avatar Sep 12 '22 05:09 ghost

    Reopening the pull request as the review is going on for these APIs. Today is the API review meeting.

    pansharm-ms avatar Sep 12 '22 05:09 pansharm-ms

    @pansharm-ms In our initial API review meeting in July we discussed reorganizing this API to put the actual resource name first. In this version I think that makes even more sense. It looks to me like there are three basic "resources":

    • DatasourcePreferences
    • PolicyElements
    • PolicyEvents

    I think it would make much more sense for this service to simply have 3 operations -- rather than 9 -- one for each of the resources, with query parameters to filter the response to a particular subscription, resourceGroup, or resourceProvider/resourceType/resourceName.

    Did you explore this? Is there some benefit to the current path structure that outweighs the simpler design above?

    mikekistler avatar Oct 07 '22 16:10 mikekistler

    GET /subscriptions/{subscriptionId}/datasourcepreferences

    • This URL implies that a collection should be returned from this GET operation because datasourcepreferences is a collection but the response doesn't indicate a collection; it indicates a single item. This comment applies to other URLs too.
    • Many response property names are exteremely vague; such as value, metadata, dug? - can/should you do better here?
    • Do not put specific error reponse codes in swagger; just have the default Azure error response. This comment applies to all your operations

    GET /subscriptions/{subscriptionId}/policyelements

    • Azure uses filter (without the $) - this is in our guidelines.
    • Azure usually dos NOT include a count property in a collection response
    • This GET/URL does return a collection (which is good) but Azure uses "value" (not "elements") for the property name - this is in our guidelines.
    • What is the syncToken about? This doesn't seem right not me. Also, your documentation for it is terrible. In general, your documentation is not very good at all.

    GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/policyevents

    • How would this ever return a 304-Not Modified? There is no mention of etags anywhere

    JeffreyRichter avatar Oct 07 '22 16:10 JeffreyRichter

    Hi, @pansharm-ms. 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 Nov 06 '22 16:11 ghost

    Hi, @pansharm-ms, For review efficiency consideration, when creating a new api version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Or you could onboard API spec pipeline

    Hi @pansharm-ms, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    Hi, @pansharm-ms. 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 Dec 04 '22 16:12 ghost