Skip to content

Conversation

@jaegeral
Copy link
Collaborator

@jaegeral jaegeral commented Jan 7, 2026

This PR improves the robustness of chart generation within Timesketch aggregators and charts.

@jaegeral jaegeral self-assigned this Jan 7, 2026
@jaegeral jaegeral added Backend Code Health Code health improvements labels Jan 7, 2026
@jaegeral
Copy link
Collaborator Author

jaegeral commented Jan 7, 2026

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the robustness of chart generation by adding checks for encoding and data format before attempting to create a chart. The changes in AggregationResult.to_chart and BaseChart._get_chart_with_transform are well-implemented and prevent potential crashes. The accompanying new tests for these changes are thorough and correctly validate the new behavior.

However, I found an issue in the newly added tests for BaseAggregator. One of the tests seems to be based on an incorrect assumption about the behavior of BaseAggregator.__init__, which will cause the test to fail. Please see my detailed comment.

@jaegeral jaegeral marked this pull request as ready for review January 7, 2026 13:39
@jaegeral jaegeral requested a review from jkppr January 7, 2026 13:39
@jkppr jkppr merged commit 7bd91ce into google:master Jan 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Code Health Code health improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants