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

DB-IP URL is automatically updated in the options #16713

Merged
merged 3 commits into from Nov 17, 2020
Merged

DB-IP URL is automatically updated in the options #16713

merged 3 commits into from Nov 17, 2020

Conversation

nina-py
Copy link
Contributor

@nina-py nina-py commented Nov 13, 2020

Description:

Added a method called by the updater task that updates the DB-IP URL if needed to the latest downloaded one instead of the one set in the options when Matomo was initially installed. This removes much of the confusion at seeing a seemingly outdated URL being used on the GeoIP2 plugin page.

Would love to contribute a test as well but need to make sure I add the right test in the right place - I think a system test would be the right one for this method as I'd need to make sure an option was changed?

Tested the changes by manually setting the geoip2.loc_db_url option to https://download.db-ip.com/free/dbip-city-lite-2020-05.mmdb.gz in the database, then running the updater task with

./console core:run-scheduled-tasks "Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update"

Result - option set to https://download.db-ip.com/free/dbip-city-lite-2020-11.mmdb.gz and the plugin page now displays the latest URL in the "Download URL" field.

Fixes #16618.

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

Added a method called by the updater task that updates the DB-IP URL
if needed to the latest downloaded one instead of the one set
in the options when Matomo was initially installed. This removes much of
the confusion at seeing a seemingly outdated URL being used on the GeoIP2
plugin page.

Fixes #16618.
@tsteur tsteur added the Needs Review PRs that need a code review label Nov 15, 2020
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.

Tested the changes locally. Works as expected 👍

@sgiehl
Copy link
Member

sgiehl commented Nov 17, 2020

@tsteur Guess should be fine to merge that for 4.0 already. Feel free to do that or to move it to another milestone.

@tsteur tsteur merged commit e8f5cac into matomo-org:4.x-dev Nov 17, 2020
@tsteur
Copy link
Member

tsteur commented Nov 17, 2020

Thanks @nina-py very appreciated

@nina-py nina-py deleted the 16618-db-ip-url-automatic-option-update branch November 17, 2020 23:58
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.

Mention DB Lite DB will be automatically updated (filename etc)
3 participants