Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-27136

Replication API replaces existing replication

    XMLWordPrintable

    Details

    • 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

      Description

      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. 

      https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-SetRepositoryReplicationConfiguration

      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

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              scottm Scott Mosher
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-27200 -
                  SYNCHRONIZED
                  • Last Sync Date: