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
Add ability for Archivers to initiate archiving for other plugins & use in Goals #13105
Conversation
Closing for now, identified performance issue w/ these changes |
FYI @tsteur modified this PR to initiate archiving for dependent plugins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, but tests need an update
plugins/Goals/Goals.php
Outdated
@@ -19,6 +19,7 @@ | |||
use Piwik\Plugins\CoreHome\SystemSummary; | |||
use Piwik\Tracker\GoalManager; | |||
use Piwik\Category\Subcategory; | |||
use Piwik\Plugins\VisitFrequency\API as VisitFrequencyAPI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guess that can be removed again
faf32e0
to
ac98811
Compare
0845a6d
to
8626353
Compare
Updated. |
@diosmosis there are still a few failing tests in PrivacyManager plugin |
Updated the data purging test & verified the new numbers were correct |
core/Segment.php
Outdated
if (empty($segmentCondition) | ||
|| strpos($segment, $operator . $segmentCondition) !== false | ||
|| strpos($segment, $segmentCondition . $operator) !== false | ||
|| $segment === $segmentCondition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering... here we may need to also check against urlencoded
values and urldecoded
? It is this funny thing with segments that they may be urlencoded or not for some reason. No idea whether this would be a thing here during archiving or if they have all same format. Just wanted to mention it.
…se in Goals (matomo-org#13105) * Add required segments for Goals.get to known segments to archive list. * Add test to ArchiveCronTest. * Allow archiving dependent archives in Goals Archiver. * Clean up last commit & use Segment::combine in more places. * skip dependent processing if same plugin/segment * Move ArchiveCronTest to CoreConsole plugin since it is rather long running. * Fixing tests. * Remove use statements. * Fix tests dependent on archive tables. * check w/ urlencoded/decoded segment/condition in Segment::combine(). * Another test fix * final test fix
Changes:
Archiver:: processDependentArchive()
method that can be used by plugin archivers that depend on reports in other plugins. Ensures that the archive is processed w/ a segment just for that plugin, and not, eg, for every plugin.ArchiveProcessor\Params::$isRootArchiveRequest
used to identify if a request is the initial archiving request or if it is part ofprocessDependentArchive()
.Segment::combine()
method that combines one segment w/ another.Fixes #12706