anancarv / python-artifactory

Typed interactions with the Jfrog Artifactory REST API
MIT License
60 stars 51 forks source link

Upload with Checksum does not work --> creates empty file in artifactory #182

Closed Lect0r905 closed 1 month ago

Lect0r905 commented 2 months ago

Describe the bug when using deploy with checksum the uploaded file is 0 byte:

To Reproduce use artifact.deploy with checksum_enabled

Expected behavior file is uploaded with checksum

Environment:

anancarv commented 2 months ago

Hey @Lect0r905 , Thanks for raising. You're right for the first and the third comments.

However, for the second one:

the put command for checksum_enabled is missing the data

According to the Artifactory API, the deploy by checksum deploys an artifact to the specified destination by checking if the artifact content already exists in Artifactory. So no need for the data to be sent.

anancarv commented 1 month ago

Hey @Lect0r905 , Thanks for raising. You're right for the first and the third comments.

However, for the second one:

the put command for checksum_enabled is missing the data

According to the Artifactory API, the deploy by checksum deploys an artifact to the specified destination by checking if the artifact content already exists in Artifactory. So no need for the data to be sent. But I'll add the possibility to send the data as well

I just re-checked the documentation, and I confirm that there is no need to send the data stream when deploying by checksum

foutoucour commented 1 month ago

I confirm the bug, that I introduced :(

Here is a PR to fix the situation: https://github.com/anancarv/python-artifactory/pull/186