jfrog-cli
jfrog-cli copied to clipboard
`jf rt build-append` fails if already uploaded build info uses time zone `Z`
Describe the bug
jf rt build-append is unable to correctly parse the time zone designator Z as required by ISO 8601, evenn though Artifactory has accepted build specs with this designator in the started header field as valid.
It is only accepting the +hhmm syntax, and rejecting any other.
Current behavior
+ jf rt build-append jf_job 1 conan_job 1
15:27:16 [Info] Running Build Append command...
15:27:16 [Error] parsing time "2025-01-08T14:37:22.000Z" as "2006-01-02T15:04:05.000-0700": cannot parse "Z" as "-0700"
Reproduction steps
Conan has produced a build info of the following form, and Artifactory has accepted it as valid:
{
"version": "1.0.1",
"name": "conan_job",
"number": "1",
"buildAgent": {
"name": "conan",
"version": "1.59.0"
},
"started": "2025-01-08T14:37:22.000Z",
"durationMillis": 0,
"artifactoryPrincipal": "foo",
"modules": []
}
Trying to reference this build in jf rt build-append fails:
+ jf rt build-append jf_job 1 conan_job 1
15:27:16 [Info] Running Build Append command...
15:27:16 [Error] parsing time "2025-01-08T14:37:22.000Z" as "2006-01-02T15:04:05.000-0700": cannot parse "Z" as "-0700"
Expected behavior
started headers in UTC time zone are correctly accepted.
JFrog CLI version
2.48.0, 2.62.1, 2.73.0
Operating system type and version
Ubuntu 1804, Ubuntu 2204. Windows Server 2022
JFrog Artifactory version
7.98.13
JFrog Xray version
No response