Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure summary row subtables are included in the serialized representaion of a datatable tree. #17569

Merged
merged 1 commit into from May 17, 2021

Conversation

diosmosis
Copy link
Member

Description:

If a summary row has a subtable, it will not be serialized because we go over the $rows property, but the summary row is held in a different property. Fixed by including it.

This was causing the strange "Row with label '%s' (columns = %s) has already a subtable" errors. The summary row subtable couldn't be loaded from the DB, just the ID, so when summing them, we'd trigger this warning.

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@diosmosis diosmosis added the Needs Review PRs that need a code review label May 16, 2021
@diosmosis diosmosis added this to the 4.3.0 milestone May 16, 2021
flamisz
flamisz previously approved these changes May 16, 2021
Copy link
Contributor

@flamisz flamisz left a comment

Choose a reason for hiding this comment

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

The code and test look good to me but didn't know where to test in the UI.

@flamisz
Copy link
Contributor

flamisz commented May 16, 2021

As I see in the tests there is an error.

@flamisz flamisz dismissed their stale review May 16, 2021 22:48

error in tests

@diosmosis
Copy link
Member Author

The test failure seems unrelated. This is for an L3 issue in JIRA so the description of the bug it fixes is hidden, and it would be pretty hard to manually test. You'd have to set the ranking query INI config really low, track a ton of data w/, say, events that creates top level reports w/ subtables (including in the Others row), then archive w/ ranking query. I couldn't actually get that to work, so just debugged on prod.

@tsteur tsteur merged commit 68e0319 into 4.x-dev May 17, 2021
@tsteur tsteur deleted the l3-85-summary-row-subtables branch May 17, 2021 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants