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

Monitor @typespec/compiler next version #2753

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

v-jiaodi
Copy link
Member

@v-jiaodi v-jiaodi commented Aug 14, 2024

Monitor @typespec/compiler dev version build
https://dev.azure.com/azure-sdk/public/_build/results?buildId=4146823&view=logs&j=d0d2a462-287f-51d5-e186-98b6b49f577f&t=9812ddb4-30f9-5fb0-8a89-333f2d283401

step:
1.run npm install -g @typespec/compiler@next
2. common/config/rush run npx @azure-tools/typespec-bump-deps@latest pnpm-config.json --add-rush-overrides
3. packages/typespec-test run npx @azure-tools/typespec-bump-deps@latest package.json
4. packages/typespec-test run npx @azure-tools/typespec-bump-deps@latest package.json
5. run rush update && rush build
6. run rushx unit-test:modula

error log:

1) Scenarios
       armCurdOperations.md
         Should generate samples for ARM operations
           ts samples:

      AssertionError: expected '/** This file path is /samples-dev/op…' to equal '/** This file path is /samples-dev/op…'
      + expected - actual

       /** This file path is /samples-dev/operationsListSample.ts */ import { ContosoClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to list the operations for the provider * * @summary list the operations for the provider * x-ms-original-file: 2021-10-01-preview/json_for_Operations_List.json */ async function operationsList() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
         const subscriptionId = "00000000-0000-0000-0000-00000000000";
      -  const client = new ContosoClient(credential, apiVersion, subscriptionId);
      +  const client = new ContosoClient(credential, subscriptionId);
         const resArray = new Array();
         for await (let item of client.operations.list()) {
           resArray.push(item);
         }

      at assertEqualContent (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/util/testUtil.ts:163:12)
      at Context.<anonymous> (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/modularUnit/scenarios.spec.ts:156:25)

  2) Scenarios
       armCurdOperations.md
         Should generate samples for ARM operations
           ts samples:

      AssertionError: expected '/** This file path is /samples-dev/em…' to equal '/** This file path is /samples-dev/em…'
      + expected - actual

       /** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ import { ContosoClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to create a Employee * * @summary create a Employee * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate.json */ async function employeesCreateOrUpdate() {     
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
         const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
      -  const client = new ContosoClient(credential, apiVersion, subscriptionId);
      +  const client = new ContosoClient(credential, subscriptionId);
         const result = await client.employees.createOrUpdate(
           "rgopenapi",
           "9KF-f-8b",
           {

      at assertEqualContent (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/util/testUtil.ts:163:12)
      at Context.<anonymous> (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/modularUnit/scenarios.spec.ts:156:25)

  3) Scenarios
       armCurdOperations.md
         Should generate samples for ARM operations
           ts samples:

      AssertionError: expected '/** This file path is /samples-dev/em…' to equal '/** This file path is /samples-dev/em…'
      + expected - actual

       /** This file path is /samples-dev/employeesDeleteSample.ts */ import { ContosoClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to delete a Employee * * @summary delete a Employee * x-ms-original-file: 2021-10-01-preview/json_for_Employees_Delete.json */ async function employeesDelete() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
         const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
      -  const client = new ContosoClient(credential, apiVersion, subscriptionId);
      +  const client = new ContosoClient(credential, subscriptionId);
         await client.employees.delete("rgopenapi", "5vX--BxSu3ux48rI4O9OQ569");
       }
       async function main() {
         employeesDelete();

      at assertEqualContent (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/util/testUtil.ts:163:12)
      at Context.<anonymous> (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/modularUnit/scenarios.spec.ts:156:25)

  4) Scenarios
       dpgCurdOperations.md
         Should generate samples for data-plane operations
           ts samples:

      AssertionError: expected '/** This file path is /samples-dev/wi…' to equal '/** This file path is /samples-dev/wi…'
      + expected - actual

       /** This file path is /samples-dev/widgetsCreateOrUpdateWidgetSample.ts */ import { WidgetManagerClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to creates or updates a Widget asynchronously. * * @summary creates or updates a Widget asynchronously. * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_CreateOrUpdateWidget.json */ async function widgetsCreateOrUpdateWidget() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
      -  const client = new WidgetManagerClient(credential, apiVersion);
      +  const client = new WidgetManagerClient(credential);
         const result = await client.widgets.createOrUpdateWidget("name1", {
           manufacturerId: "manufacturer id1",
         });
         console.log(result);
--
       /** This file path is /samples-dev/widgetsDeleteWidgetSample.ts */ import { WidgetManagerClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to delete a Widget asynchronously. * * @summary delete a Widget asynchronously. * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_DeleteWidget.json */ async function deleteWidgetByWidgetNameUsingLongRunningOperation() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
      -  const client = new WidgetManagerClient(credential, apiVersion);
      +  const client = new WidgetManagerClient(credential);
         const result = await client.widgets.deleteWidget("searchbox");
         console.log(result);
       }
       async function main() {
--
       /** This file path is /samples-dev/widgetsListWidgetsSample.ts */ import { WidgetManagerClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to list Widget resources * * @summary list Widget resources * x-ms-original-file: 2021-10-01-preview/json_for_Widgets_ListWidgets.json */ async function widgetsListWidgets() {       
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
      -  const client = new WidgetManagerClient(credential, apiVersion);
      +  const client = new WidgetManagerClient(credential);
         const resArray = new Array();
         for await (let item of client.widgets.listWidgets({
           top: 8,
           skip: 15,

      at assertEqualContent (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/util/testUtil.ts:163:12)
      at Context.<anonymous> (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/modularUnit/scenarios.spec.ts:156:25)

  5) Scenarios
       multipleExamplesInOneFile.md
         Should generate in one file when one method has multiple samples
           ts samples:

      AssertionError: expected '/** This file path is /samples-dev/em…' to equal '/** This file path is /samples-dev/em…'
+ expected - actual

       /** This file path is /samples-dev/employeesCreateOrUpdateSample.ts */ import { ContosoClient } from "@azure/internal-test";
       import { DefaultAzureCredential } from "@azure/identity";
       /** * This sample demonstrates how to create a Employee * * @summary create a Employee * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate_maxage.json */ async function employeesCreateOrUpdateMaxage() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
         const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
      -  const client = new ContosoClient(credential, apiVersion, subscriptionId);
      +  const client = new ContosoClient(credential, subscriptionId);
         const result = await client.employees.createOrUpdate(
           "rgopenapi",
           "9KF-f-8b",
           {
--
         console.log(result);
       }
       /** * This sample demonstrates how to create a Employee * * @summary create a Employee * x-ms-original-file: 2021-10-01-preview/json_for_Employees_CreateOrUpdate_minage.json */ async function employeesCreateOrUpdateMinage() {
         const credential = new DefaultAzureCredential();
      -  const apiVersion = "2021-10-01-preview";
         const subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
      -  const client = new ContosoClient(credential, apiVersion, subscriptionId);
      +  const client = new ContosoClient(credential, subscriptionId);
         const result = await client.employees.createOrUpdate(
           "rgopenapi",
           "9KF-f-8b",
           {

      at assertEqualContent (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/util/testUtil.ts:163:12)
      at Context.<anonymous> (file:///D:/cadl-ranch/autorest.typescript/packages/typespec-ts/test/modularUnit/scenarios.spec.ts:156:25)



Error: Failed calling cross-env TS_NODE_PROJECT=tsconfig.json mocha -r ts-node/register --experimental-specifier-resolution=node --experimental-modules=true  --no-timeout './test/modularUnit/**/*.spec.ts'.  Exit code: 5

@qiaozha qiaozha added the p0 priority 0 label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 priority 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants