[RTFACT-17537] Nuget API v3 feed for remote nuget repositories is not getting updated with the latest index.json of a package Created: 24/Sep/18  Updated: 31/Dec/18  Resolved: 25/Dec/18

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NuGet
Affects Version/s: 6.1.0, 6.0.1, 6.3.0, 6.3.2, 6.3.3
Fix Version/s: 6.6.3

Type: Bug Priority: Critical
Reporter: Nihal Reddy Chinna Choudhary Assignee: Dudi Morad
Resolution: Fixed Votes: 0
Labels: None

Sprint: Leap 35

 Description   

Nuget API v3 feed for remote nuget repositories is not getting updated with the latest index.json of a package. The metadata file for API v3 which is a index.json file is not getting expired in the nuget remote cache. Due to this when there is an update in nuget gallery for a package, the download request for the newer version of the package fails as Artifactory is always giving the index.json of the requested package from the cache.

 

Issue is reproducible in 6.0.1, 6.1.0 and the latest 6.3.3 version as well.

 

Steps to Reproduce:

1. Create a Nuget remote repository in Artifactory and set the "metadata retrieval cache period" to 10 seconds to easily reproduce the issue.

2. Request the following metadata file for the "hotchocolate" nuget package using the below URL:

http://localhost:8081/artifactory/api/nuget/v3/nuget-remote/registration-semver2/hotchocolate/index.json

3. The index.json file will be cached in the nuget remote cache in Artifactory.

4. Wait for more than 30 seconds and try to downloading the same index.json for the "hotchocolate" package from the nuget remote cache repo and you will see that the download is successful. The expected behavior is that the request should result in a HTTP 404 message after the metadata is expired based on the metadata retrieval cache setting .

http://localhost:8081/artifactory/api/nuget/v3/nuget-remote-cache/registration-semver2/hotchocolate/index.json

Due to this behavior, if there is a new version of "hotchocolate" package available in nuget.org, the request for this new version would fail as Artifactory keeps giving the index.json that is already cached in the remote repository. 



 Comments   
Comment by Dudi Morad [ 25/Dec/18 ]

Fix Notes:

All files under .nuGetV3 folder will be marked as expirable,
Note:
Even if the file is expired, Artifactory will send Head request first and only if the file has changed artifactory will download the file

Generated at Sun Oct 20 11:37:13 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.