Skip to content

Conversation

@kazrael2119
Copy link
Member

@kazrael2119 kazrael2119 commented May 21, 2024

steps:
run rush update && rush build -t @azure/arm-networkanalytics
run cd sdk/networkanalytics/arm-networkanalytics
run export TEST_MODE=record && rushx test

@kazrael2119
Copy link
Member Author

error message:

$ export TEST_MODE=record && rushx test
Found configuration in D:\Git\azure-sdk-for-js\rush.json

Rush Multi-Project Build Tool 5.120.6 - Node.js 18.19.0 (LTS)
> "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test"


> @azure/[email protected] clean
> rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log


> @azure/[email protected] unit-test:node
> dev-tool run test:vitest

[test-info] ===TEST_MODE="record"===
[test-proxy] Image tag obtained from the powershell script => 1.0.0-dev.20240508.1

[test-proxy] Test proxy executable already exists at C:\Users\v-ziweichen.FAREAST\AppData\Local\azsdk-dev-tool-nodejs\Cache\test-proxy\1.0.0-dev.20240508.1\Azure.Sdk.Tools.TestProxy.exe, not downloading it.
[vitest]
[vitest]  RUN  v1.6.0 D:/Git/azure-sdk-for-js/sdk/networkanalytics/arm-networkanalytics
[vitest]
[vitest]  ❯ test/public/networkanalytics_operations_test.spec.ts  (5 tests | 1 failed | 4 skipped) 4261ms
[vitest]    ❯ test/public/networkanalytics_operations_test.spec.ts > NetworkAnalytics test > operation list test
[vitest]      → ChainedTokenCredential authentication failed.
[vitest] CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.
[vitest] CredentialUnavailableError: WorkloadIdentityCredential: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters.
[vitest]       In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables -
[vitest]       "AZURE_TENANT_ID",
[vitest]       "AZURE_CLIENT_ID",
[vitest]       "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot
[vitest] CredentialUnavailableError: ManagedIdentityCredential: The managed identity endpoint is indicating there's no available identity. Message: unknown Status code: 400
[vitest] More details:
[vitest] Failed to retrieve token from the Azure Active Directory: failed to process certificate file: MSI cert expired: currentTime=2024-06-04 03:15:51.7451503 +0000 UTC, notAfter=2024-02-26 08:37:00 +0000 UTC
[vitest] CredentialUnavailableError: Azure CLI credential expects a 'SystemRoot' environment variable
[vitest] CredentialUnavailableError: The 'Az.Account' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".
[vitest] CredentialUnavailableError: Azure Developer CLI credential expects a 'SystemRoot' environment variable
[vitest]
[vitest] ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
[vitest]
[vitest]  FAIL  test/public/networkanalytics_operations_test.spec.ts > NetworkAnalytics test > operation list test
[vitest] AggregateAuthenticationError: ChainedTokenCredential authentication failed.
[vitest] CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.
[vitest] CredentialUnavailableError: WorkloadIdentityCredential: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters.
[vitest]       In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables -
[vitest]       "AZURE_TENANT_ID",
[vitest]       "AZURE_CLIENT_ID",
[vitest]       "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot
[vitest] CredentialUnavailableError: ManagedIdentityCredential: The managed identity endpoint is indicating there's no available identity. Message: unknown Status code: 400
[vitest] More details:
[vitest] Failed to retrieve token from the Azure Active Directory: failed to process certificate file: MSI cert expired: currentTime=2024-06-04 03:15:51.7451503 +0000 UTC, notAfter=2024-02-26 08:37:00 +0000 UTC
[vitest] CredentialUnavailableError: Azure CLI credential expects a 'SystemRoot' environment variable
[vitest] CredentialUnavailableError: The 'Az.Account' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".
[vitest] CredentialUnavailableError: Azure Developer CLI credential expects a 'SystemRoot' environment variable
[vitest]  ❯ ../../../common/temp/node_modules/.pnpm/@[email protected]/node_modules/@azure/identity/src/credentials/chainedTokenCredential.ts:85:23
[vitest]  ❯ Object.withSpan ../../../common/temp/node_modules/.pnpm/@[email protected]/node_modules/@azure/core-tracing/src/tracingClient.ts:70:22
[vitest]  ❯ DefaultAzureCredential.getToken ../../../common/temp/node_modules/.pnpm/@[email protected]/node_modules/@azure/identity/src/credentials/chainedTokenCredential.ts:51:23
[vitest]  ❯ tryGetAccessToken ../../core/core-rest-pipeline/src/util/tokenCycler.ts:71:26
[vitest]  ❯ beginRefresh ../../core/core-rest-pipeline/src/util/tokenCycler.ts:82:35
[vitest]  ❯ Object.defaultAuthorizeRequest [as authorizeRequest] ../../core/core-rest-pipeline/src/policies/bearerTokenAuthenticationPolicy.ts:114:23
[vitest]  ❯ Object.sendRequest ../../core/core-rest-pipeline/src/policies/bearerTokenAuthenticationPolicy.ts:179:7
[vitest]  ❯ Module.sendRequest ../../core/core-client-rest/src/sendRequest.ts:39:20
[vitest]  ❯ Object.getPage src/api/pagingHelpers.ts:39:13
[vitest]      37|       const result =
[vitest]      38|         pageLink === undefined
[vitest]      39|           ? await getInitialResponse()
[vitest]        |             ^
[vitest]      40|           : await client.pathUnchecked(pageLink).get();
[vitest]      41|       checkPagingRequest(result);
[vitest]
[vitest] ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
[vitest] Serialized Error: { errors: [ { stack: 'CredentialUnavailableError: EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\environmentCredential.ts:152:13\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:71:25\n    at Object.withContext (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\instrumenter.ts:57:14)\n    at withContext (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:91:30)\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:28)\n    at EnvironmentCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\environmentCredential.ts:137:26)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:44\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:71:25\n    at Object.withContext (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\instrumenter.ts:57:14)\n    at withContext (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:91:30)', message: 'EnvironmentCredential is unavailable. No underlying credential could be used. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot.', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' }, { stack: 'CredentialUnavailableError: WorkloadIdentityCredential: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. \n      In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - \n      "AZURE_TENANT_ID",\n      "AZURE_CLIENT_ID",\n      "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot  \n    at WorkloadIdentityCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\workloadIdentityCredential.ts:96:13)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:44\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at DefaultAzureCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:51:23)\n    at tryGetAccessToken (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:71:26)\n    at beginRefresh (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:82:35)\n    at Object.defaultAuthorizeRequest [as authorizeRequest] (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:114:23)\n    at Object.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:179:7)\n    at Module.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-client-rest\src\sendRequest.ts:39:20)', message: 'WorkloadIdentityCredential: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. \n      In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - \n      "AZURE_TENANT_ID",\n      "AZURE_CLIENT_ID",\n      "AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot  ', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' }, { stack: 'CredentialUnavailableError: ManagedIdentityCredential: The managed identity endpoint is indicating there\'s no available identity. Message: unknown Status code: 400\nMore details:\nFailed to retrieve token from the Azure Active Directory: failed to process certificate file: MSI cert expired: currentTime=2024-06-04 03:15:51.7451503 +0000 UTC, notAfter=2024-02-26 08:37:00 +0000 UTC\n    at ManagedIdentityCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\managedIdentityCredential\index.ts:345:15)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:21\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at DefaultAzureCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:51:23)\n    at tryGetAccessToken (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:71:26)\n    at beginRefresh (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:82:35)\n    at Object.defaultAuthorizeRequest [as authorizeRequest] (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:114:23)\n    at Object.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:179:7)\n    at Module.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-client-rest\src\sendRequest.ts:39:20)', message: 'ManagedIdentityCredential: The managed identity endpoint is indicating there\'s no available identity. Message: unknown Status code: 400\nMore details:\nFailed to retrieve token from the Azure Active Directory: failed to process certificate file: MSI cert expired: currentTime=2024-06-04 03:15:51.7451503 +0000 UTC, notAfter=2024-02-26 08:37:00 +0000 UTC', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' }, { stack: 'CredentialUnavailableError: Azure CLI credential expects a \'SystemRoot\' environment variable\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\azureCliCredential.ts:175:15\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:21\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at DefaultAzureCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:51:23)\n    at tryGetAccessToken (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:71:26)\n    at beginRefresh (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:82:35)\n    at Object.defaultAuthorizeRequest [as authorizeRequest] (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:114:23)\n    at Object.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:179:7)', message: 'Azure CLI credential expects a \'SystemRoot\' environment variable', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' }, { stack: 'CredentialUnavailableError: The \'Az.Account\' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\azurePowerShellCredential.ts:212:25\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:21\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at DefaultAzureCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:51:23)\n    at tryGetAccessToken (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:71:26)\n    at beginRefresh (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:82:35)\n    at Object.defaultAuthorizeRequest [as authorizeRequest] (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:114:23)\n    at Object.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:179:7)', message: 'The \'Az.Account\' module >= 2.2.0 is not installed. Install the Azure Az PowerShell module with: "Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force".', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' }, { stack: 'CredentialUnavailableError: Azure Developer CLI credential expects a \'SystemRoot\' environment variable\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\azureDeveloperCliCredential.ts:211:15\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:69:21\n    at Object.withSpan (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\core-tracing\src\tracingClient.ts:70:22)\n    at DefaultAzureCredential.getToken (D:\Git\azure-sdk-for-js\common\temp\node_modules\.pnpm\@[email protected]\node_modules\@azure\identity\src\credentials\chainedTokenCredential.ts:51:23)\n    at tryGetAccessToken (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:71:26)\n    at beginRefresh (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\util\tokenCycler.ts:82:35)\n    at Object.defaultAuthorizeRequest [as authorizeRequest] (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:114:23)\n    at Object.sendRequest (D:\Git\azure-sdk-for-js\sdk\core\core-rest-pipeline\src\policies\bearerTokenAuthenticationPolicy.ts:179:7)', message: 'Azure Developer CLI credential expects a \'SystemRoot\' environment variable', name: 'CredentialUnavailableError', constructor: 'Function<CredentialUnavailableError>', toString: 'Function<toString>' } ] }
[vitest] ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
[vitest]
[vitest]  Test Files  1 failed (1)
[vitest]       Tests  1 failed | 4 skipped (5)
[vitest]    Start at  11:15:48
[vitest]    Duration  7.18s (transform 647ms, setup 0ms, collect 2.41s, tests 4.26s, environment 0ms, prepare 171ms)
[vitest]
[vitest] JUNIT report written to D:/Git/azure-sdk-for-js/sdk/networkanalytics/arm-networkanalytics/test-results.browser.xml
[vitest] vitest   exited with code 1
Trace: [Internal Error]
    at D:\Git\azure-sdk-for-js\common\tools\dev-tool\src\index.ts:10:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Failed calling npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test.  Exit code: 255

"./package.json": "./package.json",
".": {
"browser": {
"source": "./src/index.ts",
Copy link
Member

Choose a reason for hiding this comment

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

do you know why we have this change?

Copy link
Member

Choose a reason for hiding this comment

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

@jeremymeng this added line source is happened when we run build in sdk repo. is this expected?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think it's because of some changes in newer version of tshy. From @mpodwysocki

It's a new feature inside tshy, see the exports section

#30011 (comment)

@github-actions
Copy link

Hi @kazrael2119. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Aug 16, 2024
@github-actions
Copy link

Hi @kazrael2119. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library. no-recent-activity There has been no recent activity on this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants