devopshq / devopshq/artifactory

Out of tree classes need to re-implement _get_all if baseurl != /artifactory

Open
#310 2 comments 0 reactions 0 assignees View on GitHub
Feedback needed
Dominant language
Python
Stars
306
Forks
161
PR merge metrics
No merged PRs in 30d

Description

ProjectUser and some other objects require /artifactory to be stripped from drive.

The current base _get_all() method referred to below:

https://github.com/devopshq/artifactory/blob/a95d10e9264677a409a508ae30b967f68d82e699/artifactory.py#L2090

has explicit knowledge about which classes should have /artifactory stripped. Putting this knowledge in the base class doesn't seem right since it can't know the proper behavior of all sub-classes.

Alternatively, maybe check a properly that is set by the implementor that triggers behavior. (eg: self.baseurl)

Using an optional argument to _get_all() won't work because in the lazy=True case, .read() doesn't know whether /artifactory should be stripped (again unless it is overridden).

Thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.