Skip to content

fix two issues with handling of processing dependent archives #20555

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

Merged
merged 10 commits into from
May 11, 2023

Conversation

diosmosis
Copy link
Member

Description:

Bugs fixed:

  1. setting whether an archiving request is the root one or not as an instance property of Parameters does not work because when querying archive data for child periods, we will create entirely new instances (in CoreAdminHome\API::prepareArchive()). So instead, use a static variable. This properly prevents recursion here.

  2. fix edge case where Goals initiates archiving far more than necessary when there are no conversions (so no data in goals reports) but there are visits (so archiving will still be executed). This was always an issue, but is is far more visible now since we aggregate one blob at a time, and thus query archive IDs once per report. So for every Goals report, we'd archive and try to process dependent archives, even though there are no conversions. And since there is no report data, nothing will be inserted, and we'll try to archive again when we move on to the next report.

Review

…ting whether an archiving request is the root one or not as an instance property of Parameters does not work because when querying archive data for child periods, we will create entirely new instances. so instead, use a static variable 2) fix edge case where Goals initiates archiving far more than necessary when there are no conversions (so no data in goals reports) but there are visits (so archiving will still be executed). this issue is far more visible now since we aggregate one blob at a time, and thus query archive IDs once per report
@diosmosis diosmosis added the Needs Review PRs that need a code review label Apr 4, 2023
@diosmosis diosmosis added this to the 5.0.0 milestone Apr 4, 2023
…ting whether an archiving request is the root one or not as an instance property of Parameters does not work because when querying archive data for child periods, we will create entirely new instances. so instead, use a static variable 2) fix edge case where Goals initiates archiving far more than necessary when there are no conversions (so no data in goals reports) but there are visits (so archiving will still be executed). this issue is far more visible now since we aggregate one blob at a time, and thus query archive IDs once per report
@sgiehl
Copy link
Member

sgiehl commented Apr 5, 2023

@diosmosis looks like various tests started to fail. Might be good having those fixed before a review.

@sgiehl sgiehl removed the Needs Review PRs that need a code review label Apr 5, 2023
@diosmosis diosmosis added the Needs Review PRs that need a code review label Apr 6, 2023
@diosmosis
Copy link
Member Author

php tests should be passing, UI test failures seem unrelated

@github-actions
Copy link
Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Apr 13, 2023
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Left a minor comment. Besides that the code looks fine.

@sgiehl sgiehl removed Needs Review PRs that need a code review Stale The label used by the Close Stale Issues action labels May 8, 2023
@diosmosis diosmosis added the Needs Review PRs that need a code review label May 9, 2023
@sgiehl sgiehl merged commit 86e5953 into 5.x-dev May 11, 2023
@sgiehl sgiehl deleted the process-dependent-archive-recursion-fixes branch May 11, 2023 12:47
sgiehl added a commit that referenced this pull request May 15, 2023
…dependent archives (#20679)

* fix two issues with handling of processing dependent archives: 1) setting whether an archiving request is the root one or not as an instance property of Parameters does not work because when querying archive data for child periods, we will create entirely new instances. so instead, use a static variable 2) fix edge case where Goals initiates archiving far more than necessary when there are no conversions (so no data in goals reports) but there are visits (so archiving will still be executed). this issue is far more visible now since we aggregate one blob at a time, and thus query archive IDs once per report

* archive ecommerce even if there are no conversions

* fix failing integration tests

---------

Co-authored-by: Stefan Giehl <stefan@matomo.org>
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 16, 2023
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 not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Development

Successfully merging this pull request may close these issues.

2 participants