Skip to content

[TypeSpec-Clean] Update OpenAI.Authoring#23969

Merged
markcowl merged 3 commits intoAzure:mainfrom
markcowl:tsp-clean-oaia
May 17, 2023
Merged

[TypeSpec-Clean] Update OpenAI.Authoring#23969
markcowl merged 3 commits intoAzure:mainfrom
markcowl:tsp-clean-oaia

Conversation

@markcowl
Copy link
Member

@markcowl markcowl commented May 12, 2023

@markcowl markcowl requested a review from yangyuan as a code owner May 12, 2023 22:22
@openapi-workflow-bot
Copy link

Hi, @markcowl 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. vscswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 12, 2023

    Swagger Validation Report

    ️❌BreakingChange: 21 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    openapi.json 2022-06-01-preview(b8d4684) 2022-06-01-preview(main)
    Rule Message
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/deployments' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L58:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/deployments/{deploymentId}' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L184:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/files' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L399:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/files/{fileId}' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L528:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/files/{fileId}/content' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L589:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/files/import' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L622:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/fine-tunes' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L664:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/fine-tunes/{fineTuneId}' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L728:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/fine-tunes/{fineTuneId}/cancel' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L789:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/fine-tunes/{fineTuneId}/events' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L822:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/models' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L862:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/models/{model_id}' removed or restructured?
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L888:5
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'FileImport' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'FineTuneCreation' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'HyperParameters' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'ManualScaleSettings' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'ManualScaleSettingsUpdate' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'Purpose' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'StandardScaleSettings' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L45:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L922:3
    1007 - RemovedClientParameter The new version is missing a client parameter that was found in the old version. Was 'Azure.Core.Foundations.ApiVersionParameter' removed or renamed?
    New: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L46:3
    Old: cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json#L2070:3
    Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/b8d468411815598ec1a2d66dd5619813b7716fb8/specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json",
    "old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json",
    "details":"Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.52/common/temp/node_modules/.pnpm/@Azure+oad@0.10.4/node_modules/autorest/dist/app.js" --v2 --input-file=/mnt/vss/_work/1/same-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/tmp\nERROR: Schema violation: Missing required property: name\n - file:///mnt/vss/_work/1/same-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json:1744:10 ($.definitions.ModelList.properties.object["x-ms-enum"])\nERROR: Schema violation: Missing required property: name\n - file:///mnt/vss/_work/1/same-version-c93b354fd9c14905bb574a8834c4d69b/specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json:1541:10 ($.definitions.F"
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️️✔️~[Staging] ServiceAPIReadinessTest succeeded [Detail] [Expand]
    Validation passes for ServiceAPIReadinessTest.
    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView 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.
    ️️✔️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.
    ️️✔️TypeSpec Validation succeeded [Detail] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 12, 2023

    Swagger pipeline restarted successfully, please wait for status update in this comment.

    @ghost ghost added the Cognitive Services label May 12, 2023
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 12, 2023

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

    @openapi-workflow-bot
    Copy link

    Hi @markcowl, 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.

    "@azure-tools/typespec-autorest":
    azure-resource-provider-folder: "cadl-output"
    emitter-output-dir: "{project-root}"
    output-file: "{azure-resource-provider-folder}/{version}/openapi.json"
    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.

    It is up to you - the swagger here does not (and never did) match the swagger in the associated data-plane directory. We could emit it to a different folder in data-plane, but I feel like having the swagger in this directory or removing it altogether are the least bad options.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    I'm confused. If the swagger generated from TypeSpec does not match the swagger in the data-plane directory, why is it being generated at all? Why does this TypeSpec folder exist in the repo at all?

    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 am guessing that the swagger was there before and this is a proof of concept. There are multiple versions in the data-plane folder, and this spec does not even represent the latest one.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    OK, I'm fine merging this PR as-is with one additional change to remove this file I believe is an extra copy that shouldn't be there:

    https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Later we will need to decide what to do with specs that are proof-of-concept or client-only (don't emit swagger).

    Copy link
    Member

    Choose a reason for hiding this comment

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

    If this is a proof of concept I would argue we should have it merged into the main branch. If we plan to ship this we should have it outputting specs where they are supposed to be going and should definitely not have the name "cadl-output" in the path.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    @lmazuel: Do you know the history of the OpenAI.Authoring spec, and who is maintaining it going forward?

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Let me ask on our internal chat

    "@azure-tools/typespec-autorest":
    azure-resource-provider-folder: "cadl-output"
    emitter-output-dir: "{project-root}"
    output-file: "{azure-resource-provider-folder}/{version}/openapi.json"
    Copy link
    Member

    Choose a reason for hiding this comment

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

    OK, I'm fine merging this PR as-is with one additional change to remove this file I believe is an extra copy that shouldn't be there:

    https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/OpenAI.Authoring/cadl-output/openapi.json

    @markcowl markcowl requested review from chunyu3 and lmazuel May 15, 2023 22:45
    @AzureRestAPISpecReview AzureRestAPISpecReview added the BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required label May 15, 2023
    @openapi-workflow-bot
    Copy link

    Hi @markcowl, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    @markcowl markcowl added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label May 17, 2023
    @markcowl markcowl merged commit b96c8a3 into Azure:main May 17, 2023
    mikeharder added a commit to mikeharder/azure-rest-api-specs that referenced this pull request May 17, 2023
    - Spec removed from repo in Azure#23969
    mikeharder added a commit that referenced this pull request May 17, 2023
    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 BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required Cognitive Services

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    6 participants