Handle valid prerelease Node.js versions without failing worker initialization

Open Beginner friendly
#842 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
backend

Research direction

Start at the WorkerInitRequest handling that parses process.version and inspect the existing semver dependency and version-warning logic. Add coverage for stable supported, unknown major, prerelease, and invalid versions; done means valid prereleases return a warning without failing initialization while invalid versions still throw.

Written by the indexing model from the issue text.

Description

Description

The Node.js worker currently parses process.version by splitting on . and requiring exactly three components. A valid prerelease version such as v26.8.0-alpha.0.0.0 therefore throws during WorkerInitRequest handling and prevents the language worker from starting.

This was exposed by Azure Functions Docker hotfix PR https://dev.azure.com/msazure/One/_git/AAPT-Antares-Functions-Docker/pullrequest/16949790. NodeSource published package 26.8.0-1nodesource1, whose package version appeared stable but whose installed binary reported v26.8.0-alpha.0.0.0.

The upstream package content is the root problem: production images expecting a stable Node.js release must not silently accept a prerelease binary. The worker change proposed here is defense in depth so that version-warning logic does not make the worker unavailable when Node reports a syntactically valid prerelease version.

Proposed behavior

  • Parse the version with the existing semver dependency instead of splitting on ..
  • Continue deriving the EOL/support check from the parsed major version.
  • Return a system warning for valid prerelease versions rather than throwing and failing worker initialization.
  • Continue rejecting values that are not valid semantic versions.

Expected tests

  • Stable supported versions retain the current behavior.
  • Unknown major versions retain the current warning.
  • v26.8.0-alpha.0.0.0 returns a prerelease warning and does not throw.
  • Invalid version strings still throw a parse error.

Non-goals

This change does not make prerelease Node.js builds acceptable for Azure Functions production images. Image acquisition must independently verify that the installed runtime is the intended stable artifact.

Dominant language
TypeScript
Stars
110
Forks
51
Avg merge
8d 8h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-functions-nodejs-worker

All issues in Azure/azure-functions-nodejs-worker

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.