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

Fix determine segment rearchive date #17505

Merged
merged 1 commit into from Apr 30, 2021
Merged

Fix determine segment rearchive date #17505

merged 1 commit into from Apr 30, 2021

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Apr 27, 2021

Description:

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • 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

@sgiehl sgiehl 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 Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Apr 27, 2021
@sgiehl sgiehl added this to the 4.3.0 milestone Apr 27, 2021
@sgiehl sgiehl requested a review from tsteur April 27, 2021 08:31
} else if (preg_match("/^editLast([0-9]+)$/", $this->processNewSegmentsFrom, $matches) && !empty($segmentLastEditedTime)) {
} else if (preg_match("/^editLast([0-9]+)$/", $this->processNewSegmentsFrom, $matches)) {
if (empty($segmentLastEditedTime)) {
return null;
Copy link
Member

Choose a reason for hiding this comment

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

was going to say here we could maybe fall back to Date::now() but I suppose it's not really needed anyway as we should always have an edited time.

Copy link
Member Author

Choose a reason for hiding this comment

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

An empty edit time shouldn't happen, indeed. Nevertheless assuming Date::now() when it wouldn't be set for any reason would only be correct if we assume this method is only called when the segment had been edited/created.

Copy link
Member

Choose a reason for hiding this comment

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

👍 all good, it's not needed. LGTM

Copy link
Member

@tsteur tsteur left a comment

Choose a reason for hiding this comment

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

LGTM. Left one comment to look at optionally but not too important.

@sgiehl sgiehl merged commit 8e2531c into 4.x-dev Apr 30, 2021
@sgiehl sgiehl deleted the segmentrrearchive branch April 30, 2021 08:01
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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants