joomla-extensions/patchtester

Update Patchtester

ChristineWk opened this issue · 8 comments

Steps to reproduce the issue

Got Information for Update to: Joomla Patchtester 4.0.0-rc3

Expected result

Update was successful, but error message:

Actual result

An error has occurred. 1146 Table 'xyz_patchtester_pulls_labels' doesn't exist

System information (as much as possible)

Joomla CMS
Joomla! 4 Content Management System.
Site
File
No Problems
4.0.0-2020-05-29
‎4.0.0-beta4-dev
Joomla! Patch Tester
Component for pull request management testing
Administrator
Component
No Problems
4.0.0
‎4.0.0-rc3

Additional comments

It's not possible to use Patchtester now.

But I think, found the reason for: https://github.com/joomla-extensions/patchtester/releases:

Update warning

Any previous installation of the Joomla! Patch Tester must be uninstalled as this release contains some major changes due to the addition of showing Github labels.

Prior to uninstalling you may want to make a backup of your Github token so it is easy to restore it.

But why is there no "Pre-warning" respectively update is offered?
Will try to install completely new.

Updating doesn't work because there is no update SQL for the recent database changes.

=> Ping @roland-d : Which way to go? For an update SQL it would need schema versions similar to what we have in the CMS in the file names and not only "4.0.0", because the database changes came between RC 2 and RC 3. But at least there should be something done for better UX, if we don't provide schema updates.

Thank you for the report.

There is no update schedule for the current versions, perhaps in the future. Technically there should not be any database changes between RC 2 and RC 3.

I will close this issue for now as a known issue.

Technically there should not be any database changes between RC 2 and RC 3.

@roland-d What? And what about the #__patchtester_pulls_labels table and the is_npm column of the #__patchtester_pulls table which have been added recently?

@richard67 Technically this should have waited until the 4.1.0 release. However, this can take a long time and testers are really helped by these changes, that is why I put them in.

@roland-d Regardless of whether these changes should have been made at that version, they have been made. So IMHO, they should be applied in an update file as well. Is there any key point against that (besides the fact that it shouldn't be needed, if there were no changes)?

As the patchtester update server provides an update from RC2 to RC3, users are going to use this, and probably more often than looking at the release page here at GitHub. So the update path essentially becomes:

  1. See that there is an update available.
  2. Apply the update.
  3. Notice that it is broken.
  4. Search for the error, eventually get here or to the release notes.
  5. Uninstall patchtester.
  6. Reinstall patchtester.

...instead of only steps 1 and 2, respectively 5 and 6.

@Harmageddon Feel free to send a PR to fix this.

@Harmageddon If you wanna make a PR, you can use my code. See here for the diff:

master...richard67:master-fix-4.0.0-update-sql-scripts

The only thing which is not ok yet with it is that we currently use version numbers like "4.0.0" without anything else in the file names, so the update sql will run when updating a pt3 to pt4, but it will not run when we update a pt4 rc x to rc y.

For this we have to make a new, empty 4.0.0-<date 1>.sql with <date 1> being the date in YYYY-MM-DD format when the first PT 4 alpha 1 was released, and then another 4.0.0-<date 2>.sql with <date 2> being the date in YYYY-MM-DD format when PT 4 RC 3 was released.

Tks @richard67 & @Harmageddon for your investigation.

Even if a PR would be possible, it can only be tested if you still have rc2, if I understand it correctly.

At least one notice should appear referring to this https://github.com/joomla-extensions/patchtester/releases.
e.g. Especially Prior to uninstalling you may want to make a backup of your Github token .........
(myself, have uninstalled & installed RC3).