[BUG]: Upgrading to Node20, but linux agents not running now? node-migration: Node20
Closed this issue · 2 comments
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
Json to Variable-test2
Task version
1
Issue Description
My custom task extensions that have been published for a while have been giving notice of EoL for Node versions they were on. So I've read
https://learn.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#q-how-can-i-upgrade-my-custom-task-to-the-latest-node
and
https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/migrateNode20.md
I have updated my tasks to the versions as specified, and added the execution for Node20_1 as suggested. However, when running my task on a Hosted Ubuntu-latest agent, it now tells me:
| The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
This is an odd and unexpected result.
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu-latest
Relevant log output
Agent machine name: 'fv-az430-495'
Current agent version: '4.248.0'
Operating System
Runner Image
Runner Image Provisioner
Current image version: '20241117.1.0'
Agent running as: 'vsts'
##[debug]Triggering repository: net-core-helloworld. repository type: Git
Prepare build directory.
##[debug]Creating build directory: '/home/vsts/work/1'
##[debug]Delete existing artifacts directory: '/home/vsts/work/1/a'
##[debug]Creating artifacts directory: '/home/vsts/work/1/a'
##[debug]Delete existing test results directory: '/home/vsts/work/1/TestResults'
##[debug]Creating test results directory: '/home/vsts/work/1/TestResults'
##[debug]Creating binaries directory: '/home/vsts/work/1/b'
##[debug]Creating source directory: '/home/vsts/work/1/s'
Set build variables.
Download all required tasks.
Downloading task: oneLuckiDevJson2Variable (1.0.33)
##[debug]Task 'oneLuckiDevJson2Variable' has been downloaded into '/home/vsts/work/_tasks/oneLuckiDevJson2Variable_ffd54dce-ce4f-4080-bdda-a110f334feff/1.0.33'.
##[debug]Task 'JSON to Variable' has following condition: 'succeeded()'.
##[debug]Parsing expression: <succeeded()>
##[debug]succeeded
##[debug](
##[debug])
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS)
Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}
Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION)
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY)
Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC)
Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT)
Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES)
Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION)
Knob: CheckIfTaskNodeRunnerIsDeprecated246 = True Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246)
Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer)
Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT)
Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK)
Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING)
Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout)
Finished checking job knob settings.
##[debug]Log plugin 'TestResultLogPlugin' is disabled.
##[debug]Log plugin 'TestFilePublisherPlugin' is disabled.
Start tracking orphan processes.
Full task logs with system.debug enabled
##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell. ##[debug]System.InvalidOperationException: The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell. at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsyncInternal() in /mnt/vss/_work/1/s/src/Agent.Worker/TaskRunner.cs:line 141 at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync() in /mnt/vss/_work/1/s/src/Agent.Worker/TaskRunner.cs:line 76 at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken) in /mnt/vss/_work/1/s/src/Agent.Worker/StepsRunner.cs:line 264
Repro steps
When running on windows it also fails now
##[error]A supported task execution handler was not found. The task does not carry an implementation that is compatible with your current operating system 'Windows(X64)'. Contact the task author for more details.
##[debug]System.InvalidOperationException: A supported task execution handler was not found. The task does not carry an implementation that is compatible with your current operating system 'Windows(X64)'. Contact the task author for more details.
at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsyncInternal() in D:\a_work\1\s\src\Agent.Worker\TaskRunner.cs:line 138
at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync() in D:\a_work\1\s\src\Agent.Worker\TaskRunner.cs:line 76
at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken) in D:\a_work\1\s\src\Agent.Worker\StepsRunner.cs:line 264
ahh... well, I had the LATEST version of Node installed, which is greater than supported.. downgraded to v20 and things work better