NuKeeper not working after recent changes made to FeedInstaller
Closed this issue · 16 comments
NuKeeper is not working after introducing changes to FeedInstaller.
After changes, NuKeeper creates nuget.config with two entries: projectScoped and organisationalScoped. The first one (projectScoped) feed URL is valid but second one (organisationalScoped) returns 404 which results in exception during restore.
What's more - task is showing that process ends with success even if in logs I can find:
Updates failed NuKeeperException : Command dotnet failed with exit code: 1
I believe that there is mistake in code: regarding documentation https://docs.microsoft.com/en-us/azure/devops/artifacts/feeds/project-scoped-feeds?view=azure-devops :
The URL of a project-scoped feed includes the project.
Project-scoped feed: https://feeds.dev.azure.com/contoso/projectId/_apis/Packaging/Feeds
The URL of an organization-scoped feed doesn't include a project.
Organization-scoped feed: https://feeds.dev.azure.com/contoso/_apis/Packaging/Feeds
In our case, project-scoped url (based on documentation) is not working but organisation one works fine. I've tried to create new feed (with project scope) and similar issue is happening: one url is working fine (project one this time) when another one returns 404 which result in exception.
It looks like that the new feedinstaller always expects two feed urls. I don't think that this is desirable.
I did some investigation. You can determine whether a project feed or an organisational feed has been selected.
This is the result of the feeds that are present. A projectfeed id contains two guids. The organisationId and the projectFeedId.
{"result":[ "{ \"Value\" : \"\\/649a6c53-bba4-453a-8b32-6b0042bce8ba\", \"DisplayValue\" : \"OrganisationalFeed\" }" ,"{ \"Value\" : \"4b57dd7f-0a1d-499d-8bc9-0ccc78a6b7fd\\/97949672-cbd1-499d-8753-059b10ccebda\", \"DisplayValue\" : \"ProjectFeed\" }" ],"statusCode":"ok","errorMessage":"","callbackContextParameters":{}}
Some validation should be added/condition for adding feeds into config file - currently we're not able to use NuKeeper in our pipelines.
Other problem is that task is green even there was restore exception. I believe that if there was an exception, failure should be reported instead of message: Attempted 1 updates and did 0. I don't know if this is possible in each case.
@MarcBruins I have created a pull request #57 for this issue
@MarcBruins Any update on this issue? This is preventing the usage of this extension.
This issue is preventing us from using NuKeeper in Azure DevOps at the moment.
@MarcBruins is there any chance the PR can be reviewed and completed?
@AnthonySteele Is there any way the PR that fixes this issue can be reviewed? It is preventing us from using it.
I will have a look, but I'm not the expert on Typescript ad Azure
We also can't use Nukeeper in Azure DevOps, due to this issue.
I see PR #57 is merged. So we're only waiting for a new release to be published to the marketplace, right?
Any idea when we can expect this to happen?
The new version is published, can somebody verify that it works?
Thanks, but no:
==============================================================================
Task : NuKeeper
Description : Version 0.4.41
Version : 0.4.41
Author : NuKeeper
Help : For help please visit https://github.com/NuKeeperDotNet/NuKeeper
==============================================================================
module.js:478
throw err;
^
Error: Cannot find module 'azure-pipelines-task-lib'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\a\_tasks\NuKeeper_e5a17a66-903f-46a9-a9b9-94241bcedc39\0.4.41\bin\NuKeeper.js:13:12)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
##[error]Exit code 1 returned from process: file name 'C:\agents\2.175.2\externals\node\bin\node.exe', arguments '"D:\a\_tasks\NuKeeper_e5a17a66-903f-46a9-a9b9-94241bcedc39\0.4.41\bin/NuKeeper.js"'.
I missed a step in the process, i'll document it here so that somebody can create a pipeline:
- run
npm install
in the root folder - update version numbers in
task.json
andvss-extension.json
- run
npm run-script build:prod
(refer to the package.json to see what is does) - run
tfx extension create
this should provide a.vsix
- upload the vsix to the marketplace
What about version 0.4.43 @CodeblackNL?
Yes, looks good! The task runs successfully.
The NuKeeper-builds for some of our a few repositories show troubles, but that's probably because of incorrect/incomplete manual package-reference updates.
Happy to hear. I'll close this issue now.