Skip to content
Snippets Groups Projects

Issue #3255320: ReadinessCheckEvent should have CronUpdater instance if cron updates are enabled

Merged Issue #3255320: ReadinessCheckEvent should have CronUpdater instance if cron updates are enabled

Merge request reports

Approval is optional

Merged by Adam G-HAdam G-H 3 years ago (Jan 19, 2022 8:47pm UTC)

Merge details

  • Changes merged into with 6a3f2d7c.
  • Did not delete the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Adam G-H
  • Adam G-H
  • 187 // Re-running the readiness checks now should mean that when we display
    188 // cached errors in automatic_updates_page_top(), we'll see errors that
    189 // were raised during this run, instead of any previously cached results.
    190 $errors = $this->readinessValidationManager->run()
    191 ->getResults(SystemManager::REQUIREMENT_ERROR);
    192
    193 if (empty($errors)) {
    189 $results = $this->getReadinessErrors($recommended_release->getVersion());
    190 if (empty($results)) {
    194 191 $form['actions'] = $this->actions($form_state);
    195 192 }
    193 else {
    194 $this->messenger()->addError($this->getFailureMessageForSeverity(SystemManager::REQUIREMENT_ERROR));
    195 foreach ($results as $result) {
    196 $messages = $result->getMessages();
    197 $message = count($messages) === 1 ? $messages[0] : $result->getSummary();
    • There are other instances in the module where we need to collapse a validation result into an array of messages (and possibly a summary). We should have a method for this in ValidationResult, like ValidationResult::toArray(): string[]. I'm okay with doing that in a follow-up.

    • Author Maintainer

      The only place we have this exact logic and need in \Drupal\automatic_updates\Validation\AdminReadinessMessages::displayResultsForSeverity().

    • Please register or sign in to reply
  • Adam G-H
  • Adam G-H
  • Adam G-H
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading