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

Adds errorCode and explanation; Replaces pagination with continuationToken #28061

Conversation

GrahamMThomas
Copy link
Member

Data Plane API - Pull Request

Previous spec was the proposed spec, during implementation, the team and I recognized a couple changes that are needed to the spec. No customers are currently using the existing spec so backwards compatibility is not an issue.

  1. ErrorCode and Explanation We've added an errorCode and explanation to jobs so customers can understand why they failed. Added it first the file level (incase a single file within a job fails) but also added it to the root job (incase there is a prerequisite issue, ex. cannot access customer blob storage). This pattern exist already for real-time, but job reports aren't error responses.

  2. Pagination with continuationToken Given we have a backend of cosmosDB, we believe it's much simpler for us and the user to utilize a nextLink containing the continuationToken as opposed to using the cumbersome top/skip pattern.

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.

@GrahamMThomas GrahamMThomas requested a review from a team as a code owner March 4, 2024 19:20
@GrahamMThomas GrahamMThomas requested review from vicancy and DominikMe and removed request for a team March 4, 2024 19:20
Copy link

openapi-pipeline-app bot commented Mar 4, 2024

Next Steps to Merge

✅ All automated merging requirements have been met! 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 Mar 4, 2024

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️⚠️LintDiff: 0 Warnings warning [Detail]
compared tags (via openapi-validator v2.2.0) new version base version
package-2024-01-31-preview package-2024-01-31-preview(837e8a1) package-2024-01-31-preview(release-healthdataaiservices-deidentification-2024-01-31-preview)

The following errors/warnings exist before current PR submission:

Rule Message
⚠️ PutRequestResponseScheme A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Jobs_Create' Request Model: 'parameters[3].schema' Response Model: 'responses[200].schema'
Location: HealthDataAIServices.Deidentification/preview/2024-01-31-preview/HealthDataAIServices.Deidentification.json#L213
⚠️ OperationId OperationId for put method should contain both 'Create' and 'Update'
Location: HealthDataAIServices.Deidentification/preview/2024-01-31-preview/HealthDataAIServices.Deidentification.json#L214
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️❌TypeSpecAPIView: 0 Errors, 1 Warnings failed [Detail]
Rule Message
⚠️ Failed to generate TypeSpec APIView. Please check the detail log and make sure TypeSpec compiler version is the latest. "How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR."
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️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 Mar 4, 2024

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking


️❌ azure-sdk-for-net-track2 failed [Detail]
  • Failed [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
    cmderr	[Invoke-GenerateAndBuildV2.ps1]
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice New minor version of npm available! 10.2.4 -> 10.5.0
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice Run `npm install -g npm@10.5.0` to update!
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:141�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1mLine |�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m 141 | �[0m               �[36;1mGeneratePackage `�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m     | �[31;1mFailed to build sdk. exit code: False�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:141�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1mLine |�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m 141 | �[0m               �[36;1mGeneratePackage `�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m     | �[31;1mFailed to packe sdk. exit code: False�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGet-ChildItem: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:807�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1mLine |�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m 807 | �[0m … rtifacts += �[36;1mGet-ChildItem $artifactsPath -Filter *.nupkg -exclude *.s�[0m …�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m     | �[31;1mCannot find path�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m�[31;1m�[36;1m     | �[31;1m'/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/packages/Debug/' because�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m�[31;1m�[36;1m�[31;1m�[36;1m     | �[31;1mit does not exist.�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:141�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1mLine |�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m 141 | �[0m               �[36;1mGeneratePackage `�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m     | �[31;1mFailed to generate sdk artifact�[0m
  • Azure.HealthDataAIServices.Deid [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️⚠️ azure-sdk-for-python-track2 warning [Detail]
  • ⚠️Warning [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    warn		specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml skipped due to azure-sdk-for-python-track2 not found in tspconfig.yaml
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    cmderr	[automation_generate.sh]
    cmderr	[automation_generate.sh] npm notice New minor version of npm available! 10.2.4 -> 10.5.0
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@10.5.0` to update!
    cmderr	[automation_generate.sh] npm notice
    warn	No file changes detected after generation
    warn	No package detected after generation
️❌ azure-sdk-for-java failed [Detail]
  • Failed [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 24.0
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 24.0
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] urrent
    cmderr	[init.sh]                                  Dload  Upload   Total   Spent    Left  Speed
    cmderr	[init.sh] 
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0 740k
    cmderr	[init.sh]  notice
    cmderr	[init.sh] npm notice New minor version of npm available! 10.2.4 -> 10.5.0
    cmderr	[init.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
    cmderr	[init.sh] npm notice Run `npm install -g npm@10.5.0` to update!
    cmderr	[init.sh] npm notice
    cmderr	[init.sh] Downloading https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz...
    cmderr	[init.sh] ################## 100.0%
    cmderr	[init.sh] Computing checksum with sha256sum
    cmderr	[init.sh] Checksums matched!
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    warn	No file changes detected after generation
    warn	No package detected after generation
  • azure-healthdataaiservices-deid [View full logs]  [Preview SDK Changes]
️⚠️ azure-sdk-for-js warning [Detail]
  • ⚠️Warning [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    warn	No file changes detected after generation
    warn	No package detected after generation
  • ️✔️@azure-rest/azure-healthdataaiservices-deid-rest [View full logs]  [Preview SDK Changes]
    info	[Changelog]
    error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
️⚠️ azure-powershell warning [Detail]
  • ⚠️Warning [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
    warn		specification/healthdataaiservices/HealthDataAIServices.Deidentification/tspconfig.yaml skipped due to azure-powershell not found in tspconfig.yaml
    command	pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
  • ⚠️Az.healthdataaiservices.DefaultTag [View full logs]  [Preview SDK Changes]
️⚠️ azure-sdk-for-python warning [Detail]
  • ⚠️Warning [Logs] Generate from a6098c3. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    warn		specification/healthdataaiservices/data-plane/HealthDataAIServices.Deidentification/readme.md skipped due to azure-sdk-for-python not found in swagger-to-sdk
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    cmderr	[automation_generate.sh]
    cmderr	[automation_generate.sh] npm notice New minor version of npm available! 10.2.4 -> 10.5.0
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@10.5.0` to update!
    cmderr	[automation_generate.sh] npm notice
  • ️✔️azure-healthdataaiservices-deid [View full logs]  [Preview SDK Changes]
    info	[Changelog] data-plan skip changelog generation temporarily
Posted by Swagger Pipeline | How to fix these errors?

Copy link

openapi-pipeline-app bot commented Mar 4, 2024

Generated ApiView

Language Package Name ApiView Link
Python azure-healthdataaiservices-deid https://apiview.dev/Assemblies/Review/fa813ec0815c4b559e6ba9eb78429cbf?revisionId=e1946c0c356b4074872283863cb77c1c
JavaScript @azure-rest/azure-healthdataaiservices-deid-rest https://apiview.dev/Assemblies/Review/e56a4110964344538b8751152dc7536e?revisionId=13cc5643aa074787888745af619d2658

@visibility("read")
errorCode?: string;

@doc("Error message for complete job failures.")
Copy link
Member

Choose a reason for hiding this comment

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

Is it only available when job fails?

There is a recommended error type as described here https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors, do you want to follow the same data structure?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahhhh great point, I figured that could only be used for error responses. I've updated the PR to use this for jobStatuses as well.

Also Yes, this field will only be available when the job has Failed.

@GrahamMThomas GrahamMThomas merged commit e64ac2b into Azure:release-healthdataaiservices-deidentification-2024-01-31-preview Mar 7, 2024
25 of 28 checks passed
GrahamMThomas added a commit to GrahamMThomas/azure-rest-api-specs that referenced this pull request May 2, 2024
…Token (Azure#28061)

* Adds errorCode and explanation; Replaces pagination with continuationToken

* Updates to use standard Azure Foundation Error

---------

Co-authored-by: Graham Thomas <gthomas@microsoft.com>
GrahamMThomas added a commit to GrahamMThomas/azure-rest-api-specs that referenced this pull request May 8, 2024
…Token (Azure#28061)

* Adds errorCode and explanation; Replaces pagination with continuationToken

* Updates to use standard Azure Foundation Error

---------

Co-authored-by: Graham Thomas <gthomas@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-plane TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants