--exclude-props can't handle wildcard input
Describe the bug
Using wildcard like --exclude-props "myprop=somethi*" will create an invalid AQL returning an error like ... it looks like there is syntax error near the following sub-query: {"$match":"somethi*"}}}], ....
Current behavior
jf rt s "repo" --exclude-props "myprop=somethi*"
15:58:04 [Debug] JFrog CLI version: 2.53.1
15:58:04 [Debug] OS/Arch: linux/amd64
15:58:04 [Debug] Usage info is disabled.
15:58:04 [🔵Info] Searching artifacts...
15:58:04 [Debug] Sending HTTP GET request to: https://artifacts/artifactory/api/system/version
15:58:04 [Debug] Artifactory response: 200
15:58:04 [Debug] JFrog Artifactory version is: 7.55.14
15:58:04 [Debug] Searching Artifactory using AQL query:
items.find({"$or":[{"@myprop":{"$ne":{"$match":"somethi*"}}}],"$or":[{"$and":[{"repo":"repo","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
15:58:04 [Debug] Sending HTTP POST request to: https://artifacts.se.axis.com/artifactory/api/search/aql
15:58:04 [🚨Error] server response: 400
Failed to parse query: items.find({"$or":[{"@myprop":{"$ne":{"$match":"somethi*"}}}],"$or":[{"$and":[{"repo":"repo","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).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: {"$match":"somethi*"}}}],"$or":[{"$and":[{"repo":"repo","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
15:58:04 [🚨Error] server response: 400
Failed to parse query: items.find({"$or":[{"@myprop":{"$ne":{"$match":"somethi*"}}}],"$or":[{"$and":[{"repo":"repo","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).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: {"$match":"somethi*"}}}],"$or":[{"$and":[{"repo":"repo","path":{"$match":"*"},"name":{"$match":"*"}}]}]}).include("name","repo","path","actual_md5","actual_sha1","sha256","size","type","modified","created","property")
Reproduction steps
jf rt s "repo" --exclude-props "myprop=somethi*"
Expected behavior
jf rt s "repo" --exclude-props "myprop=somethi*" should create an AQL using $nmatch and not $ne+$match.
Example: {"@myprop":{"$ne":{"$match":"somethi*"}}} should be {"@myprop":{"$nmatch":"somethi*"}}
JFrog CLI version
2.53.1
Operating system type and version
linux/amd64
JFrog Artifactory version
7.55.14
JFrog Xray version
No response
This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days
If this is fixed, then link to the commit that solves it. Until then, this is still an issue.
This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days
This issue was closed due to 7 days of inactivity after being marked as stale. Feel free to reopen it if it remains relevant.