-
Notifications
You must be signed in to change notification settings - Fork 287
JFrog CLI 2.4.1 is incompatible when downloading from old Artifactory: Server response: 400 #1247
Description
Describe the bug
The latest JFrog CLI is incompatible when performing a download from a very old Artifactory server version and exits with uninformative error Server response: 400.
To Reproduce
To reproduce, use the latest JFrog CLI with an old server (in my test case it was 4.15.0) and perform a download operation as simple as:
jfrog rt dl <path>
The last tested working version of JFrog CLI that doesn't show the issue is 2.3.1, as downloaded from the RPM repository.
Expected behavior
It's not in my control to update this very old Artifactory server. What I expect is either JFrog CLI to be backward compatible or to early exits when the server version is unsupported, outputting this information in the regular output, not just when the debug output is enabled (see below). It should also not attempt to query the server if it detects a version mismatch.
Screenshots
This is the regolar output on the linux CLI:
+ jfrog rt dl --server-id=ENNativeLibsArtifactory nativelibs-snapshot-local/ENLibPdf/latest-unix/linux-x86_64/libENLibPdfJNI.so
[Info] Searching items to download...
[Error] Server response: 400
Fail to parse query: items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"nativelibs-snapshot-local","path":"ENLibPdf/latest-unix/linux-x86_64","name":"libENLibPdfJNI.so"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property"), it looks like there is syntax error near the following sub-query: sha256","size","type","modified","created","property")
[Error] Server response: 400
Fail to parse query: items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"nativelibs-snapshot-local","path":"ENLibPdf/latest-unix/linux-x86_64","name":"libENLibPdfJNI.so"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property"), it looks like there is syntax error near the following sub-query: sha256","size","type","modified","created","property")
{
"status": "failure",
"totals": {
"success": 0,
"failure": 0
}
}
Enabling the Debug output possibly reveals the incompatiblity:
[Debug] Usage Report: Sending info...
[Debug] Sending HTTP GET request to: https://dev.euronovate.com:9802/artifactory/api/system/version
[Debug] Sending HTTP GET request to: https://dev.euronovate.com:9802/artifactory/api/system/version
[Debug] Sending HTTP GET request to: https://dev.euronovate.com:9802/artifactory/api/system/version
[Debug] Sending HTTP GET request to: https://dev.euronovate.com:9802/artifactory/api/system/version
[Debug] The Artifactory version is: 4.15.0
[Info] Searching items to download...
[Debug] Searching Artifactory using AQL query:
items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"nativelibs-snapshot-local","path":"ENLibPdf/latest-unix/linux-x86_64","name":"libENLibPdfJNI.so"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
[Debug] Sending HTTP POST request to: https://dev.euronovate.com:9802/artifactory/api/search/aql
[Debug] Sending HTTP POST request to: https://dev.euronovate.com:9802/artifactory/api/search/aql
[Debug] The Artifactory version is: 4.15.0
[Debug] Usage Report: Expected Artifactory version 6.9.0 or above, got 4.15.0
[Error] Server response: 400
Fail to parse query: items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"nativelibs-snapshot-local","path":"ENLibPdf/latest-unix/linux-x86_64","name":"libENLibPdfJNI.so"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property"), it looks like there is syntax error near the following sub-query: sha256","size","type","modified","created","property")
[Error] Server response: 400
Fail to parse query: items.find({"path":{"$ne":"."},"$or":[{"$and":[{"repo":"nativelibs-snapshot-local","path":"ENLibPdf/latest-unix/linux-x86_64","name":"libENLibPdfJNI.so"}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property"), it looks like there is syntax error near the following sub-query: sha256","size","type","modified","created","property")
Versions
- JFrog CLI version: 2.4.1
- JFrog CLI operating system: Any
- Artifactory Version: 4.15.0
- Latest JFrog CLI version: 2.3.1