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

[OpenAI] Update JS tspconfig #24427

Closed
wants to merge 4 commits into from
Closed

[OpenAI] Update JS tspconfig #24427

wants to merge 4 commits into from

Conversation

deyaaeldeen
Copy link
Member

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 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:

❔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

@openapi-workflow-bot
Copy link

Hi, @deyaaeldeen 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 Jun 13, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️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 Jun 13, 2023

    Swagger Generation Artifacts

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

    Breaking Changes Tracking

    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Failed [Logs] Generate from 61c7c5426050ec3b2ddb5ed8f732a75d3f1cd588. 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] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:131
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 131 | �[0m               �[36;1mGeneratePackage `�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to build sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:131
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 131 | �[0m               �[36;1mGeneratePackage `�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to packe sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGet-ChildItem: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:805
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 805 | �[0m … rtifacts += �[36;1mGet-ChildItem $artifactsPath -Filter *.nupkg -exclude *.s�[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mCannot find path
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m'/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/packages/Debug/' because
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1mit does not exist.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:131
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 131 | �[0m               �[36;1mGeneratePackage `�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to generate sdk artifact
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
    • Azure.AI.OpenAI [View full logs]  [Preview SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs] Generate from 61c7c5426050ec3b2ddb5ed8f732a75d3f1cd588. 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 -> 23.1.2
      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 -> 23.1.2
      cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      cmderr	[generate.py]
      cmderr	[generate.py] npm notice New major version of npm available! 8.19.4 -> 9.8.0
      cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.0>
      cmderr	[generate.py] npm notice Run `npm install -g npm@9.8.0` to update!
      cmderr	[generate.py] npm notice
    • ️✔️azure-ai-openai [View full logs]  [Preview SDK Changes]
    ️🔄 azure-sdk-for-js inProgress [Detail]
    Posted by Swagger Pipeline | How to fix these errors?

    @ghost ghost added the Cognitive Services label Jun 13, 2023
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 13, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Java azure-ai-openai There is no API change compared with the previous version

    generateMetadata: false
    generateTest: false
    isModularLibrary: true
    relative-generated-folder: "sources/generated"
    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 key only introduced for JS emitter? Can JS emitter leverage package-dir? This is the latest schema we're aligned and is rolling out.
    #23866

    Copy link
    Member Author

    Choose a reason for hiding this comment

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

    Yes, it is being added in Azure/azure-sdk-for-js#26138.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    I added the comment in the above PR. //CC: @weshaggard

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Yes lets try to avoid this if possible. I'd prefer we simply append "sources/generated" to the package-dir path we are already computing instead of having folks need this property in their tspconfig file.

    @MaryGao
    Copy link
    Member

    MaryGao commented Jun 14, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    generateMetadata: false
    generateTest: false
    isModularLibrary: true
    relative-generated-folder: "sources/generated"
    Copy link
    Member

    @MaryGao MaryGao Jun 14, 2023

    Choose a reason for hiding this comment

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

    @deyaaeldeen Not sure you could try the command link in local to verify if the option works or not. Feel free to raise issue in codegen if not.

    ./eng/common/scripts/TypeSpec-Project-Process.ps1 /home/rc/repos/tmp/spec-repo/specification/contosowidgetmanager/Contoso.WidgetManager 677e272f33a3eaa724abd769af79383a5ac2bba5 https://github.com/Azure/azure-rest-api-specs
    
    

    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 being added in Azure/azure-sdk-for-js#26138 and I verified it works.

    @raych1
    Copy link
    Member

    raych1 commented Jun 20, 2023

    @deyaaeldeen , I merged the change from main. The JS emitter was commented out in main, can you please double check?

    @xirzec
    Copy link
    Member

    xirzec commented Jul 7, 2023

    Closing this change, since I think we can accomplish what we want without adding yet another flag to the emitter.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    7 participants