jfrog / artifactory-scripts

Scripts for Artifactory (Usually, for REST API), community driven.
Apache License 2.0
148 stars 166 forks source link

replicationDiff.sh is reporting differences which are not valid #33

Open dimitkoto opened 5 years ago

dimitkoto commented 5 years ago

Executed command: ./replicationDiff.sh -source_adminuser {user} -target_adminuser {user} -source_art http://{source-hostname}:8081/artifactory-target_art http://{target-hostname}:8081/artifactory-source_repo lib-release-local -target_repo lib-release-local-source_password *** -target_password ****-download_missingfiles no

Result:

Here is the count of files sorted according to the file extension that arepresent in the source repository and are missing in the target repository.Please note that if there are SHA files in these repositories which will have no extension, then the entire URL will be seen in the output. The SHA files will be seen for docker repositories whose layers are named as per their SHA value.

  2 .zip
 16 .xml
 46 .jar

· And below is the output diff file contents:

o cat filepaths_uri.txt

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.0.0-v0492/{product}-inttest-cluster-10.0.0-v0492-javadoc.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.0.0-v0492/{product}-inttest-cluster-10.0.0-v0492-sources.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.0.0-v0492/{product}-inttest-cluster-10.0.0-v0492.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.0.0-v0492/ivy-10.0.0-v0492.xml

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.1.0-v0508/{product}-inttest-cluster-10.1.0-v0508-javadoc.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.1.0-v0508/{product}-inttest-cluster-10.1.0-v0508-sources.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.1.0-v0508/{product}-inttest-cluster-10.1.0-v0508.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-inttest-cluster/10.1.0-v0508/ivy-10.1.0-v0508.xml

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-webApp/9.12.0-v0226/{product}-webApp-9.12.0-v0226-javadoc.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-webApp/9.12.0-v0226/{product}-webApp-9.12.0-v0226-p2docmeta.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-webApp/9.12.0-v0226/{product}-webApp-9.12.0-v0226-sources.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-webApp/9.12.0-v0226/{product}-webApp-9.12.0-v0226.jar

http://{source-hostname}:8081/artifactory/lib-release-local/com/{company}/{product}/{product}-webApp/9.12.0-v0226/ivy-9.12.0-v0226.xml

... etc ...

However, comparing couple of them manually didn't indicate any actual differences.

nihalreddy28 commented 5 years ago

We have fixed an issue with the replicationDiff.sh script. There was an issue with the way diff was being done between the source and the target repositories, which resulted in inconsistencies when reporting the missing artifacts. The new change will explicitly only report artifacts that are missing in the target repository and present in the source repository in Artifactory.

DarthFennec commented 5 years ago

Hi @dimitkoto, are you still having this problem? If so, let us know, and we can continue to look into it. Otherwise, I'll be closing this issue, but feel free to reopen it if you'd like.