devopshq / artifactory

dohq-artifactory: a Python client for Artifactory
https://devopshq.github.io/artifactory/
MIT License
270 stars 137 forks source link

Support "FEDERATED" repository types #398

Open RoeeDr opened 1 year ago

RoeeDr commented 1 year ago

Currently, calling get_repositories on artifactory that contains federated repositories will crash:

Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/artifactory.py", line 2137, in get_repositories
    return self._get_all(
  File "/venv/lib/python3.9/site-packages/artifactory.py", line 2109, in _get_all
    item.read()
AttributeError: 'NoneType' object has no attribute 'read'

This happens since create_by_type doesn't support the federated type and just returns None.

I can also open a PR on it myself, since the federated type should mostly be handled like a local repository if I understand correctly from the docs: https://www.jfrog.com/confluence/display/JFROG/Federated+Repositories

beliaev-maksim commented 1 year ago

looks like it is similar to local + additional features

I think we need to create a new type and for the moment just inherit the functionality of local one.

please submit a PR with proposal

RoeeDr commented 1 year ago

@beliaev-maksim do you have any estimate on when can you review the PR? No rush on anything, just want to get an estimate on the fix on my end (tested the code on real federated repos btw)