Handle prerelease Node.js versions without failing worker initialization - #843
Open
Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 1 commit into
Open
Handle prerelease Node.js versions without failing worker initialization#843Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 1 commit into
Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 1 commit into
Conversation
Fixes #842 Co-authored-by: Dobby <dobby@microsoft.com>
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
semverdependencyFixes #842.
Why
The worker's version check split
process.versionon.and required exactly three components. A valid prerelease such asv26.8.0-alpha.0.0.0therefore causedWorkerInitRequestto fail before the worker could start.This behavior was exposed by the Azure Functions Docker hotfix PR:
https://dev.azure.com/msazure/One/_git/AAPT-Antares-Functions-Docker/pullrequest/16949790
The root problem is not in the worker: NodeSource package
26.8.0-1nodesource1appeared to be a stable package version, but its installed Node binary reportedv26.8.0-alpha.0.0.0. Production images expecting stable Node.js must still reject that artifact. This worker change is defense in depth so diagnostic version validation does not make the language worker unavailable for a syntactically valid prerelease version.Tests
Red before the implementation:
Validated with fnm Node.js
v22.22.3:npm run buildnpm run lintgetNodeVersionLogtests: 4 passing