Problem/Motivation
Right now if you install Automatic Updates won't know if your system is compatible until you go to the update form or the status report page.
Steps to reproduce
Proposed resolution
We should display a message to the use who has just installed so they would know if there is a problem that would prevent them from using it and prompt them to view the status report
We already run the the checks in `automatic_updates_modules_installed` but because cron updates are disabled
status checks aren't displayed on admin page.
But installing in automatic updates is a special case where we should always let the user know if there is a problem
Remaining tasks
User interface changes
Issue fork automatic_updates-3306283
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
Comment #2
tedbowI marked it as minor because as soon as they went to the form they would see the messages.
Comment #3
phenaproximaDoesn't this, like, already happen, though? In
automatic_updates_modules_installed()? Or is that merely reacting to other modules being installed?The relevant line from ModuleInstaller would seem to suggest that it's invoked even in the modules that were installed:
Maybe all we really need here is better test coverage. Thoughts?
Comment #4
phenaproximaConfirmed with manual testing that, in fact, installing Automatic Updates DOES NOT run readiness checks in the UI. So this feature request is legitimate.
Comment #5
tedbowComment #6
omkar.podey commentedComment #8
omkar.podey commentedComment #10
tedbowafter talking with @phenaproxima we decided to just display a message that there are errors and that the user should check the status report. I updated the summary.
This new solution will mean we don't need any changes to
\Drupal\automatic_updates\Validation\AdminStatusCheckMessagesComment #11
tedbowSee the summary for the new proposed solution
Comment #12
omkar.podey commentedComment #13
tedbow@omkar.podey sorry to change approached but see the comment https://git.drupalcode.org/project/automatic_updates/-/merge_requests/55...
Let me know if you questions or concerns about that approach
Comment #14
omkar.podey commentedComment #15
tedbowa couple points on the merge request. but looking good👍
Comment #16
tedbowupdated title, we should make sure summary matches new proposed solution
Comment #17
omkar.podey commentedComment #18
wim leers12 remarks on the MR 🤓
Comment #19
omkar.podey commentedComment #20
wim leersLast round of review from me; then the code will be clear. Then I'll RTBC and @tedbow can do the final review :)
Note: the issue summary still needs to be updated!
Comment #21
tedbowNeeds work based on MR comments(I think the status should have been Needs Review)
Comment #22
omkar.podey commentedWe need test coverage for
tests/modules/automatic_updates_test_cronto verify it's behaviour in tests when the module is disabled.Comment #23
omkar.podey commentedWe want to call displayResultSummary() from automatic_updates_modules_installed() in automatic_updates.module but the Enabler class in automatic_updates_test_cron is not called early enough to change default disabled cron update.
Comment #24
wim leersA work-around for #23 is possible.
6acc61cf failed like this:
i.e. it expected that
Your site does not pass some readiness checks for automatic updatesappeared only once, but it appeared twice.See commit 8105c059aae1413f037a4c99d1dcadbf9c9ce8d3.
Now it should fail like this:
… because the test is AFAICT wrong.
Comment #25
tedbowAdding a "If cron updates are disabled to the title." needs to reflected in summary too
Comment #26
tedbowComment #27
tedbowComment #28
omkar.podey commentedNow testing doesn't contain the cases when cron updater is enabled, because we now we have default cron set to disable in automatic_updates.settings.yml and I think that will be the case whenever automatic_updates is enabled.
If there is a case when we want to simulate enabling automatic_updates with cron updates enabled then it's difficult because to enable cron updates in tests we need automatic_updates.settings.yml which won't be available until we have automatic_updates enabled.
Comment #29
omkar.podey commentedComment #30
tedbowComment #32
tedbowThanks!