Skip to content
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] CLI: Adding command to manage Joomla core update channels #42597

Merged
merged 3 commits into from Jan 18, 2024

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 3, 2024

Summary of Changes

On the CLI, we can check for updates of the core and we can run the update as well, but we actually don't know what we are updating to, what update channel we are on and what the update process is actually doing right now. This PR tries to fix some of the issues by allowing to manage the update channels.

By calling php cli/joomla.php core:update:channel, you get the update channel the site is currently on. By adding the parameter default, next, testing or custom, you can set the update channel to that respective one. For custom you need to also add the --url=<url> parameter for the custom URL.

Testing Instructions

  1. Run php cli/joomla.php core:update:channel to display the currently configured update channel.
  2. Run php cli/joomla.php core:update:channel next to set it to the "next" update channel. Check that the params column in #__extensions for the com_joomlaupdate row contains the updated updatesource value and that location column for Joomla! Core in #__update_sites contains https://update.joomla.org/core/sts/list_sts.xml as URL.
  3. Run it in addition with other combinations of options and see the change reflected in the core tables.
  4. Run php cli/joomla.php core:check-updates to check for updates from the new update source.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@alikon alikon added the Feature label Jan 4, 2024
@alikon
Copy link
Contributor

alikon commented Jan 4, 2024

I have tested this item ✅ successfully on b4ce80a


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

@dautrich
Copy link

dautrich commented Jan 9, 2024

I tested following the Testing Instructions. As part of the test, I set the update channel to next, testing, and custom. For custom I added the parameter --url="https://example.org/update. Thereafter, I set the update channel back to testing, but the Custom URL was not removed from the database.
I'm not sure whether this may lead to adverse effects. Clean solution would be to remove any Custom URL from the database if the update channel is set to anything but custom.

@brianteeman
Copy link
Contributor

Thereafter, I set the update channel back to testing, but the Custom URL was not removed from the database.

Is it removed when you do the same in the web interface?

@dautrich
Copy link

dautrich commented Jan 9, 2024

@brianteeman
No, it is not. I've set the update channel back to Default via the web interface, but the URL remains in the extensions table as well.
IMHO we would need another PR to have the URL removed.

@dautrich
Copy link

dautrich commented Jan 9, 2024

I have tested this item ✅ successfully on b4ce80a


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

@brianteeman
Copy link
Contributor

@brianteeman No, it is not. I've set the update channel back to Default via the web interface, but the URL remains in the extensions table as well. IMHO we would need another PR to have the URL removed.

thought so. some would consider it a good feature to have

@alikon
Copy link
Contributor

alikon commented Jan 9, 2024

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 9, 2024
@alikon alikon added the Feature label Jan 9, 2024
@Razzo1987 Razzo1987 added this to the Joomla! 5.1.0 milestone Jan 18, 2024
@Razzo1987 Razzo1987 merged commit 853de0c into joomla:5.1-dev Jan 18, 2024
3 checks passed
@Razzo1987
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants