Skip to content

Build Promote malforms the name of the build and Artifactory is not able to find it (if build number contains whitespaces) #3233

@carstencodes

Description

@carstencodes

Describe the bug

Hello,

we are using the Azure DevOps Extension to publish and promote our artifacts. After switching from jf cli 2.73.3 to 2.78.2, we are no longer able to promote our builds, because the values are changed.

For historical reasons, our build numbers contain a whitespace character.

Current behavior

2025-11-14T14:08:37.4588878Z Executing JFrog CLI Command:
2025-11-14T14:08:37.4589171Z d:\_build\_work\_tool\_jf\current\jf.exe rt bpr "My_Build" "Build 2947797_Debian" "global.feed_debian_qa_pb" --status="Quality assured" --source-repo="global.feed_debian_dev_pb" --include-dependencies=false --copy=true --dry-run=false --server-id="SoftwareIntegration 2947797_build_promotion_1763129317329"
2025-11-14T14:08:37.5136199Z 15:08:37 [Info] Promoting build...
2025-11-14T14:08:37.5351791Z 15:08:37 [Info] Trace ID for JFrog Platform logs: 321fa753df0c5008
2025-11-14T14:08:37.5355303Z 15:08:37 [Error] server response: 404 
2025-11-14T14:08:37.5355775Z {
2025-11-14T14:08:37.5356355Z   "errors": [
2025-11-14T14:08:37.5356521Z     {
2025-11-14T14:08:37.5356645Z       "status": 404,
2025-11-14T14:08:37.5356847Z       "message": "Cannot find a build by the name: My_Build, number: Build+2947797_Debian, repo: artifactory-build-info"
2025-11-14T14:08:37.5357022Z     }
2025-11-14T14:08:37.5357116Z   ]
2025-11-14T14:08:37.5357214Z }

As you can see, the build number has changed between the invocation of jf rt bpr, where the argument contains a whitespace, to the invocation of the REST Service and the returned value, where the whitespace in the build number has been replaced by a plus character (+).

I suspect this is done on client side before posting the command data to the server. The server checks the build number and refuses to promote the build, because the whitespace has been replaced.

Reproduction steps

  • Upload an arbitrary artifact to artifactory
  • Publish a build using a build number containing a whitespace character
  • Promote the build

Expected behavior

In the past years, up to jf 2.73.3, the promotion worked fine. The build was found on the artifactory server.

JFrog CLI version

2.78.2

Operating system type and version

Win11 LTSC2024

JFrog Artifactory version

No response

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions