-
Type:
Bug
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: 7.38.0
-
Fix Version/s: None
-
Component/s: REST API
-
Labels:None
-
Severity:High
-
Location:External
Problem Description: using the Set Repo Replication will replace the first pre-existing replication if we do not provide an array, which is not mentioned in documentation
Impact: adding a replication can completely remove an existing unrelated replication on the same repository.
Expected Behavior: Whatever the provided json, it should always be additive
Reproduce: Spin up and create local repository. Create a replication or two.
Now run the REST API with below json:
{ "url" : "http://without-bracket.com/artifactory/example-repo-local", "socketTimeoutMillis" : 15000, "username" : "test", "password" : "password", "syncStatistics" : false, "enabled" : true, "cronExp" : "0 25 20 1/1 * ? *", "syncDeletes" : false, "syncProperties" : true, "includePathPrefixPattern" : "", "excludePathPrefixPattern" : "", "repoKey" : "example-repo-local", "replicationKey" : "example-repo-local", "enableEventReplication" : true, "checkBinaryExistenceInFilestore" : false }With this, we see one of the replications that we initially created is replaced. Now, if we run the same API with updated JSON:
[
{ "url" : "http://with-bracket.com/artifactory/example-repo-local", "socketTimeoutMillis" : 15000, "username" : "test", "password" : "password", "syncStatistics" : false, "enabled" : true, "cronExp" : "0 25 20 1/1 * ? *", "syncDeletes" : false, "syncProperties" : true, "includePathPrefixPattern" : "", "excludePathPrefixPattern" : "", "repoKey" : "example-repo-local", "replicationKey" : "example-repo-local", "enableEventReplication" : true, "checkBinaryExistenceInFilestore" : false }]
This will append to the existing replications configured. We don't mention this in docs, but still should not be deleting existing replication configuration with or without brackets
Environment Details: Artifactory 7.38, mysql, standalone,on-prem