anancarv / python-artifactory

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

art.artifacts.properties(artifact_path): artifact_path doesn't support querystring 'properties' #50

Closed sachinik19 closed 4 years ago

sachinik19 commented 4 years ago

Describe the bug The current implementation of method properies(self, artifact_path) defined in 'pyartifactory/objects.py' uses the rest endpoint url format string - "api/storage/{artifact_path}?properties[=x[,y]]"

Here "?properties[=x[,y]]" is a bug as the user cannot set it's value using arguments.

Due to that, it's not possible to provide the arguments for 'properties' querystring param. Ideally the format string should simply be "api/storage/{artifact_path}", thus user can pass the artifact_path for eg: "my-repository/my/new/artifact/directory/file.txt?properties=buildname,jobid" etc.

By default artifactory rest api just sends general properties. To get other properties, you need to pass the name of properties in querystring.

To Reproduce Steps to reproduce the behavior:

  1. Try to pass the artifact_path i provided in example.
  2. See error

Expected behavior It should allow the user of the method to pass the value of properties querystring param.

Screenshots If applicable, add screenshots to help explain your problem.

Environment:

Additional context Add any other context about the problem here.

anancarv commented 4 years ago

Hi @sachinik19 , Thanks for the very clear bug description, it will be very easy to reproduce :+1: . We'll fix it ASAP and let you know as soon as the patch is released.

sachinik19 commented 4 years ago

Thanks @anancarv for the quick response, it means a lot as our product needs it urgently.

sachinik19 commented 4 years ago

Hi @anancarv, curious to know when can we see the fix for it. Let me know if I can be of any help to expedite it.

nymous commented 4 years ago

Hello! Yes a PR is on the way, sorry for the delay