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

add extension metadata V2 API and example #30656

Closed
wants to merge 26 commits into from
Closed

add extension metadata V2 API and example #30656

wants to merge 26 commits into from

Conversation

jiaqi-beep
Copy link
Member

@jiaqi-beep jiaqi-beep commented Sep 19, 2024

ARM (Control Plane) API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify:
    • edit this with your clarification

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

Ved Kale and others added 5 commits September 11, 2024 16:09
Copied the files in a separate commit.
This allows reviewers to easily diff subsequent changes against the previous spec.
Updated the API version from preview/2024-07-31-preview to preview/2024-09-10-preview.
Copy link

openapi-pipeline-app bot commented Sep 19, 2024

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR is labelled with ArcReview. For this PR to be merged, it must pass an ARC review and be labelled ArcSignedOff.
    Email the ARC board to request review per this Contact section.
  • ❌ The required check named Automated merging requirements met has failed. This is the final check that must pass. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide. In addition, refer to step 4 in the PR workflow diagram

Copy link

openapi-pipeline-app bot commented Sep 19, 2024

Generated ApiView

Language Package Name ApiView Link
Go sdk/resourcemanager/hybridcompute/armhybridcompute https://apiview.dev/Assemblies/Review/cc99eb4c91204d199d8e40aed71bc06e?revisionId=5b65495205c44f9f81cef09a0e5222a7
JavaScript @azure/arm-hybridcompute https://apiview.dev/Assemblies/Review/bd79793b6b53409d8de21847c605dc64?revisionId=e3397cae43fa4e38950388ed4d5dd81f
.Net Azure.ResourceManager.HybridCompute There is no API change compared with the previous version
Java azure-resourcemanager-hybridcompute https://apiview.dev/Assemblies/Review/b79886348ebe497b9ddc99d286cb6e99?revisionId=9cd67fa7e0cd4612aea17ac5e494bf3d
Swagger Microsoft.HybridCompute https://apiview.dev/Assemblies/Review/31dae74112a04fb7b3a4a58e2c398536?revisionId=b7de4f0577c14fedba4258ea28a66218

@jiaqi-beep jiaqi-beep marked this pull request as ready for review September 19, 2024 23:50
@AzureRestAPISpecReview AzureRestAPISpecReview added ARMReview resource-manager WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 19, 2024
@razvanbadea-msft
Copy link
Contributor

razvanbadea-msft commented Sep 20, 2024

Update the Purpose of this PR as this is a version update from what i see in file

@razvanbadea-msft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

"type": "array",
"readOnly": true,
"items": {
"type": "string"
Copy link
Contributor

@razvanbadea-msft razvanbadea-msft Sep 20, 2024

Choose a reason for hiding this comment

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

"type": "string"

this can also have url format #Resolved

@razvanbadea-msft
Copy link
Contributor

"/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}": {

should the newly added models v2 match with this sub level operations?


Refers to: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-09-10-preview/HybridCompute.json:1514 in 9f88be5. [](commit_id = 9f88be5, deletion_comment = False)

"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"name": "location",
Copy link
Contributor

@razvanbadea-msft razvanbadea-msft Sep 20, 2024

Choose a reason for hiding this comment

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

location

Why are you not using the locationParameter from common-types? #Resolved

This reverts commit 5e44134.
@ramoka178
Copy link
Contributor

If this API is not subscription scoped and yet gives a V2 kind of response for /subscription/{subscriptionId}/provider/location/publisher/extensionType/version" now, it is giving a sense that this API response is actually scope based.

Hi @ramoka178 - Irrespective of what the current API does (at Subscription scope level), the new API is designed to serve Provider artifacts. The API response properties will not contain any references to Subscription. Based on Customer and Partner feedback, we came up with the path at Provider level.

Please elaborate on this statement:

"If this API is not subscription scoped and yet gives a V2 kind of response for /subscription/{subscriptionId}/provider/location/publisher/extensionType/version" now, it is giving a sense that this API response is actually scope based."

Hi, I meant to say that, if the response is changing when the request starts with '/subscription/{subscriptionId}', this means it is specific to that scope , even if the 'provider/location/publisher/extensionType/version' is same.
Ideally responses should be same for an API path i.e., for 'provider/location/publisher/extensionType/version' and it should not be different based on the scope at which this is called.

@ramoka178 ramoka178 added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label Oct 24, 2024
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Oct 24, 2024
@raghushantha
Copy link
Contributor

@ramoka178 - What do you suggest for the API Path at the Provider level? Note that we would like the signature to be somewhat consistent with IaaS VMs (Compute RP)

@jiaqi-beep jiaqi-beep added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Oct 25, 2024
@ramoka178
Copy link
Contributor

raghushantha

@ramoka178 - What do you suggest for the API Path at the Provider level? Note that we would like the signature to be somewhat consistent with IaaS VMs (Compute RP)

Could you check the suggestion at #30656 (comment) . I am not sure what is the IaaS VMs APIs are though.
If this does not work, could you try scheduling a slot in Office hours or Modeling Office hours as per https://eng.ms/docs/products/arm/introduction/office_hours to discuss further ?

@ramoka178 ramoka178 removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Oct 25, 2024
* use v3 common-types

* prettier

* attempt v5 common types

* dummy change to trigger checks

* Revert "dummy change to trigger checks"

This reverts commit 9925d24.

* Revert "attempt v5 common types"

This reverts commit 4ed6fa4.

* update to v5

* update subscriptionid to guid format in examples

* fix examples in machines

* Revert "fix examples in machines"

This reverts commit cf84a91.

* fix model validation

* fix model validation

* prettier

* prettier

* prettier

* Revert "prettier"

This reverts commit ea820f1.

* Revert "prettier"

This reverts commit 68b5bb6.

* Revert "prettier"

This reverts commit e5065de.

* Revert "fix model validation"

This reverts commit 4b0723f.

* Revert "fix model validation"

This reverts commit 9ad91b4.

* Reapply "fix examples in machines"

This reverts commit 8f00a27.

* Revert "fix examples in machines"

This reverts commit cf84a91.

* Revert "update subscriptionid to guid format in examples"

This reverts commit 8f1af4d.

* Revert "update to v5"

This reverts commit e0083cf.

* Reapply "attempt v5 common types"

This reverts commit 3df6b50.

* Reapply "dummy change to trigger checks"

This reverts commit 0956f17.

* Revert "dummy change to trigger checks"

This reverts commit 9925d24.

* use v3 common type

* Update sdk-suppressions.yaml

---------

Co-authored-by: Jiaqi Li <[email protected]>
Co-authored-by: Yuchao Yan <[email protected]>
@raghushantha
Copy link
Contributor

@ramoka178 - If you are referring to "/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/aggregatedExtensionTypes/{extensionType}/versions", then the phrase 'aggregated' does not fit in the context as we serve a single Type or Collection, for a given Publisher. This is not consistent with the way Customers work with Extension Types in other APIs

We scheduled a API Modelling review in Nov to further discuss this topic. Thanks.

@jiaqi-beep
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jiaqi-beep jiaqi-beep added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Oct 29, 2024
@jiaqi-beep
Copy link
Member Author

Hi @ramoka178 , it would actually make more sense to keep the same API path starting at provider level, than introducing a new scope, since our new API functions as v2 of current API -- they perform same logical functions.

  • The new API has different response schema because we want to add additional properties to enrich the response.
  • We don't want to introduce new version on existing API, because we don't want the API tied to subscription id, since this API should not be subscription scoped.

So using the same provider/location/publisher/extensionType/version scope is logically correct, and it would be very confusing for users to have a separate API path for the same logical function.

Past reviewer rejected the API paths added in this PR given they have the same scope as existing API paths returning different response. But as explained here and previous discussion, our use case requires this design. Please review again if possible. We have scheduled API modeling office hour if in Nov if still needed by then.

@jiaqi-beep
Copy link
Member Author

image

@raosuhas raosuhas added Approved-Suppression ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review labels Nov 7, 2024
@openapi-pipeline-app openapi-pipeline-app bot added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review labels Nov 7, 2024
@raosuhas raosuhas removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Nov 8, 2024
Base automatically changed from release-hybridcompute-Microsoft.HybridCompute-2024-09-10-preview to main November 11, 2024 23:21
Copy link

PR validation pipeline can not start as the pull request is not merged or mergeable - most likely it has merge conflicts.

Copy link
Contributor

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label Dec 2, 2024
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved-Suppression ArcReview ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review no-recent-activity There has been no recent activity on this issue. resource-manager SuppressionReviewRequired
Projects
None yet
Development

Successfully merging this pull request may close these issues.