-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[5.1] Add update channel reset to Joomla Update Component #43717
base: 5.1-dev
Are you sure you want to change the base?
[5.1] Add update channel reset to Joomla Update Component #43717
Conversation
Add installer script to com_joomlaupdate for reset of the core update channel from "next" to "default" when updating the component.
Reset the core update channel from "Next" to "default" at the end of an update.
If we can offer the updates in the same way as before then do we really need to even update the update component? |
@brianteeman Like I wrote in the description:
|
that doesnt answer my question. never mind. i obviously speak a different language to everyone else and cannot express myself |
@brianteeman It does answer your question. When updates will always be provided on both channels then this PR is not necessary. But I doubt that will be the case, I think it will be only done this time. Anyway that’s not my decision. |
P.S. And as described, this PR here doesn’t include the part from the other PR which requires the extra component update. |
Why not - it has been that way for ages and if it has now been established that it can be done that way again why change. I just dont see the reason for the change. I am on holiday now so cant check but what happens when you update from the cli |
@brianteeman Sorry, you were right, I misunderstood your question first.
Yes, that would be the best. But it might require some additional work for those who deploy the updates to TUF - I am not involved in that so I don’t know if that is the way to go.
I haven’t checked that either so it would be good if someone could check. |
I am having some issues testing this but so far I have observed that the error page is Should the error page url not be |
@brianteeman That in case of error the component layout is used is nothing new from my PR. It was once introduced by Fedir when he improved error reporting and logging of the update component. |
Pull Request for Issue #43591 .
Alternative to PR #43695 .
Summary of Changes
This pull request (PR) adds a function to the Joomla Update Component to automatically reset the update source (update channel) to "Default" in the component's options at the end of each CMS core update when it was set to "Joomla Next" before the update.
It is equal to part 1 of PR #43695 and can be used instead of that PR when it turns out (needs to be tested by maintainers) that the update to the upcoming 5.1.2 can be offered on the "Default" source (channel "5.x" for TUF) as well as (with a different zip file name) on the "Joomla Next" source (channel "6.x" for TUF) so that it does not need a separate extra update of the Joomla Update Component to reset the update source in order to find the core update after that, which was part 2 of the other PR.
The reset after each update provided with part 1 of the other PR or with this PR here makes still sense, except if we want to provide updates on both channels in parallel also in the future and not only this one time to fix the issue.
Find more details in the description of the other PR #43695 .
Testing Instructions
Update the CMS core by uploading in the Joomla Update Component the patched zip package created by Drone for this PR.
You can download that package here: https://artifacts.joomla.org/drone/joomla/joomla-cms/5.1-dev/43717/downloads/76941/
Do several tests with different starting conditions regarding the update source set in the Joomla Update Component's options:
When using "Custom URL" you can use the custom URL created by Drone for this PR instead of uploading the package. You can find that custom URL at the same place where you could find the patched package.
In addition, do the same different tests using the following modified package for upload: https://test5.richard-fath.de/Joomla_5.1.2-dev+pr.43717-Development-Update_Package_error.zip
When using "Custom URL" you can use the following custom URL to update to that modified package: https://test5.richard-fath.de/pr-43717-test-error_list.xml
The modified package provokes a database error in order to test what happens when the reset of the update source fails. It can also be used to check that the reset does not take place when the update source is not "Joomla Next" before the update.
It does not need to fall back to the same starting conditions after each test, you can just upload the package again in the update component. But you should use a new browser session after each test.
Actual result BEFORE applying this Pull Request
When you are still on the "Joomla Next" update channel after an update from 4.4 to 5.1, there will not be any update found for the CMS core until 6.0.0-alpha1 will be released, and then only updates to 6.0 releases will be found, so you will miss any further updates for 5.1 until that time has come.
There is no notification about that and no automatic reset after the update.
Expected result AFTER applying this Pull Request
When having the update source (update channel) set to "Joomla Next" in the Joomla Update Component's options before that update, the update source is rest to "Default" at the end of the update, and a success message is shown about that:
![test-core-update-reset-ok](https://private-user-images.githubusercontent.com/7413183/341987026-f1849213-4b6e-4e7f-8b7d-2539be9b7c8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MjIxNTYsIm5iZiI6MTcxOTgyMTg1NiwicGF0aCI6Ii83NDEzMTgzLzM0MTk4NzAyNi1mMTg0OTIxMy00YjZlLTRlN2YtOGI3ZC0yNTM5YmU5YjdjOGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDFUMDgxNzM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWIyY2FkY2Q4MTk5YTZhYjBhYzEwZDA3ZGJjZGU2ZmRiZWM1MTFiM2NhZTg2YTEyMWIzNjU4Y2U0ZjFiMTllNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.VTFxe8U-0Y4U42VV7eDiedBo-_DxqBM0VsdO1vA-7q8)
When under the same conditions an error happens with that reset, e.g. due to a database problem, the usual error layout is shown with all details, and in addition a warning message is shown at the top, telling the user to manually reset the update source:
![test-core-update-reset-error](https://private-user-images.githubusercontent.com/7413183/341987149-452f0bbf-bba4-46a1-9fe4-0d6bc89d7782.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MjIxNTYsIm5iZiI6MTcxOTgyMTg1NiwicGF0aCI6Ii83NDEzMTgzLzM0MTk4NzE0OS00NTJmMGJiZi1iYmE0LTQ2YTEtOWZlNC0wZDZiYzg5ZDc3ODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDFUMDgxNzM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGFhNzE2MWY1YjU5MmYxZmIzZGU1MGU0YmY0MzY4OWIyMjc1MTRjOGFiNTZlMTU0MGM3NWQ1MTFiZWQ0ODlkNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.M-X7AgM3CVcEPAbSibpUFBIrhlJmqdQiszz5mHFuHK0)
In this case the Joomla Update log
administrator/logs/joomla_update.php
contains details like for other errors:When the update source is not "Joomla Next" so it is "Default" or "Custom URL", the update source is not changed, and the update of the CMS core works as it does without this PR:
![test-core-update-no-reset](https://private-user-images.githubusercontent.com/7413183/341987354-b20b2aa6-1b41-443d-8a76-3b79c269cd1e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MjIxNTYsIm5iZiI6MTcxOTgyMTg1NiwicGF0aCI6Ii83NDEzMTgzLzM0MTk4NzM1NC1iMjBiMmFhNi0xYjQxLTQ0M2QtOGE3Ni0zYjc5YzI2OWNkMWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDFUMDgxNzM2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWQ3NzY3NDAzMGM4MWEzMWQwZjZmMzQyMTE0MTViNGI2NDJiMWE2NzZjZjE2ZmQ4NTdiMzhiMjcwYTY2Y2E2MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.D2zRp0fdzqkafzzl1N3GwJN4hJYwkp0ubiSo1PjVT04)
Link to documentations
Please select:
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed