Updates aren't applied when enabling module via drush, but when enabling it from extend menu, you'll get updates applied. Due to this, you might get randomly 200+ language files updated by simply enabling module that's not any way related to the pile of files.

Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!

CommentFileSizeAuthor
#2 2807949-update-2.patch1.31 KBtim.plunkett

Issue fork drupal-2807949

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Dropa created an issue. See original summary.

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Update only hooks into the UI for installing/uninstalling modules. It should do what it does for themes, and run anytime things are installed/uninstall, regardless.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tedbow’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Looks good but it would be good if we had tests. Could we install a module directly to from the module_installer service to test this?

tedbow’s picture

I chatted with @kunal.sachdev about and making a test for this.

This could probably be a kernel test. If we look at update_storage_clear() it just clears 2 keyvalue collecitons

function update_storage_clear() {
  \Drupal::keyValueExpirable('update')->deleteAll();
  \Drupal::keyValueExpirable('update_available_release')->deleteAll();
}

So for the test we should:

  1. make sure the Update module is enabled
  2. add 1 key with 1 value under each of these keyvalue store collections
  3. install another module like $this->container->get('module_installer')->install(['help'])
  4. ensure that the keys we set in step 2 are empty.

kunal.sachdev made their first commit to this issue’s fork.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kunal.sachdev’s picture

Status: Needs work » Needs review
tedbow’s picture

Status: Needs review » Needs work

@kunal.sachdev this is looking good!

Needs work for MR comments. We also should have `test-only` branch so we can prove the tests fail without the changes to `update.module`

kunal.sachdev’s picture

Created new branch 'test-only' to prove that the tests fail without the changes in `update.module`.

kunal.sachdev’s picture

Status: Needs work » Needs review
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @kunal.sachdev.

Looks good!

  • catch committed 5f332d8 on 10.0.x
    Issue #2807949 by kunal.sachdev, tim.plunkett, tedbow, Dropa: update....
  • catch committed c66b1ce on 9.4.x
    Issue #2807949 by kunal.sachdev, tim.plunkett, tedbow, Dropa: update....
catch’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs tests

This looks good.

While no contrib module uses update_storage_clear_submit() and I think it's fine to remove without any notification, I'm only going to backport this to 9.4.x just in case. Another option here would have been to deprecate the submit handler for removal in 10.0.x (without test coverage, just the @deprecated and trigger_error()), but with no real-world uses that also seems like noise.

tedbow’s picture

@catch thanks for committing this. I think with just 8 followers for a 6 year old issue I don't think there is great need to backport this to 9.3.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.