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

Support for multiple download sources on update servers #18926

Merged
merged 6 commits into from Dec 2, 2017

Conversation

Projects
None yet
8 participants
@mbabker
Member

mbabker commented Nov 30, 2017

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:

  • Introduces a new <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
    • In thinking about that implementation more, I started to worry that all currently released Joomla versions might not cope very well with having multiple <downloadurl> tags which would cause more issues in serving updates, so I think a new tag is going to be the absolute safest option
  • Introduces a new PHP class acting as a data object to give a standardized PHP definition of the new <downloadsource> tag
    • This will also allow us to standardize and implement the additional attributes that are present on the tag but unused
  • Conceptually doing a "soft" reservation on the tag attributes and defining standardized values allows us to revisit PRs like #11497 and work on optimizing the packages served through the update component for the various update/install paths instead of always serving the largest of the packages we have (so the 3.8.1 to 3.8.2 update could receive the optimized 1.07 MB ZIP file instead of requiring the full 11.37 MB ZIP file, less bandwidth expense and a smaller number of files to process in the update cycle, everyone wins)

Testing 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.

@zero-24 zero-24 self-assigned this Nov 30, 2017

@Septdir

This comment has been minimized.

Show comment
Hide comment
@Septdir

Septdir Dec 2, 2017

Contributor

I tested it. Updating joomla is working.
I like this realization. @mbabker at you it was excellent it turned out to unite and to improve all offered variants of realization

P.S I'm attaching plg_system_testtalt_1.0.0.zip for testing com_installer.
Update manifest https://joomla.septdir.ru/updateserver/pluginalt.xml

Contributor

Septdir commented Dec 2, 2017

I tested it. Updating joomla is working.
I like this realization. @mbabker at you it was excellent it turned out to unite and to improve all offered variants of realization

P.S I'm attaching plg_system_testtalt_1.0.0.zip for testing com_installer.
Update manifest https://joomla.septdir.ru/updateserver/pluginalt.xml

@effrit

This comment has been minimized.

Show comment
Hide comment
@effrit

effrit Dec 2, 2017

Also tested it.
Successfully updated from the local server, which normally can not get the updates due to Internet provider blocking the sub-domain of Amazon.
@mbabker, thank you very much!

effrit commented Dec 2, 2017

Also tested it.
Successfully updated from the local server, which normally can not get the updates due to Internet provider blocking the sub-domain of Amazon.
@mbabker, thank you very much!

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Dec 2, 2017

@Septdir @effrit please mark your Test as successfully:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as successfully
  • hit "submit test result"

franz-wohlkoenig commented Dec 2, 2017

@Septdir @effrit please mark your Test as successfully:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as successfully
  • hit "submit test result"
@Septdir

This comment has been minimized.

Show comment
Hide comment
@Septdir

Septdir Dec 2, 2017

Contributor

@franz-wohlkoenig This PR is an enhancement of my #18547 I'm not sure whether I can mark Test as successfully

P.S At night, I did't test com_installer. Now tested. Everything works as it should.

Contributor

Septdir commented Dec 2, 2017

@franz-wohlkoenig This PR is an enhancement of my #18547 I'm not sure whether I can mark Test as successfully

P.S At night, I did't test com_installer. Now tested. Everything works as it should.

@pavluk

This comment has been minimized.

Show comment
Hide comment
@pavluk

pavluk Dec 2, 2017

I have tested this item successfully on 9ce52d7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926.

pavluk commented Dec 2, 2017

I have tested this item successfully on 9ce52d7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926.

1 similar comment
@effrit

This comment has been minimized.

Show comment
Hide comment
@effrit

effrit Dec 2, 2017

I have tested this item successfully on 9ce52d7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926.

effrit commented Dec 2, 2017

I have tested this item successfully on 9ce52d7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18926.

@franz-wohlkoenig

This comment has been minimized.

Show comment
Hide comment
@franz-wohlkoenig

franz-wohlkoenig Dec 2, 2017

Ready to Commit after two successful tests.

franz-wohlkoenig commented Dec 2, 2017

Ready to Commit after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC label Dec 2, 2017

@zero-24 zero-24 removed their assignment Dec 2, 2017

@zero-24 zero-24 added this to the Joomla 3.8.3 milestone Dec 2, 2017

@wilsonge wilsonge merged commit 5153379 into joomla:staging Dec 2, 2017

5 checks passed

JTracker/HumanTestResults Human Test Results: 2 Successful 0 Failed.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound No violations found. Woof!

@joomla-cms-bot joomla-cms-bot added PR-staging and removed RTC labels Dec 2, 2017

@wilsonge

This comment has been minimized.

Show comment
Hide comment
@wilsonge

wilsonge Dec 2, 2017

Contributor

Nice work. Thanks @mbabker !

Contributor

wilsonge commented Dec 2, 2017

Nice work. Thanks @mbabker !

@mbabker mbabker deleted the mbabker:pr/18547-enhanced branch Dec 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment