Change implementation of user activity records split to match resource presence#35553
Closed
Envek wants to merge 3 commits intogravitational:masterfrom
Closed
Change implementation of user activity records split to match resource presence#35553Envek wants to merge 3 commits intogravitational:masterfrom
Envek wants to merge 3 commits intogravitational:masterfrom
Conversation
zmb3
approved these changes
Dec 8, 2023
Collaborator
|
Looks fine to me but lets have @espadolini review next week. |
espadolini
reviewed
Dec 11, 2023
| } | ||
|
|
||
| report.Records = report.Records[:len(report.Records)/2] | ||
| records = recordsTail |
Contributor
There was a problem hiding this comment.
WDYT of doing it like this? It avoids moving data around and it makes it more obvious that we're just repeatedly splitting all the original records slice into reports.
Suggested change
| records = recordsTail | |
| records = records[len(report.Records):] |
Contributor
Author
There was a problem hiding this comment.
Good catch, thanks! Applied your suggestion, also added test to check that no records lost
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
espadolini
approved these changes
Dec 12, 2023
zmb3
reviewed
Dec 21, 2023
Co-authored-by: Zac Bergquist <zbergquist99@gmail.com>
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.
See #34954 (review)