-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Adjust day to fetch new geo location databases when done monthly #21468
Conversation
When geolocation database updates are configured to be done monthly, they were scheduled on the 3rd day of _the week_, so Wednesday. For months that start on a Wednesday, that means that we tried to fetch a file that might not exist yet. We now schedule on the 3rd day of _the month_, as I believe was the original intent of dc98a97 that introduced the behavior a long time ago. So this gives 3 days to db-ip.com to update their files in all cases. Fixes matomo-org#18427
I think the CI failures are unrelated to this PR, but could somebody confirm that, please ? |
Thank you for the contribution @PowerKiKi. My instinct says this would help with the issue but doesn't really address the possibility the files are not yet available, regardless of what day of the month or week the check is performed. I'd say we should address that rather than just pushing the check a few days back. |
That makes senses to also better handle the failed fetch. But I think they are complementary. The present situation where the delay is between 0 to 6 days, "randomly", depending on the current month, does not make any sense to me. So I think it should be fixed anyway. Then, in addition to that, having a mechanism that gracefully handle failure by, maybe, trying again the next day, until success, could be a further improvement. But I don't think I'd have time to work on that myself. |
@PowerKiKi solution is an efficient edit to fix an actual software malfunction. The service providing GEOIP updates, may needs from 3 to 6 hours to get things done. Also it rarely happens. |
I'm going to merge this one. Using |
When geolocation database updates are configured to be done monthly, they were scheduled on the 3rd day of _the week_, so Wednesday. For months that start on a Wednesday, that means that we tried to fetch a file that might not exist yet. We now schedule on the 3rd day of _the month_, as I believe was the original intent of dc98a97 that introduced the behavior a long time ago. So this gives 3 days to db-ip.com to update their files in all cases. Fixes #18427
When geolocation database updates are configured to be done monthly, they were scheduled on the 3rd day of _the week_, so Wednesday. For months that start on a Wednesday, that means that we tried to fetch a file that might not exist yet. We now schedule on the 3rd day of _the month_, as I believe was the original intent of dc98a97 that introduced the behavior a long time ago. So this gives 3 days to db-ip.com to update their files in all cases. Fixes #18427
When geolocation database updates are configured to be done monthly, they were scheduled on the 3rd day of _the week_, so Wednesday. For months that start on a Wednesday, that means that we tried to fetch a file that might not exist yet. We now schedule on the 3rd day of _the month_, as I believe was the original intent of dc98a97 that introduced the behavior a long time ago. So this gives 3 days to db-ip.com to update their files in all cases. Fixes #18427
Description:
When geolocation database updates are configured to be done monthly, they were scheduled on the 3rd day of the week, so Wednesday. For months that start on a Wednesday, that means that we tried to fetch a file that might not exist yet.
We now schedule on the 3rd day of the month, as I believe was the original intent of dc98a97 that introduced the behavior a long time ago. So this gives 3 days to db-ip.com to update their files in all cases.
Fixes #18427
Review