Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps nuget artifact delay

We have a dotNET pipeline set up as a class library that the pipeline builds into a nupkg file and pushes to our Azure DevOps hosted artifact library. This works fine, and if we navigate to the Artifacts tab immediately after the build completes we can see the new package version as expected.

However, what we are seeing is anywhere from a 0 to 30-minute delay before we can consume said package using nuget. Have tried consuming it both on my local development machine and also as part of another pipeline in Azure DevOps and neither of them can access the new package version.

The trick so far seems to be, wait for the nuget package to build, then wait 30 minutes to use it.

Has anybody else experienced this delay? Is there some eventual consistency happening between the Azure DevOps UI and its nuget server?

like image 663
anton Avatar asked May 13 '20 00:05

anton


People also ask

How to consume NuGet packages from an azure artifacts feed?

To consume NuGet packages from a feed, add the feed's NuGet endpoint as a package source in Visual Studio. Azure Artifacts feeds work seamlessly with the NuGet Package Manager for Visual Studio 2015 extension as of Visual Studio 2015 Update 1.

How do I create an azure artifacts feed?

A feed is a container for packages. You consume and publish packages through a particular feed. Go to Azure Artifacts: Select + New feed: In the dialog box: Give the feed a name. Choose who can read and contribute (or update) packages in your feed. Choose the upstream sources for your feed. When you're done, select Create.

What is a feed in Azure DevOps?

Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2017 Developers can use Azure Artifacts to publish and consume NuGet packages both to and from feeds and public registries. A feed is an organizational construct that hosts packages.

How can I reduce or Optimize my Azure artifacts storage?

Hopefully, some of these tips prove helpful in reducing or optimizing your Azure Artifacts storage, starting with packages. Give it a try, and let us know how it goes. Heads up that the deletion for artifacts is processed daily, so you may see a delay in storage size changes.


1 Answers

This is normal, that is how it works.

When you push a nuget to a repository (Artifacts) in your scenario a lot of things are happening behind the scenes. Some of them would be:

  1. Version validation
  2. Virus checks
  3. Package indexing for searching

This processes usually take from a couple of minutes to half an hour depending on the load of the nuget server. This is the reason your nuget is not immediately available. For instance, when publishing to nuget.org, according to the documentation, "package validation and indexing usually takes under 15 minutes".

like image 192
Stelios Giakoumidis Avatar answered Sep 28 '22 11:09

Stelios Giakoumidis