You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request resolves a matrix incompatibility in the TypeScript Get Started CI workflow, adds end-to-end sample execution testing for both TypeScript and Go quickstart samples, and fixes missing workflow path triggers for Go.
Root Cause & Motivation
Node.js LTS Matrix Alignment:
Both get-started/quickstart/typescript/package.json and get-started/azure-auth/typescript/package.json specify "engines": { "node": ">=20" } and use @types/node v26 along with TypeScript 5.x/6.x in NodeNext module resolution.
However, .github/workflows/get-started-typescript.yml was still testing against node-version: [ 16.x, 18.x ], which are both past End-of-Life and trigger engine compatibility warnings (EBADENGINE).
The matrix is updated to test against active LTS releases: Node.js 20.x and 22.x.
TypeScript Runtime & Import Verification:
Similar to Python (python main.py) and PHP (php main.php), the TypeScript quickstart workflow now includes an end-to-end execution step (node out/index.js), and build-azure verifies client module importability (node --input-type=module -e 'import "./out/client/getUserApiClient.js";').
Additionally, the "test" script in get-started/quickstart/typescript/package.json has been updated from a stub error to node out/index.js, making npm test execute the sample successfully.
Go Workflow Path Triggers & End-to-End Verification:
.github/workflows/get-started.go.yml omitted '.github/workflows/**' in its push and pull_request path filters, causing workflow edits not to trigger CI (unlike all other language sample workflows in the repo).
Added an end-to-end execution step (go run main.go) to build-quickstart in get-started.go.yml.
Changes Summary
.github/workflows/get-started-typescript.yml:
Update build-azure matrix from [ 16.x, 18.x ] to [ 20.x, 22.x ].
Update build-quickstart matrix from [ 16.x, 18.x ] to [ 20.x, 22.x ].
Add client import verification step to build-azure.
Add end-to-end execution step (node out/index.js) to build-quickstart.
.github/workflows/get-started.go.yml:
Add '.github/workflows/**' to path triggers.
Add go run main.go execution step to build-quickstart.
get-started/quickstart/typescript/package.json:
Update "test" script to node out/index.js.
Verification
Local TypeScript build and tests:
npm ci and npm run build executed with 0 vulnerabilities.
npm test successfully executed node out/index.js against the mock API (verified posts fetched, created, and updated).
Client module import verified in azure-auth/typescript.
Local Go build and tests:
go build -v ./... passed in both get-started/quickstart/go and get-started/azure-auth/go.
go run main.go in get-started/quickstart/go successfully executed all CRUD operations.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Opening this pull request to resolve a few small maintenance items across the TypeScript and Go Get Started samples:
Node.js LTS Matrix Incompatibility: get-started/quickstart/typescript/package.json and get-started/azure-auth/typescript/package.json declare "engines": { "node": ">=20" }, but .github/workflows/get-started-typescript.yml was still testing against EOL Node 16.x and 18.x. This PR updates the matrix to active LTS versions 20.x and 22.x.
Runtime Verification:
Similar to the Python and PHP workflows, this PR adds an end-to-end execution check (node out/index.js / npm test for TypeScript, and go run main.go for Go) to validate that the generated client actually executes and performs sample API operations.
Workflow Triggers:
Added '.github/workflows/**' to path triggers in get-started.go.yml for parity with the other sample workflows.
All builds and sample executions have been validated locally. Thank you!
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Quickstart API failures are caught and only logged, leaving a zero exit status that lets the CI step and new npm test command report success despite failed requests.
I've updated get-started/quickstart/typescript/index.ts to set process.exitCode = 1 in the catch (err) handler and configured types: [node] in tsconfig.json.
This ensures that API client failures during sample execution terminate with a non-zero exit code, correctly failing the CI step and npm test runs.
The review discussion thread has also been marked as resolved.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The TypeScript workflow still tests Node 20 despite locked Azure dependencies requiring Node 22+, causing EBADENGINE warnings and testing an unsupported runtime.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Use Node 22+ for the Azure sample CI job
.github/workflows/get-started-typescript.yml:31
The Azure sample's locked dependencies require Node 22 or newer: @azure/identity 4.14.1 declares "node": ">=22.0.0" in get-started/azure-auth/typescript/package-lock.json:138–139, as do several Azure core packages. Keeping 20.x in this matrix therefore still produces EBADENGINE warnings during npm ci and tests an unsupported runtime. Please use Node 22+ for this job, for example 22.x and 24.x.
I've pushed an update to address the engine warning in the TypeScript Azure auth sample:
Updated build-azure in .github/workflows/get-started-typescript.yml to test against Node.js 22.x and 24.x.
Updated the engines field in get-started/azure-auth/typescript/package.json (and the lockfile) to >=22, matching the requirements of @azure/[email protected] and eliminating EBADENGINE warnings during npm ci.
Kept the quickstart matrix on Node.js 20.x and 22.x, since it does not depend on Azure Identity packages and continues to support Node.js 20.
I've verified the clean install, build, and client module import tests locally. Whenever you have a chance, could you please trigger or approve the CI workflow run?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request resolves a matrix incompatibility in the TypeScript Get Started CI workflow, adds end-to-end sample execution testing for both TypeScript and Go quickstart samples, and fixes missing workflow path triggers for Go.
Root Cause & Motivation
Node.js LTS Matrix Alignment:
get-started/quickstart/typescript/package.jsonandget-started/azure-auth/typescript/package.jsonspecify"engines": { "node": ">=20" }and use@types/nodev26 along with TypeScript 5.x/6.x in NodeNext module resolution..github/workflows/get-started-typescript.ymlwas still testing againstnode-version: [ 16.x, 18.x ], which are both past End-of-Life and trigger engine compatibility warnings (EBADENGINE).20.xand22.x.TypeScript Runtime & Import Verification:
python main.py) and PHP (php main.php), the TypeScript quickstart workflow now includes an end-to-end execution step (node out/index.js), andbuild-azureverifies client module importability (node --input-type=module -e 'import "./out/client/getUserApiClient.js";')."test"script inget-started/quickstart/typescript/package.jsonhas been updated from a stub error tonode out/index.js, makingnpm testexecute the sample successfully.Go Workflow Path Triggers & End-to-End Verification:
.github/workflows/get-started.go.ymlomitted'.github/workflows/**'in its push and pull_request path filters, causing workflow edits not to trigger CI (unlike all other language sample workflows in the repo).go run main.go) tobuild-quickstartinget-started.go.yml.Changes Summary
.github/workflows/get-started-typescript.yml:build-azurematrix from[ 16.x, 18.x ]to[ 20.x, 22.x ].build-quickstartmatrix from[ 16.x, 18.x ]to[ 20.x, 22.x ].build-azure.node out/index.js) tobuild-quickstart..github/workflows/get-started.go.yml:'.github/workflows/**'to path triggers.go run main.goexecution step tobuild-quickstart.get-started/quickstart/typescript/package.json:"test"script tonode out/index.js.Verification
npm ciandnpm run buildexecuted with 0 vulnerabilities.npm testsuccessfully executednode out/index.jsagainst the mock API (verified posts fetched, created, and updated).azure-auth/typescript.go build -v ./...passed in bothget-started/quickstart/goandget-started/azure-auth/go.go run main.goinget-started/quickstart/gosuccessfully executed all CRUD operations.