Skip to content

changing request byte from string and descoping submit endpoints #34293

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

hardikginwala
Copy link
Contributor

@hardikginwala hardikginwala commented Apr 28, 2025

ARM (Control Plane) API Specification Update Pull Request for Changing request to allow JSON objects and descoping submit endpoints.

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:

This API version is still under development and we not releasing this to customer, during our internal testing we found that we have to make these changes before we share this with customers.

API version 2025-05-01 is not used by any customer yet.

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.
  • A release plan has been created. If not, please create one as it will help guide you through the REST API and SDK creation process.

Additional information

Viewing API changes

removing submitCreate and submitDelete ,
for supporting our client needs we only need executeCreate and executeDelete endpoints.

we incorrectly specified type of baseProfile and resourceOverrides as string and array respectively, in our testing in canary we realized this isn't correct, we want to pass JSON object as input hence we are changing this to byte and array

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.

Copy link

openapi-pipeline-app bot commented Apr 28, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR is in purview of the ARM review (label: ARMReview). This PR must get ARMSignedOff label from an ARM reviewer.
    This PR has ARMChangesRequested label. Please address or respond to feedback from the ARM API reviewer.
    When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
    Automation should then add WaitForARMFeedback label.
    ❗If you don't have permissions to remove the label, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories.
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ The required check named Swagger LintDiff has failed. 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

Copy link

openapi-pipeline-app bot commented Apr 28, 2025

PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.

Copy link

github-actions bot commented Apr 28, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
Swagger Microsoft.ComputeSchedule
TypeSpec Microsoft.ComputeSchedule
Go sdk/resourcemanager/computeschedule/armcomputeschedule
Java com.azure.resourcemanager:azure-resourcemanager-computeschedule
JavaScript @azure/arm-computeschedule

@AzureRestAPISpecReview AzureRestAPISpecReview added the ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test label Apr 28, 2025
@hardikginwala hardikginwala marked this pull request as draft April 29, 2025 03:38
@hardikginwala hardikginwala changed the title descoping submit endpoints changing request byte from string and descoping submit endpoints May 13, 2025
@AzureRestAPISpecReview AzureRestAPISpecReview removed ARMReview ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test labels May 13, 2025
@hardikginwala hardikginwala marked this pull request as ready for review May 13, 2025 02:52
@hardikginwala hardikginwala added the Versioning-Approved-BugFix https://github.com/Azure/azure-sdk-tools/issues/6374 label May 13, 2025
@AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required and removed ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test labels May 14, 2025
@github-actions github-actions bot removed ARMAutoSignedOff ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review labels May 14, 2025
@AzureRestAPISpecReview AzureRestAPISpecReview added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 14, 2025
@hardikginwala
Copy link
Contributor Author

/azp run

Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@hardikginwala
Copy link
Contributor Author

@markcowl requesting suppression exception for swagger LintDiff since this is a valid usage for this endpoint on our service as discussed on teams chat

@TimLovellSmith
Copy link
Member

API version 2025-05-01 is not used by any customer yet.

Did it get consumed anywhere else though? You may need to follow up and ensure any inaccurate SDKs / docs are updated or removed!!

@doc("resourceOverrides, properties per resource that needs to be overwritted from baseProfile")
resourceOverrides?: Array<string>;
#suppress "@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers" "reviewed this with ARM, we are a pass through to compute RP and doing any property specific validation, compute RP will do that."
@doc("resourceOverrides, properties per resource that needs to be overwritten from baseProfile")
Copy link
Member

Choose a reason for hiding this comment

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

resourceOverrides

How are end users supposed to understand the valid property set / schema based on this doc or description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we had a API modeling session for this last month 04/03 at 12:30 EST, where we described use case for this API and necessity to go with schema free json approach here
this API is primarily targeted for 1P apps and RPs (like Fleet) that are today running into issues while creating single instance VMs through compute RP at scale, because of throttling and transient issues.
These services are going to leverage our RP as pass through, we are going to add value by offering scheduling and handling transient errors, end users will be passing VM profiles for which they want to create virtual machines.
Our service will merge Baseprofile with overrides for VM properties, and pass that merged profile to compute RP create VM endpoint, clients will pass their targeted API version and we will call compute RP for that version, so type checking against schema will be done by compute RP as they are doing today. End users who are creating just less than 1000 VMs won't typically be using this RP but even for them we will update RP documentation on learn.microsoft with examples on how to consume.
But our target audience for foreseeable future are 1P apps like CPC, devbox, AVD, RPs like Fleet and AKS, who are already doing this programmatically.

@@ -137,11 +137,13 @@ model Resources {
@added(Microsoft.ComputeSchedule.Versions.`2025-05-01`)
@doc("Resource creation data model")
model ResourceProvisionPayload {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "reviewed this with ARM, we are a pass through to compute RP and doing any property specific validation, compute RP will do that."
@doc("baseProfile, Resource properties that common across all resources ")
Copy link
Member

Choose a reason for hiding this comment

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

baseProfile

How are end users supposed to understand the valid property set / schema based on this doc or description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

we had a API modeling session for this last month 04/03 at 12:30 EST, where we described use case for this API and necessity to go with schema free json approach here
this API is primarily targeted for 1P apps and RPs (like Fleet) that are today running into issues while creating single instance VMs through compute RP at scale, because of throttling and transient issues.
These services are going to leverage our RP as pass through, we are going to add value by offering scheduling and handling transient errors, end users will be passing VM profiles for which they want to create virtual machines.
Our service will merge Baseprofile with overrides for VM properties, and pass that merged profile to compute RP create VM endpoint, clients will pass their targeted API version and we will call compute RP for that version, so type checking against schema will be done by compute RP as they are doing today. End users who are creating just less than 1000 VMs won't typically be using this RP but even for them we will update RP documentation on learn.microsoft with examples on how to consume.
But our target audience for foreseeable future are 1P apps like CPC, devbox, AVD, RPs like Fleet and AKS, who are already doing this programmatically.

Copy link
Member

Choose a reason for hiding this comment

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

As below

Sorry, what I mean is, is the description you are giving of your API, really going to be obvious enough to the API consumers, who are reading your doc?

@@ -137,11 +137,13 @@ model Resources {
@added(Microsoft.ComputeSchedule.Versions.`2025-05-01`)
@doc("Resource creation data model")
Copy link
Member

Choose a reason for hiding this comment

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

creation

How are end users supposed to understand the valid property set / schema based on this doc or description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

am open for updating description but I feel best way to address this will be with an example and documentation on learn.microsoft, our early adopters for this API are other Azure services and we have involved them early in design phase, so they are aware, and we have shared sample request/response objects with them.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, what I mean is, is the description you are giving of your API, really going to be obvious enough to the API consumers, who are reading your doc?

For suppressions, sure, ARM reviewers are a target audience.
But also the main target audience of these specs is supposed to be the consumers, and they need to have some signposts telling them what schema they are actually allowed to use here.

@@ -521,6 +488,9 @@ model ExecuteDeleteRequest {

@doc("Forced delete resource item")
forceDeletion?: boolean;

@doc("Microsoft.Compute API version to target when calling delete endpoint.")
armApiVersion?: string;
Copy link
Member

@TimLovellSmith TimLovellSmith May 14, 2025

Choose a reason for hiding this comment

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

armApiVersion

calling it an armApiVersion is very confusing. Can we call it a computeApiVersion or maybe deleteApiVersion instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed

"$ref": "./examples/Operations_List_MaximumSet_Gen.json"
},
"Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule": {
"Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule": {
Copy link
Member

Choose a reason for hiding this comment

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

"Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MinimumSet] rule

shouldn't we introduce friendly names for these?

@@ -71,10 +71,10 @@
}
},
"x-ms-examples": {
"Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule": {
"Operations_List_MaximumSet_Gen - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule - generated by [MaximumSet] rule": {
Copy link
Member

Choose a reason for hiding this comment

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

Operations_List_MaximumSet_Gen

shouldn't we introduce friendly names for these?

Copy link
Member

Choose a reason for hiding this comment

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

also why does it keep getting longer every time you generate it(?)

@hardikginwala
Copy link
Contributor Author

API version 2025-05-01 is not used by any customer yet.

Did it get consumed anywhere else though? You may need to follow up and ensure any inaccurate SDKs / docs are updated or removed!!

No, this is not consumed through any other means, because backend service for supporting this version isn't out yet, moreover we are primarily going to work on this with Fleet for (Databricks and Snowflake) and we are supposed to start onboarding these mid June.

@@ -15,7 +15,7 @@
"provider": "oxdxyfefyvtxexszpvt",
Copy link
Member

Choose a reason for hiding this comment

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

oxdxyfefyvtxexszpvt

please scrub your example quality!

remember these are part of your API documentation.

realistic examples make better docs!!

@TimLovellSmith TimLovellSmith added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 14, 2025
@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 May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReview BreakingChange-Approved-BugFix Changes are to correct the REST API definition to correctly describe service behavior BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required resource-manager RPaaS TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants