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

add visitfrequency archiver to archive dependent archives #17168

Merged
merged 3 commits into from Feb 3, 2021

Conversation

diosmosis
Copy link
Member

Description:

Fixes #17123

@tsteur found the fix. The cause is since we call CoreAdminHome.archiveReports now instead of API.get, the dependent archive isn't implicitly created. Adding an archiver for VisitFrequency fixes this, though I'm not sure if we want to maintain the old behavior.

Review

  • Functional review done
  • 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 this to the 4.2.0 milestone Jan 30, 2021
@diosmosis diosmosis added 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. labels Jan 30, 2021
@tsteur
Copy link
Member

tsteur commented Jan 31, 2021

sounds good for now 👍 . I don't think it affects any other *.get methods so should be fine IMO

@diosmosis
Copy link
Member Author

@tsteur will also add an update to automatically invalidate, unless you think that's a bad idea.

@tsteur
Copy link
Member

tsteur commented Feb 1, 2021

@diosmosis I'm assuming this would mean we rearchive all the data from the last few months not just this report? cc @mattab

@diosmosis
Copy link
Member Author

@tsteur

I'm assuming this would mean we rearchive all the data from the last few months not just this report?

I think we can just re-archive visitfrequency from start of matomo 4 upgrade to now. We just need to trigger the VisitFrequency archiver which will process dependent archives. So we shouldn't need to do every archive.

@tsteur
Copy link
Member

tsteur commented Feb 1, 2021

👍 sounds good

@diosmosis
Copy link
Member Author

added the update file

Comment on lines +42 to +43
$invalidator = StaticContainer::get(ArchiveInvalidator::class);
$invalidator->scheduleReArchiving('all', 'VisitFrequency', null, $dateOfMatomo4Release);
Copy link
Member

Choose a reason for hiding this comment

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

Will that work when only browser archiving is used?

Copy link
Member Author

Choose a reason for hiding this comment

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

it shouldn't be necessary for browser archiving, since VisitFrequency.get will be requested and will trigger archiving in that case. this bug should only affect core:archive setups

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense. Looks good to merge then

@diosmosis diosmosis merged commit 6813f06 into 4.x-dev Feb 3, 2021
@diosmosis diosmosis deleted the visit-freq-archiver branch February 3, 2021 02:57
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.
Projects
None yet
3 participants