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 common types with Operation + OperationListResult #11356

Merged
merged 8 commits into from
Oct 27, 2020

Conversation

TimLovellSmith
Copy link
Member

This is porting a change to common-types I had proposed but hadn't actually merged for an earlier preview API version for redisEnterprise. And then refactoring the existing 'redis' type to take advantage of it, and to make sure validations happen.

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

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

@TimLovellSmith TimLovellSmith requested a review from pilor October 23, 2020 18:35
@openapi-workflow-bot
Copy link

Hi, @TimLovellSmith 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. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Oct 23, 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 23, 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 23, 2020

    azure-resource-manager-schemas - 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 23, 2020

    azure-sdk-for-go - 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 23, 2020

    azure-sdk-for-java - 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 23, 2020

    azure-sdk-for-python - 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 23, 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 23, 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 23, 2020

    azure-sdk-for-net - 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 23, 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

    @TimLovellSmith
    Copy link
    Member Author

    TimLovellSmith commented Oct 23, 2020

    @pilor Looks like common-types v2 lacks these definitions too, should I add them there also?

    Edit: looks like we can't really 'refactor' redis without upsetting the linter due to a lot of 'breaking change' validations related to read-only, even though this has always really been a read-only API... plus the addition of a few new property definitions (but we don't really return them today).

    Maybe we should only do the change to depend on common-types in our future api versions? I can revert the redis part unless there's a fair way to suppress these.

    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'true' to 'false'.New: common-types/resource-management/v1/types.json#L407:9Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2605:9
    -- | --
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L362:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2587:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L347:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2575:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L357:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2579:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L352:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2583:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L362:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2587:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L334:9Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2568:9
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L352:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2583:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'true' to 'false'.New: common-types/resource-management/v1/types.json#L407:9Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2605:9
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L334:9Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2568:9
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L347:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2575:13
    ❌ 1029 - ReadonlyPropertyChanged | The read only property has changed from 'false' to 'true'.New: common-types/resource-management/v1/types.json#L357:13Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2579:13
    💬 1001 - NoVersionChange | The versions have not changed.New: Microsoft.Cache/stable/2020-06-01/redis.json#L1:1Old: Microsoft.Cache/stable/2020-06-01/redis.json#L1:1
    💬 1001 - NoVersionChange | The versions have not changed.New: common-types/resource-management/v1/types.json#L1:1Old: common-types/resource-management/v1/types.json#L1:1
    💬 1040 - AddedReadOnlyPropertyInResponse | The new version has a new read-only property 'actionType' in response that was not found in the old version.New: common-types/resource-management/v1/types.json#L333:7Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2567:7
    💬 1040 - AddedReadOnlyPropertyInResponse | The new version has a new read-only property 'isDataAction' in response that was not found in the old version.New: common-types/resource-management/v1/types.json#L333:7Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2567:7
    💬 1040 - AddedReadOnlyPropertyInResponse | The new version has a new read-only property 'origin' in response that was not found in the old version.New: common-types/resource-management/v1/types.json#L333:7Old: Microsoft.Cache/stable/2020-06-01/redis.json#L2567:7
    

    Copy link
    Contributor

    @pilor pilor left a comment

    Choose a reason for hiding this comment

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

    You could either also add it to v2 or ONLY add it to v2... up to you

    @pilor pilor added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Oct 23, 2020
    …ListResult." which the linter breaking change the detection wasn't a fan of.
    
    This reverts commit f8f696f.
    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @TimLovellSmith TimLovellSmith requested a review from pilor October 24, 2020 06:40
    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @pilor pilor added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Oct 26, 2020
    @TimLovellSmith
    Copy link
    Member Author

    @leni-msft May it be merged?

    @akning-ms akning-ms merged commit 84b2b02 into Azure:master Oct 27, 2020
    @TimLovellSmith
    Copy link
    Member Author

    @akning-ms @pilor Thank you for the merge and the review!
    We'll try to consume these new definitions in our ongoing PR here to make sure they work as intended: #11360

    giromm2ms pushed a commit to giromm2ms/azure-rest-api-specs that referenced this pull request Dec 20, 2020
    * Add titles and descriptions for 'commontypes/v1/Resource' common types.
    
    * Define the 'Operation' and 'OperationListResult' common types in common-types v1.
    
    * REFATOR: Update 'redis.json' to use common-types v1 OperationListResult.
    
    * Revert "REFATOR: Update 'redis.json' to use common-types v1 OperationListResult." which the linter breaking change the detection wasn't a fan of.
    
    This reverts commit f8f696f.
    
    * Improvements to descriptions, and 'readOnly' annotations on OperationListResult
    
    * Fix typo in the Resource description.
    
    * Also add the Operation definition to common-types' v2/types.json, along with most of the improvements to descriptions etc.
    
    * Revise descriptions with API consumers as intended audience.
    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.

    4 participants