-
Notifications
You must be signed in to change notification settings - Fork 38
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
[DX] Add core updates via Backdrop UI. #3105
Comments
This one can not be tested via sandbox; since sandboxes are downloading To test (I"m using lando so I can have drush and things I need):
lando init select backdrop
lando start
lando drush dlb backdrop --select Select an eld backdrop I chose
lando drush si --db-url=mysql://backdrop:backdrop@database/backdrop Make note of the username and password (you can install via UI as well, this is just a little faster if say you want to test this
wget https://patch-diff.githubusercontent.com/raw/backdrop/backdrop/pull/2186.patch
patch -p1 < 2186.patch you should see output similar to: geoff@yep backdrop exit code: [0] $ patch -p1 < 2186.patch
patching file core/modules/system/system.updater.inc
patching file core/includes/updater.inc
patching file core/modules/installer/installer.authorize.inc
patching file core/modules/installer/installer.manager.inc
patching file core/modules/installer/installer.module
patching file core/modules/system/system.module
Hunk #1 succeeded at 2113 (offset -48 lines).
Hunk #2 succeeded at 3829 (offset -48 lines).
patching file core/modules/system/system.updater.inc
lando drush cc all
|
Sorry if I lost something, but for doing such all document root should be writable for web-server? |
Who knew it was this easy?! It worked smoothly for me. I tested with Lando using @serundeputy's steps -- quite helpful! A few things:
Then when the click Available Updates it brings them to: which sadly makes it seem like all you can do is download the release and manually upgrade.
Update: I think I found the part in the code where it's just copying over the core directory. So if there are files outside of /core that need updating should it be flagged as can't update via UI? Or should there be a warning that people will need to do some manual steps after core is updated? |
Maybe we need to add ability for people to disable these updates in settings.php similar to how Wordpress does it https://codex.wordpress.org/Configuring_Automatic_Background_Updates. Or maybe not as part of this step since it's not automated and there are permissions already for updates. |
Haven't tested yet but will do so as soon as I can (looks awesome!). The screenshot brings to mind this issue: #3039 (e.g. core updates show up under "Update Modules"? Maybe it's time just to have a single "Update" page that lists core, modules, layouts, themes...) |
Wow, I've successfully updated a Backdrop 1.9.3 remote test site (on shared hosting) via the UI without any problem. Very promising! (Will try to do the same with another test site soon, just to see if it works with different hosting services.) |
@olafgrabienski, @laryn, @herbdool thanks for testing; if you test further download the latest patch please: wget https://github.com/backdrop/backdrop/pull/2186.patch |
cc'ing @mbaynton |
For .htaccess files (or other potential updates to root files), we typically parse them on status checks to make sure they have the needed information in them. Same thing for settings.php. If something is amiss in those core files, we have been (and should continue to) flag problems in Edit: Corrected to say we should not be overwriting. |
did you mean you agree |
@serundeputy I've tried to get the latest patch release for another test, using Maybe I didn't answer the "Assume" question during patching correctly? (The first time I answered with
|
Another thing: After updating, on
and
I guess, "Your projects have been downloaded and updated." should move above the "Next steps" section. |
@olafgrabienski since you already have a patch applied the new patch did not apply. You'll either want to start with a fresh install of Backdrop < 1.9.5 and apply the patch or Figure out the answers to apply the new patch on top of the old patch. I've just been blowing away the install and getting a new pre 1.9.5 backdrop release you can do that with: drush dlb backdrop --select thanks for testing! |
@serundeputy I don't see any difference on the status report after trying your latest patch. I think instead of linking the title "Security update required" we should make it an action: Update Backdrop and then we either reword "Download" to "Alternative: download" or something, or we get rid of it altogether. For those who are manually updating they already know how to get the file, everyone else will have a clear option to upgrade via the UI. |
thanks @herbdool
How we come to consensus has always been a mystery to me ;) ; let's see if others chime in. |
oh; i see you are saying no change on |
@herbdool I'm guessing either the patch isn't applied (maybe it failed) or cache. It is working for me: |
Nope, still no luck. The patch didn't fail--I tried it a second time and same result. And cleared the cache. I used this patch https://patch-diff.githubusercontent.com/raw/backdrop/backdrop/pull/2186.patch |
@herbdool looks like the right patch; disable cache all together? after applying the patch can you check one of the changed files for the expected change(s)? Like this one in |
@serundeputy That's what I did. Seems to be the same issue which happens to @herbdool. Going to disable cache now. |
i guess the removal of the |
Sounds reasonable! Anything we can change by ourselves there, or better wait for a revised patch? |
I'm not sure why the patch works for me and not for you or @herbdool different os? I'm on: geoff@yep backdrop (1.x) exit code: [0] $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.4
BuildVersion: 17E202 and the command i issue for the patch is: patch -p1 < 2186.patch |
@klonos before testing this again, can you check the patch file? Remove all sections relating to .swp binary and patch with that. |
I'm running this on a client site right now. So far, no issues. But I haven't tried a minor version update (only bug fixes) so I'm hesitant provide a review until after 1.11 is out. |
On yesterday's weekly Backdrop video meeting there was a discussion if to provide core updates via UI with the 1.11 release because the feature would be much easier to test when it's in the release. In my opinion it would help a lot to have easier testing conditions. On the other hand I see a certain risk of critical issues with the core updates via UI, just because we haven't tested the feature very deeply, nor in many different hosting situations. What about to hide the Core UI update feature somehow, or/and to give a statement in the help text that it's still in an experimental status? |
Should this functionality to be mandatory, or can be disabled/skipped somehow? |
@findlabnet The core update via Backdrop's UI isn't mandatory. You'll still be able to update Backdrop core in the usual way, replacing the old "core" directory with a newer one, as currently described here: https://backdropcms.org/upgrade#minor-updates. That said, when we're getting closer to provide also automatic core updates, I expect a discussion about the option how to disable / skip them - see for instance #2018 (comment). |
So, before we sell something spare, we must to buy it? |
Yes, absolutely! I had this same thought today but you two beat me to suggesting it. Let's included this core update functionality in 1.11.0 but hide it. We can enable it by default in a later release. We already have an In fact it would be great to have all of the various installation/updating options be able to be toggled (e.g. So we need the following:
At this point, I don't think any UI for toggling the option is needed. |
How would I enable the feature for testing purposes: just change a configuration file? |
squashed commits to remove |
@olafgrabienski yes, you'd have to edit the installer.settings.json file. |
based on @quicksketch suggestions I've attached a patch backdrop/backdrop#2201 (comment). I could make a PR if @serundeputy can't do it before the deadline. |
@serundeputy as per @quicksketch suggestion, I've created a PR backdrop/backdrop#2289 |
I've tested out @herbdool's additions at backdrop/backdrop#2289 and they look great! As we've already tested this prior to the disabling option, I think we're good to go here. I've merged in backdrop/backdrop#2289. Thanks everyone, especially @serundeputy for his direct and simple approach to this problem. This is an exciting development and I'm so glad we came up with a way to proceed on this. Woot! |
Follow-up to enable after 1.11.0 is released: #3271 |
Wow! went to work on this today and it's merged! Amazing job everyone! |
As a followup to this, can we move all update links to one place please? Like a top-level |
@docwilmot I think we have an issue for that... Maybe #2714 ? |
Describe your issue or idea
In #2018 we are interested in providing the ability for automatic updates to Backdrop core. As an initial step towards that goal this issue adds the ability to manually update Backdrop core via UI at
/admin/modules/update
Actual behavior (if reporting a bug)
Currently at
/admin/modules/update
core updates are relegated to there ownManual
section that prompts the user to download Backdrop and then move the files around themselves via server tools or cli.Expected behavior (if reporting a bug)
Allow updating of core by selecting the core update from
/admin/modules/update
from the list the same way you can update modules.Relevant version/system information (if applicable)
1.x
PR: backdrop/backdrop#2186this one wascorrupted
w/.swp
filePR: backdrop/backdrop#2201PR: backdrop/backdrop#2289
The text was updated successfully, but these errors were encountered: