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
538 stars 236 forks source link

jf poetry publish -> Unsupported Media Type #2546

Open JPLachance opened 6 months ago

JPLachance commented 6 months ago

Describe the bug

👋🏼

I'm new to the JFrog CLI and I'm a Poetry user. I'm trying to publish an internal library to a Repository I just created in the JFrog Cloud Platform.

So, I did run jf poetry-config. I then did jf poetry install and a jf poetry build.

Following that, I want to do a jf poetry publish:

jplachance@host py-base-lib % jf poetry publish -r jfrog-server
17:05:57 [🔵Info] Running Poetry publish.
17:05:57 [🔵Info] Running Poetry config repositories.jfrog-server https://tenant.jfrog.io/artifactory/api/pypi/my-lib-pypi/simple
17:05:57 [🔵Info] Running Poetry config ***
17:05:58 [🔵Info] Added tool.poetry.source name:"jfrog-server" url:"https://tenant.jfrog.io/artifactory/api/pypi/my-lib-pypi/simple"
17:05:58 [🔵Info] Running Poetry update
Updating dependencies
Resolving dependencies... (5.5s)

No dependencies to install or update

Publishing security-base-lib (6.4.0) to jfrog-server
 - Uploading py_base_lib-6.4.0-py3-none-any.whl FAILED

HTTP Error 415:  | b'{\n  "errors" : [ {\n    "status" : 415,\n    "message" : "Unsupported Media Type"\n  } ]\n}'
17:06:05 [🚨Error] exit status 1

Current behavior

The bug is quite simple:

When the jf CLI calls poetry config repositories.jfrog-server, it should use https://tenant.jfrog.io/artifactory/api/pypi/my-lib-pypi has URL, not https://tenant.jfrog.io/artifactory/api/pypi/my-lib-pypi/simple. The problem is the /simple.

Reproduction steps

Expected behavior

The JFrog CLI should call poetry config repositories.jfrog-server using the right URL.

JFrog CLI version

2.56.0

Operating system type and version

MacOS, 14.4.1 (23E224)

JFrog Artifactory version

Latest Cloud

JFrog Xray version

Latest Cloud

nofacer commented 6 months ago

They don't provide deploy config compared with other tools like Gradle. Not sure if it's the reason.

image image