Flyspray

  • Status Assigned
  • Percent Complete
    50%
  • Task Type Bug Report
  • Category Installer and Upgrader
  • Assigned To
    peterdd
  • Operating System Linux
  • Severity High
  • Priority Very Low
  • Reported Version 1.0-rc10
  • Due in Version 1.0-rc11
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray
Opened by pizza - 29.04.2021
Last edited by peterdd - 05.05.2021

FS#2636 - Failure to upgrade 1.0-rc9 to 1.0-rc10 (mariadb 10.4.18, php 7.4.16)

MariaDB05.05.2021peterdd

I administer a moderate-sized (~14K ticket) 1.0-rc9 instance running on a Fedora 32 host (php 7.4.16, mariadb 10.4.18) Following the upgrade instructions (ie transfer attachments, avatars, flyspray.conf.php) the setup/upgrade tool loads, and prompts me to upgrade.

It churns a while before refreshing the screen, claiming a successful 1.0-rc10 upgrade. However, the upgrade seems to not actually “stick”, because clicking on the “return” button I’m dropped back into the upgrader, which is once again claiming I’m running 1.0-rc9 and prompting me to perform the -rc10 upgrade.

According to Flyspray’s admin ‘checks’ tab:

* PHP 7.4.16
* MariaDB 10.4.18
* default_charset: utf8mb4
* default_collation: utf8mb4_unicode_ci
* All tables are ‘InnoDB’

There are no errors logged that I can find, but the upgrade is clearly not working. If I revert to the -rc9 php files, everything continues along as if nothing was done.

Any suggestions?

Project Manager

I had not this issues when testing my different dev boxes.

But we have/had a similiar problem with bugs.flyspray.org

I am currently in the process to investigate what is the reason and differences between these servers. (I not maintain server bugs.flyspray.org but now got permission to investigate)

A first idea is one sql upgrade step failed and the whole sql transaction rolled back.

Hope I can deliver more info tomorrow.

Project Manager

A first hint using debug mode:

Query: ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL failed. Data truncated for column 'detailed_desc' at row 1977
1265: Data truncated for column 'detailed_desc' at row 1977

         ADOConnection._Execute(ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL, false) % line 1293, file: adodb.inc.php
      ADOConnection.Execute(ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL) % line  393, file: adodb-datadict.inc.php
   ADODB_DataDict.executeSQLArray(Array[267], true) % line 1739, file: adodb-xmlschema03.inc.php
adoSchema.executeSchema(Array[267], true) % line  182, file: upgrade.php
execute_upgrade_file(1.0, 1.0-rc10 dev) % line  104, file: upgrade.php

pizza commented on 29.04.2021 23:19

Looks like it's the same problem for me:

Query: ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL failed. Data truncated for column 'detailed_desc' at row 11562
1265: Data truncated for column 'detailed_desc' at row 11562

       ADOConnection._Execute(ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL, false) % line 1293, file: adodb.inc.php
    ADOConnection.Execute(ALTER TABLE flyspray_tasks MODIFY COLUMN detailed_desc TEXT NOT NULL) % line  393, file: adodb-datadict.inc.php
 ADODB_DataDict.executeSQLArray(Array[267], true) % line 1739, file: adodb-xmlschema03.inc.php

adoSchema.executeSchema(Array[267], true) % line 182, file: upgrade.php
execute_upgrade_file(1.0, 1.0-rc9) % line 107, file: upgrade.php

One other note, at the end of the operation, it's clear that the DB layer knew something went wrong, but the upgrade script wasn't checking:

[…]
(mysqli): UPDATE `flyspray_prefs` SET pref_value = '1.0-rc10' WHERE pref_name = 'fs_ver' (mysqli): ROLLBACK Smart Rollback occurred

Project Manager

Yes,

I made little change to sources:

https://github.com/Flyspray/flyspray/commit/2f4b223a24d77f17135c4dee83fe42bbde60f25c

Will check tomorrow other fields. Seems to effect TEXT fields with NOTNULL set in the xmlschema03 files.

It is questionable if it is necessary if these need to be NOT NULL fields.

pizza commented on 02.05.2021 02:31

Good news, this patch fixed the problem I had upgrading the mariadb-based site. Thank you!

pizza commented on 02.05.2021 02:46

(BTW, this flyspray instance was first set up in January 2002)

toj79 commented on 23.07.2021 11:50

Hi,
I downloaded the archive today via the following link, but the upgrade.xml is still not able to run as described above by pizza. I removed the "<NOTNULL/>" row manually and afterwards the upgrade was properly done too.

Link to archive without the fix included:

https://github.com/Flyspray/flyspray/releases/download/v1.0-rc10/flyspray-1.0-rc10.tgz

Maybe you can update this archive to include this fix for others, trying to upgrade their Flyspray environment.

Btw. I like Flyspray a lot, it allows me to focus on the subject and not the tool. But I would love to see some improvements to the time "Effort Tracking". i.e. it would be great to add some kind of comment to the "Effort Tracking" tab, not with an editor field, just a field to add some rows of text so that you have some reference on the logged time blocks.

Thank you for the project and regards, Tim

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing