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

re-add missing condition for --skip-segments-today #16777

Merged
merged 5 commits into from Nov 30, 2020
Merged

Conversation

diosmosis
Copy link
Member

Description:

Fixes #16775

The missing condition was the only difference in the code I could see.

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

@diosmosis diosmosis added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Nov 24, 2020
@diosmosis diosmosis added this to the 4.0.1 milestone Nov 24, 2020
@sgiehl
Copy link
Member

sgiehl commented Nov 24, 2020

@diosmosis two Integration tests are failing. Guess it's unrelated to this PR. But would be good to fix them....

@tsteur
Copy link
Member

tsteur commented Nov 24, 2020

@diosmosis what happens if there is an archive_invalidation entry for this segment that is for today. Then it sends the request to archive. It thinks the segment was archived (but in reality it was skipped), and then it removes the archive_invalidation entry.

Would the segment still be archived the next day after midnight? Or maybe because there's no archive_invalidation entry it wold not be archived in that case? Could you double check this maybe?

@diosmosis
Copy link
Member Author

@tsteur I see, will add the check to QueueConsumer as well and test both cases.

@tsteur
Copy link
Member

tsteur commented Nov 26, 2020

@diosmosis let me know when it's pushed and we'll include it in 4.0.2.

@tsteur tsteur modified the milestones: 4.0.1, 4.0.2 Nov 26, 2020
@diosmosis
Copy link
Member Author

@tsteur finished the test

@tsteur tsteur modified the milestones: 4.0.2, 4.0.3 Nov 29, 2020
core/Archive.php Outdated
@@ -234,6 +234,15 @@ public static function factory(Segment $segment, array $periods, array $idSites,
$isMultipleDate);
}

// TODO: check period has today, not equals
Copy link
Member

Choose a reason for hiding this comment

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

@diosmosis is this a todo that still needs work? Looking at code it works fine as we only look at today anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not needed, I must have been thinking of non-day periods, but for some reason we don't skip those archives... oh that's because before if we skipped day, the logic to launch higher periods wouldn't be executed. This will be a problem now correct? If so it's needed.

Copy link
Member

Choose a reason for hiding this comment

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

Before we were still launching higher periods that include today @diosmosis

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, then not needed

@tsteur
Copy link
Member

tsteur commented Nov 30, 2020

Tested it quite a few times and worked for me 👍 left one comment regarding a comment in the code. otherwise feel free to merge @diosmosis 🚀

@tsteur tsteur merged commit c088113 into 4.x-dev Nov 30, 2020
@tsteur tsteur deleted the 16775-missing-cond branch November 30, 2020 03:23
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 not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--skip-segments-today no longer working in Matomo 4?
3 participants