Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rupaschomaker opened this issue Nov 16, 2021 · 2 comments
Labels
Feedback needed Additional information is required to proceed

Comments

@rupaschomaker
Copy link

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

The current base _get_all() method referred to below:

if cls is Project:

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?

@rupaschomaker rupaschomaker changed the title Out of tree classes need to re-implement get-all if baseurl != /artifactory Out of tree classes need to re-implement _get_all if baseurl != /artifactory Nov 16, 2021
@beliaev-maksim
Copy link
Member

@rupaschomaker
would you like to propose a PR to initiate a discussion?

@beliaev-maksim
Copy link
Member

can you share a code snippet that causes issues?

@beliaev-maksim beliaev-maksim added the Feedback needed Additional information is required to proceed label Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback needed Additional information is required to proceed
Development

No branches or pull requests

2 participants