Allow social & search definitions to be sourced locally by samjf · Pull Request #18023 · matomo-org/matomo · GitHub
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

Allow social & search definitions to be sourced locally #18023

Merged
merged 8 commits into from
Sep 21, 2021

Conversation

samjf
Copy link
Contributor

@samjf samjf commented Sep 16, 2021

Description:

Issue: DEV-2088

Introduced functionality:
This change allows Matomo to source search + social definitions yaml files locally, instead of reading them from remotely sourced updates.

If the introduced configuration variable is changed to 0 (false) then it will only ever load social and search definitions from the local YML files packaged with Matomo.

Existing behavior
How it works at the moment is that a weekly task will fetch the latest definition files from Matomo github. It will store this in the the Option table and retrieve it from the option table when definitions are requested and there is a cache miss.

Review

@samjf samjf marked this pull request as ready for review September 17, 2021 03:45
@samjf samjf added the Needs Review PRs that need a code review label Sep 17, 2021
Copy link
Member

@tsteur tsteur 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 quick comment @samjf I haven't tested yet but code looks good. Still needs to be tested (by me or some other reviewer)

@@ -833,6 +833,10 @@
; If set to 1, when rearchiving reports in the past we do not rearchive segment data with those reports. Default is 0.
rearchive_reports_in_past_exclude_segments = 0

; If set to 1, then social and search engine definitions files will be downloaded from Matomo remotely to update
Copy link
Member

Choose a reason for hiding this comment

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

These are actually downloaded from github see https://github.com/matomo-org/matomo/blob/4.4.1/plugins/Referrers/Tasks.php#L33-L49 and not from Matomo. This is something we need to improve in the future to "proxy" or serve them through Matomo servers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tsteur Thanks for that. I've made a change based on your suggestion :)

tsteur added a commit to matomo-org/matomo-for-wordpress that referenced this pull request Sep 20, 2021
refs matomo-org/matomo#18023

still keeping additionally though the checks to just ignore the tasks in https://github.com/matomo-org/matomo-for-wordpress/blob/4.4.2/plugins/WordPress/WordPress.php#L113-L114 just to make sure they won't be executed
config/global.ini.php Outdated Show resolved Hide resolved
@tsteur tsteur merged commit 85d46c8 into 4.x-dev Sep 21, 2021
@tsteur tsteur deleted the idev2088-addSettingLoadCoreSocialSearchDefinitions branch September 21, 2021 10:09
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.

3 participants