Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: Allow suppression of The container operating system doesn't support Node20. warning #5019

Open
AdamYoblick opened this issue Oct 17, 2024 · 3 comments

Comments

@AdamYoblick
Copy link
Member

Task name

All tasks

Describe your feature request here

We generate some manylinux wheels for the Debugpy product. These wheels are created in a container with an old OS and old components (by design), for maximum backwards compat.

The problem is that the azdo task runner uses Node20, and the container OS doesn’t support Node20, so the task reverts back to Node16, which is fine. But it spits out a warning (for EVERY task) which pollutes our build:
##[warning]The container operating system doesn't support Node20. Using Node16 instead. Please upgrade the operating system of the container to remain compatible with future updates of tasks: https://github.com/nodesource/distributions
For example, https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10402459&view=results

Note that this happens even after running the UseNode task, because this warning comes from the task runner itself.

Can we please have a way to suppress this particular warning from our yaml?

@AdamYoblick AdamYoblick changed the title [enhancement]: Allow suppression of The container operating system doesn't support Node20. Using Node16 instead warning [enhancement]: Allow suppression of The container operating system doesn't support Node20. warning Oct 17, 2024
@DenisRumyantsev
Copy link
Contributor

Hi @AdamYoblick.

This warning can appear when Node20 shipped with the agent is used to execute tasks inside a container and the container OS does not support Node20.
It's not uncommon at all that Node shipped with the agent is not compatible with the container OS, and tasks cannot be executed in the container using Node shipped with the agent.
In such cases, the com.azure.dev.pipelines.agent.handler.node.path Docker label can be used in Dockerfile to define path to Node preinstalled in the container during the Docker image build.

So, here is the current logic:

  • If the com.azure.dev.pipelines.agent.handler.node.path Docker label is defined in the container, then it is custom Node path, and it will be used on the container startup and for running tasks;
  • Else if agent OS is macOS / agent OS is Windows and container OS is Linux, then custom Node path is just node, and just node will be used on the container startup and for running tasks;
  • Else it is considered that Node shipped with the agent is compatible with the container OS; Node20 will be used on the container startup, with a fallback to Node16; Node version defined in the task for execution will be used to execute the task.

We probably can suppress warnings on the task execution if there already was fallback to Node16 on container startup.

For now, you can set the com.azure.dev.pipelines.agent.handler.node.path Docker label to use custom Node path; it can even be the same path to Node16 mounted from the agent.

@DenisRumyantsev DenisRumyantsev self-assigned this Oct 18, 2024
@DenisRumyantsev DenisRumyantsev transferred this issue from microsoft/azure-pipelines-tasks Oct 18, 2024
@AdamYoblick
Copy link
Member Author

Thank you so much for all the details, that makes sense. 😄

Unfortunately, we do not own the container nor the image used for generating these wheels, so we can't set any Docker labels. It would be nice to be able to suppress this warning, maybe with a yaml variable?

@garydex
Copy link

garydex commented Nov 20, 2024

+1

Our build hardware is in the process of being upgraded to RHEL8 so we cannot currently use Node 20. Our pipelines are being flooded with these warnings which is distracting from other genuine issues we may want to flag. A flag to disable this warning would be super useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants