PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
2 Jun 2024

Pull Request for Issue # .

Summary of Changes

This pull request (PR) implements an initial clean up of scripts related to core updates for the new major version 6.0 by doing 5 things:

  1. Delete all 5.x update SQL scripts like it was done with 4.x update SQL scripts for 5.0 and 3.x update SQL scripts for 4.0.
    As we will require to be on the latest 5.x version (very likely 5.4) before updating to 6, these scripts will never be run on update.
    Because there is no update SQL script yet for 6.0, a dummy script 6.0.0-2024-06-01.sql is added for each database type so that the folders will not be empty. The script contains a comment on what to do with it when the first real update SQL script for 6.0 will be added.
    5.x update SQL scripts should also be excluded from upmerges from any 5.x-dev branch in future.
  2. Adapt the lists of files and folders to be deleted and files to be renamed on update in file administrator/components/com_admin/script.php for 6.0 by
  • removing all old entries from 5.x,
  • adding the update SQL scripts from step 1 to the list of files to be deleted, and
  • adding files and folders from PRs #42884 and #42890 to the lists of files and folders to be deleted.
  1. Clean up the updateAssets method in file administrator/components/com_admin/script.php by obsolete entries from 5.x.
  2. Remove all 5.x-specific migrations and removals of core extensions in the uninstallExtensions and postflight methods and adapt version checks in these methods to 6.0.
  3. Remove obsolete exclusions from the build/deleted_file_check.php script which is used to create the lists of deleted files and folders and renamed files in the administrator/components/com_admin/script.php file.
    The exclusions were once added either for the migrations and removals removed in step 3 or for older stuff which becomes obsolete with 6.0.

Testing Instructions

Code review by an experienced maintainer or release manager who is familiar with the update process should be sufficient.

But if you want to do real tests:

Test 1: Update from 5.2 to 6.0 to test changes in script.php

Update the latest 5.2 nightly build or a 5.2.0-alpha1 to the latest 6.0 nightly build to get the actual result, and update latest 5.2 nightly build or a 5.2.0-alpha1 to the patched package created by Drone for this PR to get the expected result.

Here you can find the patched update package or custom update URL created by Drone for this PR: https://artifacts.joomla.org/drone/joomla/joomla-cms/6.0-dev/43598/downloads/76503/

After the update

  • check present files in folders administrator/components/com_admin/sql/updates/mysql and administrator/components/com_admin/sql/updates/postgresql,
  • check if files and folders which have been deleted in the source code with PRs #42884 and #42890 are present, and
  • export the database e.g. with phpMyAdmin (or phpPgAdmin if PostgreSQL) into a file for later comparsison, and after both updates compare the files.
  • save the file system after the first update for the actual result so you later can compare the result of the 2nd update for the expected result with that.

Test 2: Test the deleted_file_check.php script

The tests require PHP CLI so you can run PHP scripts on a command line (Linux shell or Windows CMD, no need for WSL) and a local Git clone of the 6.0-dev branch so the build folder is available. They can be executed on a clean branch without the need to run composer install or npm install, but if they have been run it will not do any harm.

The instructions below are made with Linux file paths, i.e. separator /. When being on Windows, just replace that by a backslash \.

  1. Download the latest nightly build full installation packages for 5.2 and 6.0 from https://developer.joomla.org/nightly-builds.html and unpack them into some empty folder.
    E.g. when using the tmp folder of your Git clone and folder names equal to the files base names of the packages, the folders will be:
  • ./tmp/Joomla_5.2.0-alpha1-dev-Development-Full_Package
  • ./tmp/Joomla_6.0.0-alpha-dev-Development-Full_Package
    The following steps will use these folders.
    (I know, the name "Joomla_5.2.0-alpha1-dev" is wrong, it should be "Joomla_5.2.0-alpha2-dev", but that's an issue with the nightly builds which I have already reported internally.)
  1. On your 6.0-dev branch without the changes from this PR applied, open a command window (Linux shell or Windows CMD) and change directory to the root folder of your Git clone.
  2. Run the following command to check the two folders from step 2 for deleted files and folders:
php ./build/deleted_file_check.php --from=./tmp/Joomla_5.2.0-alpha1-dev-Development-Full_Package --to=./tmp/Joomla_6.0.0-alpha-dev-Development-Full_Package
  1. Check that text files ./build/deleted_files.txt and ./build/deleted_folders.txt have been created, but no text file ./build/renamed_files.txt.
  2. Save the 2 text files created in the step 3 somewhere else for later comparison.
  3. Apply the changes in file build/deleted_file_check.php from this PR, but only the changes in that file and not the other changes.
  4. Repeat steps 3 to 5.
  5. Compare the text files from steps 3 and 7.
    Result: There are no differences.

Actual result BEFORE applying this Pull Request

Test 1: Update from 5.2 to 6.0 to test changes in script.php

In folders folders administrator/components/com_admin/sql/updates/mysql and administrator/components/com_admin/sql/updates/postgresql there are all 5.x update SQL scripts from 5.2, and these were even updated because they are in the update package of the nightly build.

The files and folders which have been deleted in the source code with PRs #42884 and #42890 are still present after the update.

Test 2: Test the deleted_file_check.php script

The script creates text files ./build/deleted_files.txt and ./build/deleted_folders.txt, but no text file ./build/renamed_files.txt

Expected result AFTER applying this Pull Request

Test 1: Update from 5.2 to 6.0 to test changes in script.php

In folders folders administrator/components/com_admin/sql/updates/mysql and administrator/components/com_admin/sql/updates/postgresql there are no 5.x update SQL scripts. Only one update SQL script 6.0.0-2024-06-01.sql is present, which includes only a comment on what to do when the first real update SQL script for 6.0 will be added.

The files and folders which have been deleted in the source code with PRs #42884 and #42890 have been deleted by the update.

There are no other differences compared to the actual result on filesystem or database except of expected differences like e.g. the superadmin's user ID, creation times or such things.

Test 2: Test the deleted_file_check.php script

The script creates text files ./build/deleted_files.txt and ./build/deleted_folders.txt, but no text file ./build/renamed_files.txt

The ./build/deleted_files.txt and ./build/deleted_folders.txt files are the same as without this PR.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2024
Category Administration com_admin SQL Postgresql
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
Labels Added: PR-6.0-dev
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar richard67 richard67 - change - 2 Jun 2024
The description was changed
avatar richard67 richard67 - edited - 2 Jun 2024
avatar HLeithner HLeithner - change - 5 Jun 2024
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-06-05 17:22:19
Closed_By HLeithner
avatar HLeithner HLeithner - close - 5 Jun 2024
avatar HLeithner HLeithner - merge - 5 Jun 2024
avatar HLeithner
HLeithner - comment - 5 Jun 2024

thanks

Add a Comment

Login with GitHub to post a comment