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
Detect idaction columns automatically in LogDataPurger using ActionDimension #7964
Conversation
c4f2442
to
af0b0fe
Compare
…into new class named DimensionMetadataProvider.
…ToDeletePerQuery can be set using values from the DB, make them function parameters instead of service state. Change made in anticipation of move to DI.
af0b0fe
to
e96de39
Compare
* | ||
* @return bool | ||
*/ | ||
public function isActionReference() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we put this method in ActionDimension
it should be marked as @ignore
or better @internal
and maybe even marked as final
as developers should not be able to change that behaviour. Or maybe it is possible to put it in a different class? Not sure what it could be called though.
Maybe also some other "ignored" methods could be moved out of that class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can move it to DimensionMetadataProvider as a private method. It's not used anywhere else (I didn't do any refactoring). Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my bad! I was just looking over all pull requests and didn't notice the missing needs review :) It would be somehow nice to have it somewhere public or protected to still have it testable. If it's indirectly covered by tests of this class then it could be okay to have it as a private method. I'm just scared someone might eg remove the Exception
from getActionId
and then this code will not work as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will still be covered, ie, there will be a test failure. Ok, will move it to a private method.
…n columns from dimension metadata (and keep others hardcoded). Also apply override override array that was previously ignored.
…t whether content impressions are correctly purged/preserved.
9b5f3b5
to
94a253a
Compare
Ready for review + merge. Will fix build errors once the build finishes. |
👍 |
Detect idaction columns automatically in LogDataPurger using ActionDimension metadata. Also, added LogDataPurger to DI and allow monkey patching of DimensionMetadataProvider.
This PR refactors the LogDataPurger, moving the idaction column detection logic to an new class DimensionMetadataProvider. This class detects idactions by going through Dimension metadata classes, in addition to specifying hardcoded columns.
Also includes the following changes:
Refs #7958