Open lmcpare opened 1 year ago
+1 on this issue
We have the same thing resulting from using default build names on a Jenkins system where the build definitions are kept under folders. Each path separator in the folder hierarchy becomes ' :: ' (a pair of colons with a space on either side) in the build name, and rt ba
is the only JFrog CLI command we're using that cannot seem to handle these names.
Same result, a 404 error with no descriptive message
Curiously enough, some of the variations I've tried to look for a workaround print an informative message about the target not being found instead of the more cryptic server response: 404
message. I'll add some sample outputs in case this happens to provide any hints about where the encoding is breaking down
Examples:
// Baseline example, spaces and colons as spaces and colons
$ jf rt ba "csd-genexus- :: dl-installer :: release-0.99.4" "4" "csd-genexus- :: dl-auth-gateway :: release :: 0.99.4" "1"
21:11:50 [🔵Info] Running Build Append command...
21:11:50 [🚨Error] server response: 404
// Left just the spaces URL-encoded
$ jf rt ba "csd-genexus- :: dl-installer :: release-0.99.4" "4" "csd-genexus-%20::%20dl-auth-gateway%20::%20release%20::%200.99.4" "1"
21:12:14 [🔵Info] Running Build Append command...
21:12:14 [🚨Error] Build csd-genexus-%20::%20dl-auth-gateway%20::%20release%20::%200.99.4/1 not found in Artifactory.
// Sent genuine quotation marks around the name string, appended argument only
root@lemon:~/Git/csd-dl-deployment/builds (git:initial)$ jf rt ba "csd-genexus- :: dl-installer :: release-0.99.4" "4" '"csd-genexus- :: dl-auth-gateway :: release :: 0.99.4"' "1"
21:12:28 [🔵Info] Running Build Append command...
21:12:29 [🚨Error] Build "csd-genexus- :: dl-auth-gateway :: release :: 0.99.4"/1 not found in Artifactory.
// Attempted backslash escaping of spaces
$ jf rt ba "csd-genexus- :: dl-installer :: release-0.99.4" "4" 'csd-genexus-\ ::\ dl-auth-gateway\ ::\ release\ ::\ 0.99.4' "1"
21:12:57 [🔵Info] Running Build Append command...
21:12:57 [🚨Error] server response: 400
<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>
// Attempted the conventional replacement of spaces with '+'
$ jf rt ba "csd-genexus- :: dl-installer :: release-0.99.4" "4" "csd-genexus-+::+dl-auth-gateway+::+release+::+0.99.4" "1"
21:13:23 [🔵Info] Running Build Append command...
21:13:24 [🚨Error] Build csd-genexus-+::+dl-auth-gateway+::+release+::+0.99.4/1 not found in Artifactory.
We have the same issue, though the error is a bit different:
jf rt ba MultiPromoteTest 1 "FB :: ProgDevice2 QA" 897 --server-id=test
11:51:05 [Info] Running Build Append command...
11:51:10 [Error] parsing time "2023-01-08T21:42:40.754+01:00" as "2006-01-02T15:04:05.000-0700": cannot parse "+01:00" as "-0700"
Result is the same though, the append command fails to append the build.
@lmcpare @john-heinnickel Thanks for reporting this issue. We're currently targeting to handle this issue during Q4. We'll keep you posted.
@DavidRadoorHummel Could you please create another issue with much details as possible such as steps to reproduce and your Artifactory version?
Duplication of https://github.com/jfrog/jfrog-cli/issues/2043
@lmcpare @DavidRadoorHummel We created https://github.com/jfrog/jfrog-cli-core/pull/1020 to fix this issue. We'll keep you posted.
Thanks, but we're completely reworking how build info is used in Artifactory. We have use cases where we need build info to have different package protocols in one and be able to promote this. This doesn't work, by default, in Artifactory.
Sure @DavidRadoorHummel Feel free to contact us if there's anything we can assist with.
You're already helping immensely by maintaining JFrog CLI 😄 Great tool!
Describe the bug
The build-append command fails to process builds that include the ":" character in their name.
The same command succeeds when processing standard build names, i.e. with the ":" character in them.
Current behavior
These are the associated logs in artifactory-request.log:
Reproduction steps
Using the build-append command, append the buildInfo of an existing build whose name include a ":" character in it.
Repeat the same command with a regular build name succeeds.
Expected behavior
The
build-append
command should behave properly for any build name, with or without special chars.Suggestion: the cli code might need to encode the paths it sends to Artifactory. In the case of build names with special chars, their location within the
artifactory-build-info
is encoded, where:
is replaced by%3A
internally in the repo. It may be the reason why thebuild-append
command as it is currently fails.JFrog CLI version
2.32.0
Operating system type and version
Fedora 36
JFrog Artifactory version
7.47.12
JFrog Xray version
No response