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

Added support to pass segment in Archiving.getIdSitesToMarkArchivesAsInvalidated event #19876

Merged
merged 6 commits into from Oct 20, 2022

Conversation

AltamashShaikh
Copy link
Contributor

Description:

Added support to pass segment in Archiving.getIdSitesToMarkArchivesAsInvalidated event.
Fixes: #PG-820

Review

@AltamashShaikh AltamashShaikh added the Needs Review PRs that need a code review label Oct 18, 2022
@@ -310,7 +310,7 @@ public function markArchivesAsInvalidated(array $idSites, array $dates, $period,
*
* @param array &$idSites An array containing a list of site IDs which are requested to be invalidated.
*/
Piwik::postEvent('Archiving.getIdSitesToMarkArchivesAsInvalidated', array(&$idSites));
Piwik::postEvent('Archiving.getIdSitesToMarkArchivesAsInvalidated', array(&$idSites, $segment));
Copy link
Member

Choose a reason for hiding this comment

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

Passing only the segment here actually looks a bit random. Why not also passing the dates, period or the name. Might all be something that could be relevant in some cases.
Also when updating events, you should update the comment above, so it describes all parameters. And it might be good to mention the change in the changelog, so developers are aware of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sgiehl Started passing dates, period, segment and name parameter as suggested.
Also updated CHANGELOG.md please check if that't the correct way to update it.

Copy link
Contributor

@bx80 bx80 left a comment

Choose a reason for hiding this comment

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

@bx80 bx80 merged commit aa379e1 into 4.x-dev Oct 20, 2022
@bx80 bx80 deleted the PG-820-pass-segment branch October 20, 2022 00:37
@tsteur
Copy link
Member

tsteur commented Oct 20, 2022

Just seeing this was merged into 4.x-dev. Not sure if it was supposed to be merged into 5.x-dev see also the changelog entry in this PR and if this can cause any notices/regression or so regarding the additional parameter in the event?

@AltamashShaikh
Copy link
Contributor Author

@tsteur My bad I opened the PR to be merged in 4.x-dev, what should we do here ?
Open a new PR for 5.x ?

@AltamashShaikh AltamashShaikh restored the PG-820-pass-segment branch October 20, 2022 03:29
@tsteur
Copy link
Member

tsteur commented Oct 20, 2022

Ideally we would revert the PR. There's a button to do this easily
image

AltamashShaikh added a commit that referenced this pull request Oct 20, 2022
bx80 pushed a commit that referenced this pull request Oct 20, 2022
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 16, 2023
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.

None yet

4 participants