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

invalidate report data for segment in development mode triggers a warning in some cases #20440

Closed
tsteur opened this issue Mar 9, 2023 · 3 comments
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@tsteur
Copy link
Member

tsteur commented Mar 9, 2023

To reproduce have a segment with a definition: [email protected];pageUrl!@staging;pageUrl=@app;pageUrl!@cover.

Then run ./console core:invalidate-report-data ... to invalidate this segment.

This only happens when development mode is enabled.

Getting error:

WARNING [05:30:10] %extra.request_id% Avoiding segment subquery due to missing start date and/or an end date. Please ensure a start date and/or end date is set when initializing a segment if it's used to build a query. Stacktrace:
#0/core/Segment.php(435): Piwik\Segment->doesSegmentNeedSubquery('!@', 'pageUrl')
#1 //core/Segment.php(275): Piwik\Segment->getCleanedExpression(Array)
#2 /core/Segment.php(172): Piwik\Segment->initializeSegment('[email protected]...', Array)
#3 /plugins/CoreAdminHome/Commands/InvalidateReportData.php(253): Piwik\Segment->__construct('[email protected]...', Array)

#4 plugins/CoreAdminHome/Commands/InvalidateReportData.php(84): Piwik\Plugins\CoreAdminHome\Commands\InvalidateReportData->getSegmentsToInvalidateFor(Object(Symfony\Component\Console\Input\ArgvInput), Array, Object(Symfony\Component\Console\Output\ConsoleOutput))

@tsteur tsteur added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Mar 9, 2023
@sgiehl
Copy link
Member

sgiehl commented Mar 9, 2023

Sure that the invalidation doesn't work nevertheless? Looking at the code this is "only" a warning that is logged in development mode.

@tsteur
Copy link
Member Author

tsteur commented Mar 9, 2023

True 👍 Feel free to close it. After heaps of lines of warnings there's at the end actually a success message. It's a bit confusing/misleading but it works.
image

@mattab mattab changed the title Not possible to invalidate report data for segment in development mode invalidate report data for segment in development mode triggers a warning in some cases Mar 12, 2023
@michalkleiner
Copy link
Contributor

Closing the issue as this is an intentional behaviour when development mode is enabled.

Relevant previous issues/PRs: #16200 and #16512

@michalkleiner michalkleiner closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
@michalkleiner michalkleiner added wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants