-
-
Couldn't load subscription status.
- Fork 4.6k
fix(workflowengine): fix group not shown in Group membership check #52048
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
Conversation
| let nextQuery | ||
| do { | ||
| nextQuery = this.wantedGroups.shift() | ||
| if (this.hasGroup(nextQuery)) { | ||
| nextQuery = undefined | ||
| } | ||
| } while (!nextQuery && this.wantedGroups.length > 0) | ||
| if (nextQuery) { | ||
| await this.searchAsync(nextQuery) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easier to read.
| let nextQuery | |
| do { | |
| nextQuery = this.wantedGroups.shift() | |
| if (this.hasGroup(nextQuery)) { | |
| nextQuery = undefined | |
| } | |
| } while (!nextQuery && this.wantedGroups.length > 0) | |
| if (nextQuery) { | |
| await this.searchAsync(nextQuery) | |
| } | |
| while (this.wantedGroups.length > 0) { | |
| const groupId = this.wantedGroups.shift() | |
| if (this.hasGroup(groupId)) { | |
| continue | |
| } | |
| await this.searchAsync(groupId) | |
| return | |
| } |
Also, the current implementation would only search 1 wanted group, I assuming this intended as this.findGroupByQueue() again called at the end of search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was intentionally done as a queue in order to not DoS the server with group search requests, but have them coming sequentially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works but see Fons comments
|
/compile amend / |
this might have occured on instances with - more than twenty groups, and - on rules with more than one Group membership checks - and at least one of them being not in the set of the first 20 groups Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
f01afb0 to
9609606
Compare
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9609606 to
c051a5b
Compare
|
(Rebased and rebuild) |
Summary
this might have occured on instances with
In the before image you see that in some Group membership checks are still the placeholders and only two groups, G13 and G14 are shown with their display names. The network console shows that only the first twenty groups were fetched.
In the after image you see that all groups are visible now. The groups G33 and G37 are used twice each, on in combination with themselves and once an a rule with another group. In the network console you see that these groups are fetched now, but just once, not more than necessary.
Checklist