-
Notifications
You must be signed in to change notification settings - Fork 78
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
getAllUsers() is broken #175
Comments
Thanks for trick with MAX_PAGESIZE, it is a quick and dirty solution to my current needs! |
@AjaxOdessa with USERS = Namespace(
ALL='((Disabled = true) OR (Disabled = false))',
ENABLED='(Disabled = false)',
DISABLED='(Disabled = true)',
)
kind=USERS.ENABLED
user_attrs = ["UserName", "DisplayName",
"FirstName", "LastName", "MiddleName",
"ShortDisplayName", "OnpremLdapUsername",
"CreationDate", "EmailAddress",
"LastPasswordUpdateDate", "Disabled",
"Subscription", "SubscriptionAdmin",
"Role", "TeamMemberships" ]
#return rally.getAllUsers()
return rally.get('User', fetch=",".join(user_attrs),
query=[kind], instance=False,
pagesize=500, start=0, limit=10000,
projectScopeUp=True, projectScopeDown=True,) |
Any resolution to this issue? |
Here is my solution to this: import pyral def get_user_details(self):
This method actually uses all components from pyral except the query builder, where we have issues when you have more than 4 pages. Increase the self.MAX_PAGESIZE in class initiation section and your issue will be resolved. |
There are many, many issues reporting this bug over course of years, and all are closed without a fix (#123 , #125, #126, #162, #163 and others) - all seem to be closed without a resolution - and yet the bug still exists with 1.5.0 and Python 3.9
There are many explanations proposed, but none seem to actual explain what is going on. This is definitely not a permissions issue and not exactly "a very large number of users issue". What it seems to be a is a pagination issue. for sake of testing, I have manually modified MAX_PAGESIZE from 500 to 1000 in the call, and it started working (our total user count is a but under 2600) I am going to go out on a limb and guess that if you reduce the page size, you will be able to reproduce it locally
Playing with it experimentally, it appears to breaks EXACTLY when number of pages exceeds 4 (which is why it will not break when number of users is below 2000). But you should be able to recreate it regardless. I am going to guess that if you take number of users you have and divide it by 4 and set the PAGESIZE to that number minus 1, it will break, while that number plus one will work.
The text was updated successfully, but these errors were encountered: