[Bug] Scheduling re-archiving of custom reports results in archives being deleted for unrelated reports #21620
Closed
4 tasks done
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Regression
Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone
What happened?
When creating a new custom report, it schedules re-archiving so that the past n months (rearchive_reports_in_past_last_n_months) can be archived for the new report. Invalidation records are created for that specific report ID for the past n months. However, when archiving runs, it deletes the archives for other custom reports and doesn't archive the new report for those periods or re-archive the other reports.
What should happen?
The archives of existing reports should be untouched and the new report should be archived for the past n months, based on the
rearchive_reports_in_past_last_n_months
config.How can this be reproduced?
First, I run the
customreports:archive
command to make sure that all of the archives have been created:After creating a new custom report, the blob records are unchanged, but the re-archiving is scheduled:
When I run the archive process (
core:archive
) with a breakpoint before the API calls to archive:I confirmed that all of the invalidation records had the same report ID.
Once archiving is done running:
More information is available in my notes on Jira tickets PG-2881 and PG-3173
Matomo major version
Matomo 5
Matomo minor or patch Version
5.0.0-rc8
PHP version
8.1.26
Server operating system
Ubuntu 22.04
What browsers are you seeing the problem on?
Not applicable (e.g. an API call etc.)
Computer operating system
Ubuntu 22.04
Relevant log output
No response
Validations
The text was updated successfully, but these errors were encountered: