Skip to content

[v10] Optimize trait loop evaluation#19183

Merged
vitorenesduarte merged 3 commits intobranch/v10from
vitor/backport-19097/v10
Dec 8, 2022
Merged

[v10] Optimize trait loop evaluation#19183
vitorenesduarte merged 3 commits intobranch/v10from
vitor/backport-19097/v10

Conversation

@vitorenesduarte
Copy link
Copy Markdown
Contributor

Backport #19097 to branch/v10.

This PR first cherry picks #14221 (resolving some conflicts), which allows the cherry-pick of #19097 to work without conflicts.

russjones and others added 2 commits December 8, 2022 09:38
Refactored all tests under "lib/services/suite" to use testify instead
of gocheck.
This commit reduces the number of `log.Debug`s in the trait loop evaluation in case of a mismatch.

This commit also optimizes the trait eval loop ensuring that each regexp is compiled at-most once, and only if strictly needed.
@github-actions github-actions Bot removed the request for review from r0mant December 8, 2022 14:11
@vitorenesduarte vitorenesduarte merged commit cd7c8fd into branch/v10 Dec 8, 2022
@vitorenesduarte vitorenesduarte deleted the vitor/backport-19097/v10 branch December 8, 2022 16:48
fheinecke pushed a commit that referenced this pull request Dec 16, 2022
* Refactor tests under services package.

Refactored all tests under "lib/services/suite" to use testify instead
of gocheck.

* Optimize trait loop evaluation (#19097)

This commit reduces the number of `log.Debug`s in the trait loop evaluation in case of a mismatch.

This commit also optimizes the trait eval loop ensuring that each regexp is compiled at-most once, and only if strictly needed.

Co-authored-by: Russell Jones <rjones@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants