Skip to content

Conversation

mcgallan
Copy link
Member

@mcgallan mcgallan commented Apr 29, 2025

This PR migrates your latest version (identified by the tag in your readme.md) of swagger to TypeSpec. We already tried our best to make sure the TypeSpec represents same as previous swagger. Since we lack the business knowledge, please validate this PR again to make sure it's functional equivalent as before. The local validation step is at Getting started | TypeSpec Azure

Besides, TypeSpec encourages to follow ARM guidelines. Therefore, some representations in your previous swagger will be fixed to follow these guidelines. When you see differences in your local validation, please keep this note in mind. Here is the list you need to pay attention to:

  • You have several models extending from multiple base models: CreateOrUpdateDryrunParameters, ServicePrincipalSecretAuthInfo, SystemAssignedIdentityAuthInfo, UserAssignedIdentityAuthInfo

Please reach out to TypeSpec Discussions Channel if there is any help needed.

Copy link

openapi-pipeline-app bot commented Apr 29, 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 is not ready for ARM review (label: NotReadyForARMReview). This PR will not be reviewed by ARM until relevant problems are fixed. Consult the rest of this Next Steps to Merge comment for details.
    Once the blocking problems are addressed, add to the PR a comment with contents /azp run. Automation will re-evaluate this PR and if everything looks good, it will add WaitForARMFeedback label which will put this PR on the ARM review queue.
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ This PR is NotReadyForARMReview because it has the VersioningReviewRequired label.
  • ❌ This PR has at least one change violating Azure versioning policy (label: VersioningReviewRequired).
    To unblock this PR, either a) introduce a new API version with these changes instead of modifying an existing API version, or b) follow the process at aka.ms/brch.

Copy link

openapi-pipeline-app bot commented Apr 29, 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 29, 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.ServiceLinker
TypeSpec Microsoft.ServiceLinker
Java com.azure.resourcemanager:azure-resourcemanager-servicelinker
Go sdk/resourcemanager/servicelinker/armservicelinker

@AzureRestAPISpecReview AzureRestAPISpecReview added the VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required label May 21, 2025
* True if connect via Kubernetes CSI Driver.
*/
#suppress "@azure-tools/typespec-azure-core/no-nullable" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
connectAsKubernetesCsiDriver?: boolean | null;
Copy link
Member

Choose a reason for hiding this comment

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

@MaryGao Do we accept the change here?
image

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

After you have a clear discussion result, I hope you can reply under this comment to help me fix the issues in the tsp in a timely manner.

Copy link
Member Author

Choose a reason for hiding this comment

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

@v-jiaodi I see in the discussion of another issue that this change seems to have already been accepted. Do you agree that we can close this comment now?

@tadelesh
Copy link
Member

Connector's subscriptionId parameter should be in method level. TCGC issue here: Azure/typespec-azure#2682

@tadelesh
Copy link
Member

Another issue in this service: duplicate enum problem: Azure/typespec-azure#3050

Copy link
Member

@catalinaperalta catalinaperalta left a comment

Choose a reason for hiding this comment

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

Some comments to improve the spec and tooling. cc @pshao25

Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we use the same casing for all .tsp file names in the project directory?

Copy link
Member

Choose a reason for hiding this comment

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

The same casing you mean "DryRunResource"? We honored what service defined here.

{
...ApiVersionParameter,

#suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

Nit: since this looks pretty standard we should add docs for it

Copy link
Member

Choose a reason for hiding this comment

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

There's an instance below where we did add docs for the same param, why didnt we do the same here?

Copy link
Member Author

Choose a reason for hiding this comment

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

docs added and suppression has been removed

Copy link
Member

@pshao25 pshao25 Aug 26, 2025

Choose a reason for hiding this comment

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

@mcgallan These operations seem to be extension resource operations. Please check and do the corresponding fixes.

Copy link
Member Author

Choose a reason for hiding this comment

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

As we discussed in the meeting, the current TypeSpec handling of resourceUri seems to be somewhat tricky and may require waiting for a new solution

Copy link
Member Author

Choose a reason for hiding this comment

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

These operations have been updated to ExtensionResource.

/**
* add a dryrun job to do necessary check before actual creation
*/
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

Is this an lro? And if so, how does it perform polling?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, LRO! I didn't get your question actually. How service perform polling? I feel like it's not a question to me.

* Delete a Connector.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

Why are we getting this linter warning with this template? I dont see it modifying the response code. If this is non-standard behavior that is purposefully added for legacy reasons, seems like the suppression should be on the template itself instead of making every user of this template add suppressions for it

Copy link
Member

Choose a reason for hiding this comment

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

It does. The Response is already customzied.

/**
* Delete a Connector.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

Why is the location header missing? What is the polling method for this operation? Will downstream client libraries know how to perform polling with this spec?

Copy link
Member

Choose a reason for hiding this comment

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

I've no ideas what the polling operation is. I just honored what swagger defined. There is no place in swagger could identify a polling operation.

*/
union TargetServiceType {
string,
#suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
Copy link
Member

Choose a reason for hiding this comment

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

For enum values that dont have documentation, can our tooling just output the name of the value as docs?

Copy link
Member

Choose a reason for hiding this comment

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

A small fix like that in our tooling would greatly improve this output and reduce the number of suppressions in the specs

Copy link
Member

Choose a reason for hiding this comment

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

We can add ducoment for enum values by its enum value.

Copy link
Member

Choose a reason for hiding this comment

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

The documentation suppressions add a lot of noise in this file

/**
* List the dapr configuration supported by Service Connector.
*/
@route("/{+resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations")
Copy link
Member

Choose a reason for hiding this comment

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

What is the +resourceUri doing?

Copy link
Member

@pshao25 pshao25 Aug 4, 2025

Choose a reason for hiding this comment

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

The scope parameter for an extension operation should be allowReserved.

* OData skipToken option for pagination.
*/
@query("$skipToken")
$skipToken?: string;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: sinc eyou already have the proper name in the query decorator you can improve the tsp name

Suggested change
$skipToken?: string;
skipToken?: string;

Copy link
Member

Choose a reason for hiding this comment

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

If we have tooling doing this, it would be worth a look at improving this

Copy link
Member

@pshao25 pshao25 Aug 20, 2025

Choose a reason for hiding this comment

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

  1. This would introduce swagger diff, which is a cost for us to do the comparison.
  2. I need to evaluate the impact to SDK.
  3. I need to do some investigation why there is a $.

Copy link

github-actions bot commented Aug 21, 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 is not ready for ARM review (label: NotReadyForARMReview). This PR will not be reviewed by ARM until relevant problems are fixed. Consult the rest of this Next Steps to Merge comment for details.
    Once the blocking problems are addressed, add to the PR a comment with contents /azp run. Automation will re-evaluate this PR and if everything looks good, it will add WaitForARMFeedback label which will put this PR on the ARM review queue.
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ This PR is NotReadyForARMReview because it has the VersioningReviewRequired label.
  • ❌ This PR has at least one change violating Azure versioning policy (label: VersioningReviewRequired).
    To unblock this PR, either a) introduce a new API version with these changes instead of modifying an existing API version, or b) follow the process at aka.ms/brch.
  • ❌ The required check named TypeSpec Validation 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


Comment generated by summarize-checks workflow run.

@mcgallan
Copy link
Member Author

Another issue in this service: duplicate enum problem: Azure/typespec-azure#3050

I see that in this PR you have already used clientLocation to fix this issue. Is this a widely accepted way to fix it? Because this kind of problem also occurs in other swagger projects, perhaps this approach can be used to solve these problems.

@microsoft-github-policy-service microsoft-github-policy-service bot added no-recent-activity There has been no recent activity on this issue. and removed no-recent-activity There has been no recent activity on this issue. labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMReview NotReadyForARMReview resource-manager RPaaS rpaas-tsp-conversion TypeSpec Authored with TypeSpec typespec-conversion-w2 VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants