fix(workflowengine): fix group not shown in Group membership check#52048
Merged
fix(workflowengine): fix group not shown in Group membership check#52048
Conversation
nfebe
approved these changes
May 2, 2025
Comment on lines
+138
to
+147
| 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) | ||
| } |
Contributor
There was a problem hiding this comment.
Easier to read.
Suggested change
| 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
Member
Author
There was a problem hiding this comment.
This was intentionally done as a queue in order to not DoS the server with group search requests, but have them coming sequentially.
susnux
approved these changes
May 2, 2025
Contributor
susnux
left a comment
There was a problem hiding this comment.
works but see Fons comments
Member
Author
|
/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 <[email protected]>
f01afb0 to
9609606
Compare
Signed-off-by: Arthur Schiwon <[email protected]>
9609606 to
c051a5b
Compare
Member
Author
|
(Rebased and rebuild) |
This was referenced May 5, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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