jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
529 stars 227 forks source link

jf cli limited to 255 characters during debian upload #2532

Open steelhead31 opened 5 months ago

steelhead31 commented 5 months ago

Describe the bug

We are currently trying to upload a single debian package, but with debian/ubuntu metadata to allow it to upload for multiple distributions..

jf rt u "$FILE" "deb/pool/main/a/xxxxxx/$(basename ${FILE});deb.architecture=all;deb.component=main;deb.distribution="trixie";deb.distribution="bookworm";deb.distribution="bullseye";deb.distribution="buster";deb.distribution="noble";deb.distribution="jammy";deb.distribution="focal";deb.distribution="bionic"" --flat=true

Is there a way to upload a debian package and then update the deb.distributions as a 2nd actions using the jf cli?

Current behavior

This worked fine before trixie and noble were added, but now its violating a field size property, as shown below

Error: 7 [Error] Failed uploading 1 artifacts.
Error: 7 [Error] server response: 500 
{
  "errors" : [ {
    "status" : 500,
    "message" : "org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)"
  } ]
}

Reproduction steps

Upload a .deb with metadata for several distributions, as shown in the command example.

Expected behavior

No response

JFrog CLI version

2.56.0

Operating system type and version

Fedora 39

JFrog Artifactory version

Jfrog Cloud ( packages.adoptium.net )

JFrog Xray version

No response

yahavi commented 4 months ago

@steelhead31 Thank you for using the JFrog CLI. You could attempt uploading the artifact and configuring the property as two separate steps. For instance:

jf rt u <source> <target>

jf rt sp <target> "deb.architecture=all;deb.component=main;deb.distribution=trixie;deb.distribution=bookworm;deb.distribution=bullseye;deb.distribution=buster;deb.distribution=noble;deb.distribution=jammy;deb.distribution=focal;deb.distribution=bionic"

If you're still facing the 255 characters limitation, think about dividing the process into smaller segments by executing the jf rt sp command multiple times.

Please let me know if that helped.