-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Severity:High
-
Location:External
Description:
When setting up a remote Nuget repository pointing to https://f.feedz.io/elastic/all/nuget and attempting to install a package that exists in the index file, Artifactory executes a request to find the file, but since it attempts to look for its metadata in a different structure, it fails to find it with a 404.
The request to install the elastic.apm version 1.5.1 package, for example, will result in the following request:
https://f.feedz.io/elastic/all/nuget/v3/registration-gz-semver2/elastic.apm/1.5.1.json
Which will result in 404:
2022-04-27T12:13:13.043Z [jfrt ] [ERROR] [59f517e219b98c9d] [etV3VirtualAndRemoteCommon:275] [http-nio-8081-exec-7] - Failed to download resource in repo: dev-nuget-remote, at url: https://f.feedz.io/elastic/all/nuget/v3/registration-gz-semver2/elastic.apm/1.5.1.json. HTTP STATUS CODE: 404
This package’s location on the https://f.feedz.io/elastic/all/nuget/v3/registration-gz-semver2/elastic.apm/index.json is:
https://f.feedz.io/elastic/all/nuget/v3/registration-gz-semver2/elastic.apm/1.5.1/index.json
Attempting to install the same package via the nuget gallery is successful and the request looks like this (found in https://api.nuget.org/v3/registration5-gz-semver2/elastic.apm/index.json):
https://api.nuget.org/v3/registration5-gz-semver2/elastic.apm/1.5.1.json
Comparing the two, it appears that Artifactory is attempting to look for this package in feedz.io in the format of elastic.apm/1.5.1.json (like it does in the nuget gallery) instead of searching for elastic.apm/1.5.1/index.json.
*This will not work in V2 or V3
Impact:
This behavior makes this feed not usable with Artifactory.
Expected behavior:
Artifactory should be able to handle and translate irregular registration repositories (that have a different structure than nuget gallery)
Steps to reproduce:
- Create a remote nuget repository with the following configuration:
- URL: https://f.feedz.io/elastic/all/nuget
- Download Context Path: /packages
- V3 feed URL: https://f.feedz.io/elastic/all/nuget/index.json
- Point the nuget client to the repository with the V3 protocol
- Attempt to install a package (the same package will be installed successfully directly from the feed r from nuget gallery)
Environment details:
Single node, version 7.37.14
Note: Part of the behavior is may be related to the fact that the Artifactory cannot handle the Published field outside of the <m:properties> tag, as described in RTFACT-26364.