generated from TrueCloudLab/basic
engine: Simplify multiple chains processing #86
No reviewers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/policy-engine#86
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/policy-engine:refactor-rulefound"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So, it's sunday evening and I am sitting on-call trying to debug strange
node behaviour. It took me 3 whole minutes to understand the code being
changed: it accumulates bools in slices, even though no slice is needed;
it uses subtle condition from the first loop to make decision in the
second one, and finally it uses named return values.
In this commit we remove the slice and the second loop, because why not.
Signed-off-by: Evgenii Stratonikov e.stratonikov@yadro.com
The same logic is used in
getStatusFromChains()
from the same file, btw.a03c00c44f
toa11e80e2c7