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

Tasks use outdated node #41

Open
wyrdfish opened this issue Dec 3, 2021 · 4 comments · May be fixed by #42
Open

Tasks use outdated node #41

wyrdfish opened this issue Dec 3, 2021 · 4 comments · May be fixed by #42

Comments

@wyrdfish
Copy link

wyrdfish commented Dec 3, 2021

Description

It seems that azure devops tasks will no longer work with node 6 in march 2022 so they are now displaying a warning in each pipeline run.

Repro steps

Run one of the tasks in a pipeline and read the log.

Expected behavior

no warning.

Actual behavior

a warning.

Details

2021-12-03T17:39:53.9247604Z ##[section]Starting: Setup Paket Credential Manager
2021-12-03T17:39:53.9372982Z ==============================================================================
2021-12-03T17:39:53.9373420Z Task : Paket Credential Manager
2021-12-03T17:39:53.9374079Z Description : Creates a credential manager for Paket to access internal NuGet feeds.
2021-12-03T17:39:53.9374470Z Version : 0.2.5
2021-12-03T17:39:53.9374744Z Author : Matthias Dittrich
2021-12-03T17:39:53.9375248Z Help : This task allows you to consume NuGet packages hosted in your own private feed by providing a credential manager.
2021-12-03T17:39:53.9375786Z ==============================================================================
2021-12-03T17:39:53.9560702Z ##[warning]This task uses Node 6 execution handler, which will be removed March 31st 2022. If you are the developer of the task - please consider the migration guideline to Node 10 handler - https://aka.ms/migrateTaskNode10 (check this page also if you would like to disable Node 6 deprecation warnings). If you are the user - feel free to reach out to the owners of this task to proceed on migration.

@tfabris
Copy link

tfabris commented Dec 10, 2021

@isaacabraham and @matthid -

Indeed, this is a problem for us too. We are using your setCredentialManager tool in our Azure DevOps Pipeline, but it will become deprecated soon, which will break our pipeline. I contacted Microsoft support about it, and they said that since it was your tool, I needed to contact you here. They said you needed to upgrade to Node 10 as described here: https://github.com/microsoft/azure-pipelines-tasks/blob/master/docs/migrateNode10.md

Is this something that can be updated? If not, what do you recommend that I do for a replacement? Right now we only have this one line in our YML file which produces the error:
- task: setCredentialManager@0
This line is important because our build's "Paket Restore" will not function without it. So if we have to replace it with something else, what would that replacement look like for us?

Thanks!

Our error message looks like this:

2021-12-09T21:47:20.2679067Z ==============================================================================
2021-12-09T21:47:20.2679373Z Task         : Paket Credential Manager
2021-12-09T21:47:20.2679674Z Description  : Creates a credential manager for Paket to access internal NuGet feeds.
2021-12-09T21:47:20.2679948Z Version      : 0.2.5
2021-12-09T21:47:20.2680149Z Author       : Matthias Dittrich
2021-12-09T21:47:20.2680510Z Help         : This task allows you to consume NuGet packages hosted in your own private feed by providing a credential manager.
2021-12-09T21:47:20.2680961Z ==============================================================================
2021-12-09T21:47:20.2733464Z ##[warning]This task uses Node 6 execution handler, which will be removed March 31st 2022. If you are the developer of the task - please consider the migration guideline to Node 10 handler - https://aka.ms/migrateTaskNode10 (check this page also if you would like to disable Node 6 deprecation warnings). If you are the user - feel free to reach out to the owners of this task to proceed on migration.

@PierreYvesR PierreYvesR linked a pull request Dec 16, 2021 that will close this issue
@tfabris
Copy link

tfabris commented Jan 11, 2022

My interim solution was to use a different tool to configure the credential manager. I think this works, we'll see how it goes in the long run.

Old code (gives deprecation error message):

  # -----------------------------------------------------------------------------
  # Set up the credential manager, required for Paket to work.
  # -----------------------------------------------------------------------------
  - task: setCredentialManager@0
    displayName: Paket - Set credential manager

New code (seems to work I think):

  # -----------------------------------------------------------------------------
  # Set up the credential manager, required for Nuget and Paket to work.
  # -----------------------------------------------------------------------------
  - task: NuGetAuthenticate@0
    displayName: Nuget and Paket - Set credential manager

@wyrdfish
Copy link
Author

This task no longer works at all on the latest windows-2022 agents as the required dotnet framework is not present.

I upgraded this authentication plugin https://github.com/slang25/Paket.CredentialProvider.Gen2Support to dotnet5 and install it into the plugin folder then call the standard NuGetAuthenticate@0 task.

@ColinDabritzTrimble
Copy link

ColinDabritzTrimble commented Feb 22, 2022

We hit the same issue as above ^ with nuget requirements on other Microsoft Hosted agents. It appears this repo is not actively maintained. See the Microsoft Hosted Agents notice: actions/runner-images#4871

There is a temporary work-around to explicitly add the "Use Dot Net Core" task to install the 2.x version you need: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops

Note this is a separate issue than the Node version issue described above. I'll open a separate instance for clarity. Update: Not really an issue as much as a pre-req. Note that once you specify the 2.x using a task, it can also mean you have to specify other versions you need.

We've gotten farther adding these steps to our Azure Devops YAML pipeline:

    - task: UseDotNet@2
      displayName: 'Use .NET Core sdk'
      inputs:
        packageType: sdk
        version: 2.x

    - task: UseDotNet@2
      displayName: 'Use .NET Core sdk'
      inputs:
        packageType: sdk
        version: 3.x

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

Successfully merging a pull request may close this issue.

3 participants