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

Add --skip-cache-clear option to core:update command … #17326

Merged
merged 1 commit into from Mar 10, 2021

Conversation

diosmosis
Copy link
Member

Description:

…so we don't have to clear caches when updating on an empty ec2 instance (for example). This PR uses a static member var to stop cache clears for the entire process since it is done once in the command, once in the CoreUpdater, and possibly multiple times in the plugin manager (if plugins are activated/deactivated for instance).

FYI @tsteur

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

…to clear caches when updating on an empty ec2 instance (for example).
@diosmosis diosmosis added the Needs Review PRs that need a code review label Mar 10, 2021
@diosmosis diosmosis added this to the 4.3.0 milestone Mar 10, 2021
if (self::$skipCacheClearOnUpdate) {
return;
}

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we reload the plugin information nevertheless? Wondering if it might cause weird issues when a plugin is updated, but the information isn't reloaded.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 that makes sense

Copy link
Member Author

Choose a reason for hiding this comment

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

skipping this change as discussed on slack

@diosmosis diosmosis merged commit cdbdb02 into 4.x-dev Mar 10, 2021
@diosmosis diosmosis deleted the skip-cache-clear-update branch March 10, 2021 23:05
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants