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 Custom Voice API to a new version (2024-02-01-preview). #27515

Merged
merged 6 commits into from
Mar 27, 2024

Conversation

ForrestGumb
Copy link
Member

Data Plane API - Pull Request

Update Custom Voice API to a new version (2024-02-01-preview).
Compare with previous version (2023-12-01-preview), only one change. Added failureReason property in Consent.

I missed failure reason in initial version.
Create consent is a long-running-operation. When it fails, customer need a way to know the failure reason.
It should return failure reason in the same way as Model and PersonalVoice.
So, I added failureReason in Consent.properties follow the same patter as Model and PersonalVoice.

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

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
Swagger-Suppression-Process
to get approval.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

Checks stuck in `queued` state? 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.

Compare to previous version (2023-12-01-preview), only one change. Added failureReason property in Consent.
Copy link

openapi-pipeline-app bot commented Jan 24, 2024

Next Steps to Merge

Important checks have failed. As of today they are not blocking this PR, but in near future they will.
Addressing the following failures is highly recommended:
  • ⚠️ The check named TypeSpec Requirement has failed. TypeSpec usage is required for all new (greenfield) services. This is currently enforced as a warning, but will be made a blocking error in the near future. For information on converting from OpenAPI specs to TypeSpec specs or on data-plane (DP) policies, refer to aka.ms/azsdk/typespec. If you have general questions on resource provider (RP) policies, refer to aka.ms/rphelp.
If you still want to proceed merging this PR without addressing the above failures, refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM).

Copy link

openapi-pipeline-app bot commented Jan 24, 2024

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] The following breaking changes are detected by comparison with the latest preview version:
Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/ccced3e4750f79be55bcc62100ceb6b7756864d0/specification/cognitiveservices/data-plane/Speech/TextToSpeech/preview/2024-02-01-preview/texttospeech.json",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/Speech/TextToSpeech/preview/2023-12-01-preview/texttospeech.json",
"details":"Breaking change detector (OAD) invoked AutoRest. AutoRest threw a runtime error. First 6 lines of stack trace follow,
indexed. First line should contain AutoRest command line invocation details. Second line should contain the main message reported by AutoRest.
====================
1: Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.90/common/temp/node_modules/.pnpm/@Azure[email protected]/node_modules/autorest/dist/app.js" --v2 --input-file=/mnt/vss/_work/1/cross-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/data-plane/Speech/TextToSpeech/preview/2023-12-01-preview/texttospeech.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/tmp
--------------------
2: ERROR: Schema violation: No enum match for: operation-location
--------------------
3: - file:///mnt/vss/_work/1/cross-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/data-plane/Speech/TextToSpeech/preview/2023-12-01-preview/texttospeech.json:1552:10 ($.paths["/personalvoices/id"].post["x-ms-long-running-operation-options"]["final-state-via"])
--------------------
4: ERROR: Schema violation: No enum match for: operation-location
--------------------
5: - file:///mnt/vss/_work/1/cross-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/data-plane/Speech/TextToSpeech/preview/2023-12-01-preview/texttospeech.json:1238:10 ($.paths["/endpoints/id:suspend"].post["x-ms-long-running-operation-options"]["final-state-via"])
--------------------
6: ERROR: Schema violation: No enum match for: operation-location
--------------------"
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌LintDiff: 0 Errors, 0 Warnings failed [Detail]
Compared specs (v2.2.0) new version base version
release_2024_02_01_preview release_2024_02_01_preview(ccced3e) default(main)

The following errors/warnings exist before current PR submission:

Rule Message
⚠️ 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: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L125
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L270
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L446
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L456
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L462
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L468
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L475
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L482
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L489
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L496
⚠️ Post201Response Using post for a create operation is discouraged.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L504
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1136
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1179
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1225
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1280
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1294
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1343
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1357
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1506
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1682
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1688
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1694
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1704
⚠️ Formdata Check for appropriate use of formData parameters.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1710
⚠️ Post201Response Using post for a create operation is discouraged.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1718
⚠️ PropertyDescription Property should have a description.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1850
⚠️ PropertyDescription Property should have a description.
Location: TextToSpeech/preview/2024-02-01-preview/texttospeech.json#L1854
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView 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.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

Copy link

openapi-pipeline-app bot commented Jan 24, 2024

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
Posted by Swagger Pipeline | How to fix these errors?

Copy link

openapi-pipeline-app bot commented Jan 24, 2024

Generated ApiView

Language Package Name ApiView Link
Swagger Speech https://apiview.dev/Assemblies/Review/f258150b106442c1870f6c0d10e726e3?revisionId=c9f2c6037a004907a2ecf714060537f6

Copy link

Hi @ForrestGumb! 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.

@mikekistler
Copy link
Member

Approving breaking changes because the breaking change check failed with a runtime exception. Manual inspection of the diff shows no breaking changes.

@mikekistler mikekistler added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Jan 24, 2024
@konrad-jamrozik konrad-jamrozik added Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 and removed Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 labels Jan 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label Feb 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed no-recent-activity There has been no recent activity on this issue. labels Mar 14, 2024
Comment on lines +1717 to +1719
"properties": {
"$ref": "#/definitions/ConsentProperties"
},
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 reason for nesting the failureReason within properties? Levels of nesting should be avoided unless there is good reason for them, and particularly when the nested object contains only one property (as is the case 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.

No strong reason.
In Custom Voice schema definition, we put shared properties (like id, name, description, status, createdDateTime) in top level, and put type specific properties under ‘properties’. Properties under ‘properties’ are optional.
It’s too late to move them up. Other object type (Endpoint, Model, TrainingSet, PersonalVoice) already followed this design.

Copy link
Member

Choose a reason for hiding this comment

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

Properties that are nested for no good reason are a poor user experience. I'll approve for this preview but please fix this for your next preview.

@weidongxu-microsoft
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Mar 18, 2024

There is some warning in LintDiff

  1. we'd prefer service support x-ms-error-code before GA
  2. request with multipart/form-data should be used with caution

Copy link
Member

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good for preview. 👍

@mikekistler mikekistler added the APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. label Mar 18, 2024
Jun-wei Gan and others added 2 commits March 21, 2024 20:36
1. Remove 'None' from modelFailureReason and consentFailureReason.
2. Add x-ms-error-code in header
@ForrestGumb
Copy link
Member Author

There is some warning in LintDiff

  1. we'd prefer service support x-ms-error-code before GA
  2. request with multipart/form-data should be used with caution
  1. Updated swagger to support x-ms-error-code.
  2. I'm aware that multipart/form-data is not recommended. So, our API followed standard, use PUT to create with Azure blob URL as audio input. But for Consent and PersonalVoice, a common scenario is creation with small data. We removed dependency on Azure Blob API, supported additional POST create API with multipart/form-data input. This is reviewed with Mike Kistler and Jeffrey Richter.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Mar 22, 2024

Operation response '/responses/ErrorResponse' produces type couldn't be resolved

in LintDiff appears to be a false alert.

@weidongxu-microsoft weidongxu-microsoft merged commit 201904d into Azure:main Mar 27, 2024
30 of 32 checks passed
vxfield pushed a commit that referenced this pull request Mar 28, 2024
* Update Custom Voice API to a new version (2024-02-01-preview).
Compare to previous version (2023-12-01-preview), only one change. Added failureReason property in Consent.

* Fix LintDiff error on CustomVoice API by adding produces on delete method.

* Update Custom Voice API according to review feedback.
1. Remove 'None' from modelFailureReason and consentFailureReason.
2. Add x-ms-error-code in header

* Response shared "reponses" because LintDiff will report error on that.

* Fix markdown grammar in description.

---------

Co-authored-by: Jun-wei Gan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 Approved-LintDiff CI-MissingBaseCommit data-plane new-api-version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants