Skip to content

Add the missing description to summarization parameter #20809

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

Merged
merged 45 commits into from
Sep 30, 2022
Merged

Conversation

wangyuantao
Copy link
Member

@wangyuantao wangyuantao commented Sep 21, 2022

Data Plane API - Pull Request

API Info: The Basics

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

  • Link to 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 Open API document (swagger) if applicable, and the root paths that have been updated.

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

❔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

@wangyuantao wangyuantao requested review from tg-msft and mikekistler and removed request for a team September 21, 2022 21:22
@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Sep 21, 2022

Swagger Validation Report

️❌BreakingChange: 2 Errors, 0 Warnings failed [Detail]
Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/f5c0456ac16dbf7c3c1ce3e9f4b332a36e8bd1a5/dev/cognitiveservices/data-plane/Language",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main//mnt/vss/_work/1/same-version-c93b354fd9c14905bb574a8834c4d69b/dev/cognitiveservices/data-plane/Language",
"details":"Command failed: node /mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.42/common/temp/node_modules/.pnpm/@Azure[email protected]/node_modules/autorest/dist/app.js /tmp/readme.oad.old.md --v2 --tag=oad-default-tag --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/tmp\nFATAL: swagger-document/compose - FAILED\nFATAL: Error: '$["x-ms-parameterized-host"].hostTemplate' has incompatible values (---\n'Endpoint/language'\n,
---\n'Endpoint/language/authoring'\n).\n Error: '$["x-ms-parameterized-host"].hostTemplate' has incompatible values (---\n'Endpoint/language'\n,
---\n'Endpoint/language/authoring'\n).\n"
BreakingChangeToolException "details":""errno":-21,
"syscall":"read",
"code":"EISDIR""
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌LintDiff: 2 Errors, 0 Warnings failed [Detail] [must fix]The following errors/warnings are introduced by current PR:
Rule Message Related RPC [For API reviewers]
AutoRest exception "location":"dev/cognitiveservices/data-plane/Language/readme.md",
"tag":"release_2022-07-01-preview",
"details":"swagger-document/compose - FAILED"
AutoRest exception "location":"dev/cognitiveservices/data-plane/Language/readme.md",
"tag":"release_2022-07-01-preview",
"details":"Error: '$["x-ms-parameterized-host"].hostTemplate' has incompatible values (---'Endpoint/language',
---'Endpoint/language/authoring')."


The following errors/warnings exist before current PR submission:

Rule Message
⚠️ R2010 - LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: cognitiveservices/data-plane/Language/questionanswering-authoring.json#L263
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
️️✔️~[Staging] ServiceAPIReadinessTest succeeded [Detail] [Expand]
Validation passes for ServiceAPIReadinessTest.
️️✔️~[Staging] TrafficValidation 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.
️️✔️SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation
️️✔️PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️CadlValidation succeeded [Detail] [Expand]
Validation passes for CadlValidation.
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Posted by Swagger Pipeline | How to fix these errors?

@openapi-workflow-bot
Copy link

Hi, @wangyuantao Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Sep 21, 2022

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking

    ️⚠️ azure-sdk-for-net-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from dad16c7. 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
      warn	File azure-sdk-for-net_tmp/initOutput.json not found to read
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
      warn	No file changes detected after generation
      warn	Skip detect changed packages
    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from dad16c7. 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: Skipping azure-nspkg as it is not installed.
      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! 8.15.0 -> 8.19.2
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.2>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
      warn	No file changes detected after generation
      warn	No package detected after generation
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Sep 21, 2022

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

    @openapi-workflow-bot
    Copy link

    Hi @wangyuantao, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @wangyuantao
    Copy link
    Member Author

    Are these really for 2022-10-01-preview as well? Please note that a PR was already created to publish: #20810
    Though, @kayousef, that shouldn't be targeting main but a new release branch that everyone can target. While they could technically target your PR branch, validation won't run. This is described in the internal documentation for publishing (both the old and new ways i.e. the dev/ folder).

    Is this the right branch name? #20913

    @yuantao-wang @heaths I'm not sure I follow what is the difference between #20810 and #20913

    I'm also very confused what we should do from here.

    @heaths
    Copy link
    Member

    heaths commented Sep 28, 2022

    @lmazuel can you merge this? The error is still saying security has duplicate incompatible definitions but the error shows two definitions that are obviously the same. This is breaking the BreakingChange validation as well, but there's no other errors (though, perhaps this is a blocker and there are some).

    @wangyuantao wangyuantao 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 Sep 29, 2022
    @@ -32,7 +32,7 @@
    }
    ],
    "x-ms-parameterized-host": {
    "hostTemplate": "{Endpoint}/language/authoring",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Can we know the reason for this change ?

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    It causes validation error. Let me revert this, and request exception.

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Standalone fix for this: #20927

    "description": "Supported Cognitive Services endpoint (e.g., https://<resource-name>.api.cognitiveservices.azure.com).",
    "x-ms-parameter-location": "client",
    "required": true,
    "type": "string",
    "format": "uri",
    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    This is to make consistent with July preview. Is that OK? @heaths

    Copy link
    Member

    Choose a reason for hiding this comment

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

    For anything new, I recommend declaring the uri format. The others should've been before, but it's consider a breaking change to do it after. Most languages will ignore it anyway and just do a string, but some lanugages - like C# - actually end up using a Uri class (correctly). If you don't, we'll have to transform it and we're trying to avoid that. The swaggers should be the main source of truth. They are the spec, afterall. :)

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    @heaths there are so many conflict rules and I'm confused which rule trump which rule... This is existing stuff, not new. In /specification folder, the latest stable version and the latest preview has no format, only /dev folder has format uri. Given we cannot break anything GA, we should fix /dev folder as what I'm doing here - remove format uri, right?

    @@ -285,12 +285,6 @@
    "application/json"
    ],
    "responses": {
    "200": {
    "description": "Export job status, project metadata, and assets.",
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    200 response is needed for SDK. Heath have added this in our earlier swaggers. There will be a validation error but that can be overriden.

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Reverted. How to override this specific validation error?
    image

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Fixed in example.

    @@ -1540,12 +1538,11 @@
    },
    "parameters": {
    "Endpoint": {
    "name": "Endpoint",
    "name": "endpoint",
    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    In /specification folder, the latest stable is uppercase "Endpoint", and latest preview is lowercase "endpoint", so no matter what we do here, it is a breaking change. So I will revert this to keep it in uppercase "Endpoint" so no breaking change to GA version. @heaths, Is that OK?

    @@ -13,6 +13,18 @@
    }
    },
    "responses": {
    "200": {
    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    I fix the validation error by adding 200 into the example responses. Let me know if that is OK with you. @heaths , @sush2218

    @wangyuantao wangyuantao added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Sep 30, 2022
    @chunyu3 chunyu3 merged commit dad16c7 into Azure:main Sep 30, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 Approved-LintDiff CI-FixRequiredOnFailure Cognitive Services data-plane
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    All Cognitive Language services should have same security definitions