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

Only force single plugin archiving for root archive requests. #17250

Merged
merged 4 commits into from Feb 25, 2021

Conversation

diosmosis
Copy link
Member

Description:

If we don't do this, then no matter what, on pluginOnly archiving requests, we end up initiating archiving for subperiods, even if data exists.

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 Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Feb 23, 2021
@diosmosis diosmosis added this to the 4.3.0 milestone Feb 23, 2021
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Does it make sense to add some tests for that case?

@diosmosis
Copy link
Member Author

It would make sense. I couldn't think of an easy way to do it though, I'll think a bit more.

@diosmosis
Copy link
Member Author

@sgiehl added a test

@sgiehl
Copy link
Member

sgiehl commented Feb 24, 2021

There seem to be some failing tests. Not sure if it related to the changes here. Besides that it looks good to merge

@diosmosis diosmosis modified the milestones: 4.3.0, 4.2.1 Feb 24, 2021
@@ -330,7 +330,9 @@ public static function getSelectableDoneFlagValues($includeInvalidated = true, P

public static function isForceArchivingSinglePlugin()
{
if (!SettingsServer::isArchivePhpTriggered()) {
if (!SettingsServer::isArchivePhpTriggered()
|| Loader::getArchivingDepth() > 1
Copy link
Member

Choose a reason for hiding this comment

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

@diosmosis not sure yet I understand why Loader::getArchivingDepth() > 1 means we aren't forcing a single archive?

Copy link
Member Author

Choose a reason for hiding this comment

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

this method is more "are we forcing archiving because pluginOnly=1" rather than "are we forcing the creation of a single plugin archive". when archiving depth > 1, then we're archiving a child period. in this case we want to use what's available and not "force archiving even if there's something usable there".

so if someone activates MultiChannelConversionAttribution, and it invalidates a month in the past, then we see that pluginOnly=1&plugin=MultiChannelConversionAttribution, we know we need to force archiving for that period, even if there is a 'done' or 'done.MultiChannelConversionAttribution' archive there. for the weeks inside, however, we assume they are already archived by core:archive and we don't want this branch to force archiving of a new week.

hope that makes sense...

@diosmosis diosmosis merged commit 6ad02c9 into 4.x-dev Feb 25, 2021
@diosmosis diosmosis deleted the plugin-only-archiving-depth branch February 25, 2021 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants