FreakinWard / azure-pipeline-html-report

MIT License
1 stars 5 forks source link

Upgrade node v12 #5

Open FreakinWard opened 3 weeks ago

FreakinWard commented 3 weeks ago

Based on Visual Studio Marketplace feedback, users see pipeline warnings about "Node version (10) that is end-of-life".

I am currently getting a warning based on “PublishHtmlReport@1 depends on a version of Node (10) that is at end of life”.

I'm getting this warning in my pipeline due to this extension: "'Publish Html Report' version 1 (PublishHtmlReport@1) is dependent on a Node version (10) that is end-of-life"

Todo

carlin-q-scott commented 3 weeks ago

Hi @FreakinWard , I saw that you were hoping for steps to reproduce. I thought this would be a simple fix in the extension manifest. Is it not? Here's the init log from my build if that helps:

Starting: Initialize job Agent name: 'Hosted Agent' Agent machine name: 'fv-az112-202' Current agent version: '3.246.0' Operating System Ubuntu 22.04.5 LTS Runner Image Image: ubuntu-22.04 Version: 20241015.1.0 Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20241015.1/images/ubuntu/Ubuntu2204-Readme.md Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20241015.1 Runner Image Provisioner 2.0.384.1 Current image version: '20241015.1.0' Agent running as: 'vsts' Prepare build directory. Set build variables. Download all required tasks. Downloading task: DownloadPipelineArtifact (1.230.0) Downloading task: CmdLine (2.246.1) Downloading task: AzureCLI (2.247.3) Downloading task: PublishHtmlReport (1.0.14)

[warning]Task 'Publish Html Report' version 1 (PublishHtmlReport@1) is dependent on a Node version (10) that is end-of-life. Contact the extension owner for an updated version of the task. Task maintainers should review Node upgrade guidance: https://aka.ms/node-runner-guidance

FreakinWard commented 2 weeks ago

Hi @FreakinWard , I saw that you were hoping for steps to reproduce. Here's the init log from my build if that helps:

Thanks for sharing the steps here. It helps point out where you're seeing the warning. Now, I can see it being thrown in my pipelines as well. 💯

I thought this would be a simple fix in the extension manifest. Is it not?

For context, I'm only vaguely familiar with the Azure DevOps Extension Framework. I recall having several node conflicts when I initially forked the repo to fix the bug. Because of that, I decided to lock down the package.json to the only supported node version, node v12.

I do not see anything in the manifest affecting the node version. However, looking at the docs, I see there's a manifest version. That may be what you're referring to.

Otherwise, this would require updating package dependencies to align with supporting newer node versions.

From what I can tell from the azure-devops-extension-sample, the latest supported version is node v16.13.

Let me know if you're understanding it differently. 🤔

carlin-q-scott commented 2 weeks ago

I actually wasn't familiar with building devops extensions at all. I just figured it would be like many other frameworks that let you specify the environment requirements in the extension manifest. Apparently it's just whatever node version built the extension?

Their documentation says to always use the latest node version and shows use of v20 for the build while linking to v22 for dev machine. But the Microsoft Azure hosted build agents are currently using Node.js 18.20.4. So I'd at least use that version.

The dev machine must run the latest version of Node to ensure that the written code is compatible with the production environment on the agent and the latest non-preview version of azure-pipelines-task-lib. Update your task.json file as per the following command:

"execution": {
   "Node20_1": {
     "target": "index.js"
   }
 }

https://learn.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops

anfedimo commented 2 weeks ago

Según los comentarios de Visual Studio Marketplace , los usuarios ven advertencias en la canalización sobre "La versión de nodo (10) está al final de su vida útil".

Actualmente recibo una advertencia basada en “PublishHtmlReport@1 depende de una versión de Node (10) que está al final de su vida útil”.

Recibo esta advertencia en mi canalización debido a esta extensión: "La versión 1 de 'Publicar informe HTML' (PublishHtmlReport@1) depende de una versión de Node (10) que está al final de su vida útil"

Hacer

  • [ ] Identificar los pasos para reproducir
  • [x] Actualizar la versión del nodo

Would it be possible to update line 39 of the task.json file to read “Node20”?

image
babuga365 commented 1 week ago

Please check and update the node version to latest. I could see these warnings in my pipeline as well

FreakinWard commented 3 days ago

Based on the suggestions, I updated task.json to use Node20, see these changes.

However, when executing a pipeline with these changes, the following error was thrown, see pipeline run:

##[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.

CleanShot 2024-11-23 at 00 24 07@2x

Then, rolling back, put the pipeline back in working order, see pipeline run: CleanShot 2024-11-23 at 00 23 44@2x

Based on this, changing the tasks target resolves the issue. Let me know if I've missed something.

Otherwise, I'll continue working towards a node version upgrade.