Support for multiple download sources on update servers #18926
Conversation
I tested it. Updating joomla is working. P.S I'm attaching plg_system_testtalt_1.0.0.zip for testing com_installer. |
Also tested it. |
@Septdir @effrit please mark your Test as successfully:
|
@franz-wohlkoenig This PR is an enhancement of my #18547 I'm not sure whether I can mark P.S At night, I did't test com_installer. Now tested. Everything works as it should. |
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926. |
1 similar comment
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926. |
Ready to Commit after two successful tests. |
5153379
into
joomla:staging
Nice work. Thanks @mbabker ! |
I would like to update the documentation but first want to go sure if the following example code is correct (your manifest examples above aren't available anymore). And because it uses the Joomla package. Thank you!
|
Looks about right. You can find the latest version here https://github.com/joomla/update.joomla.org/blob/master/www/core/sts/extension_sts.xml#L168-L191 |
Summary of Changes
This is an enhancement of #18547 to introduce support for multiple download sources (AKA mirrors) to the update server library. See the original PR for all the basics.
I have made a couple of core tweaks to the concept to allow us to be minimally disruptive to past releases while also enable us to expand the API and be able to implement other missing features in the update system. In short:
<downloadsource>
tag to be used under the<downloads>
tag, this is different than the original PR which tweaked the update library to support multiple<downloadurl>
tags<downloadurl>
tags which would cause more issues in serving updates, so I think a new tag is going to be the absolute safest option<downloadsource>
tagTesting Instructions
With the patch applied, go into the update component, set the update channel to "Custom URL" and use the URL https://developer.joomla.org/test-update-server/list_sts.xml as your server. Then try to update Joomla (this will use a nightly build, so it WILL undo the changes from this patch). The update should work.
Note this server is purposefully provisioned so that it should fail on the first two download attempts, the first using the existing
<downloadurl>
tag and the second the first element of the new download sources array. So a successful update purposefully only happens after a couple of failures to validate the fallback behavior works.Documentation Changes Required
The update server documentation should be expanded to document the new tag/options.