-
Type:
Bug
-
Status: Closed
-
Resolution: Deferred
-
Affects Version/s: None
-
Fix Version/s: 7.22.0
-
Component/s: None
-
Labels:None
-
Severity:High
Problem description: npm.disttag properties are not being handled as expected within a virtual repository in a use case when there are two local repositories when 1 one the repositories is a regular local repository and 1 one of the repositories is a repo with pull replication configured from another local repository.
Steps to reproduce:
1*.* Create two Artifactory instances "test-1" and "test-2" with full-mesh topology.
- Within each instance create a virtual repository "npm-release"
- Within test-1 create a local npm repository "npm-release-2-local" with all default settings
- Within test-2 create a local npm repository "npm-release-1-local" with all default settings
- Within test-1 create a local npm repository "npm-release-1-local" that has replication set to the npm-release-1-local within test-2, and has "Enable Event Replication" checked
- Within test-2 create a local npm repository "npm-release-2-local" that has replication set to the npm-release-2-local within test-1, and has "Enable Event Replication" checked
- Within test-1 add npm-release-1-local and npm-release-2-local to the npm-release virtual repository in that order, and set the default deployment registry to npm-release-1-local
- Within test-2 add npm-release-2-local and npm-release-1-local to the npm-release virtual repository in that order, and set the default deployment registry to npm-release-2-local
- Create a dummy npm project with the version set to 1.0.0-beta.1 and the publishConfig registry set to the npm-release of test-1
2.a. The package.json file of the npm project
{
"name": "@i416951/dist-tag-testing",
"version": "1.0.0-beta.1",
"description": "a",
"main": "index.js",
"scripts":
~
{ "test": "echo \"Error: no test specified\" && exit 1" }~
,
"author": "",
"license": "ISC",
"publishConfig":
~
{ "registry": "http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/" }~
}
2.b. Publish the npm package with the tag beta to npm-release of test-1
npm cache clean --force && npm publish --tag beta --dd
...
~~
npm http fetch PUT 201 http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/@i416951%2fdist-tag-testing 598ms
+ @i416951/dist-tag-testing@1.0.0-beta.1
2.c watch all of the dist-tags for the package from npm-release of test-1
npm cache clean --force && npm dist-tag ls @i416951/dist-tag-testing --registry=http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/
npm WARN using --force Recommended protections disabled.
beta: 1.0.0-beta.1
latest: 1.0.0-beta.1
3.a Change the npm version in the package.json file to 1.0.0-beta.2
3.b Publish the npm package with the tag beta to npm-release of test-1
npm cache clean --force && npm publish --tag beta --dd
...
npm http fetch PUT 201 http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/@i416951%2fdist-tag-testing 555ms
+ @i416951/dist-tag-testing@1.0.0-beta.2
3.c watch all of the dist-tags for the package from npm-release of test-1
npm cache clean --force && npm dist-tag ls @i416951/dist-tag-testing --registry=http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/
npm WARN using --force Recommended protections disabled.
beta: 1.0.0-beta.2
latest: 1.0.0-beta.1
4.a Change the npm version in the package.json file to 1.0.0-beta.3
4.b Change the publishConfig registry to the test-2 Artifactory instance and publish the package to npm-release of test-2
npm cache clean --force && npm publish --tag beta --dd
npm http fetch PUT 201 http://mill.jfrog.team:12109/artifactory/api/npm/npm-release/@i416951%2fdist-tag-testing 578ms
+ @i416951/dist-tag-testing@1.0.0-beta.3
4.c watch all of the dist-tags for the package from npm-release of test-1
npm cache clean --force && npm dist-tag ls @i416951/dist-tag-testing --registry=http://mill.jfrog.team:12053/artifactory/api/npm/npm-release/
npm WARN using --force Recommended protections disabled.
beta: 1.0.0-beta.3
latest: 1.0.0-beta.3
In step 4.c we can see that the latest tag is 1.0.0-beta.3 while the expected behavior is that the latest tag will be 1.0.0-beta.1.
Attached an example from the npmjs registry of what is the expected behavior.