CDash
CDash copied to clipboard
Updating CDash database from 2.2.3 to 2.6.0 updates to '2.8'
I have a CDash server running 2.2.3 and running inside a container. I saw that you have released a 2.6.0 version and have provided a container to go with it (https://github.com/Kitware/cdash-docker). I tried using this container and pointing it at a duplicate of our production database. After getting the container running I got a message on the main CDash page:
The current database schema doesn't match the version of CDash you are running, upgrade your database structure in the Administration/CDash maintenance panel of CDash
I went to the admin page and clicked 'update CDash'. After waiting for the update to complete the above message still appears on the CDash main page.
The current database schema doesn't match the version of CDash you are running, upgrade your database structure in the Administration/CDash maintenance panel of CDash
If I try again to update the database CDash says:
Upgrading tables: Applying 2.8 patches:
but the message still appears on the main page.
To help when updating from the cli (using: /docker-entrypoint.sh upgrade
)
[2018-12-19 08:26:19] cdash.ERROR: Table 'cdash.user' doesn't exist
#0 /var/www/cdash/include/CDash/Database.php(161): CDash\Database->logPdoError(Array)
#1 /var/www/cdash/include/pdo.php(407): CDash\Database->execute(Object(PDOStatement), NULL)
#2 /var/www/cdash/app/Model/User.php(303): pdo_execute(Object(PDOStatement))
#3 /var/www/cdash/include/login_functions.php(58): CDash\Model\User->GetIdFromEmail('[email protected]...')
#4 /var/www/cdash/include/login_functions.php(286): databaseAuthenticate('[email protected]...', 'Bfyoz74sA4utNMS...', 'private_no_expi...', false)
#5 /var/www/cdash/include/login_functions.php(315): authenticate('[email protected]...', 'Bfyoz74sA4utNMS...', 'private_no_expi...', false)
#6 /var/www/cdash/include/common.php(2030): cdash_auth()
#7 /var/www/cdash/public/user.php(28): angular_login()
#8 {main} {"function":"logPdoError","pid":348}
Table 'cdash.user' doesn't exist
That's interesting. cdash
is the name of your database, right?
Sorry for the late response. Yes cdash is the name our our cdash DB. I am looking at trying to update to 2.4.0 before updating to 2.6.0.
I have the same issue here upgrading to version 2.6.0
Any help would be really appreciated
I have the same issue, after a migration from CDash 2.2.3 to CDash 2.6.0. I clicked a first time on the "Upgrade CDash" button and the patches for the version 2.4 were applied. I then clicked a second time and the following messages were displayed:
Upgrading tables: Applying 2.8 patches:
CDash Upgrade Successful.
The following message still appears on the home page:
The current database schema doesn't match the version of CDash you are running, upgrade your database structure in the Administration/CDash maintenance panel of CDash
Sébastien
The following message still appears on the home page:
The current database schema doesn't match the version of CDash you are running, upgrade your database structure in the Administration/CDash maintenance panel of CDash
I took a look at the source code and I found that this message results is due to a SQL query that fails because a column named authenticatesubmissions
is missing in the project
table.
By comparing the expected and actual schemas, I found two others missing in this table:
-
bugtrackernewissueurl
-
bugtrackertype
And some other field have a slightly different type.
So, I conclude that a stage of the schema migration has been forgotten... :(
How can I fix this issue (by other means than by adding or modifying all columns by hand)?
Sébastien
Aha, I think this is a bug in the CDash upgrade process. Simply put, it doesn't handle upgrading across multiple versions well. When applying the 2.4 changes on a 2.2 database, it erroneously sets the DB version to 2.6 (not 2.4). So then the 2.6 changes never get applied later. I'll work on fixing this.
In the meantime, if you have access to the database, try running this query:
UPDATE version SET minor = 4;
and then clicking the "Upgrade CDash" button on upgrade.php again.
Thank you for your answer. In the meantime, I found another way to apply the SQL patch by invoking the following url:
https://<cdash.server>/upgrade.php?upgrade-2-6
But, actually, if invoking this url triggers the upgrade of the SQL schema from version 2.4 to version 2.6, the final schema is a little bit different from the schema defined in the sql/mysql/cdash.sql
file.
After reordering the declaration of the tables and eliminating some minor cosmetic differences, here are the two files:
- Schema defined in
sql/mysql/cdash.sql
file: cdash.sql.gz - Schema extracted from MySQL database: cdash_after_upgrade.sql.gz
A lot of colums, keys, constraints and default values are different, some of them are missing. 5 tables of the extracted schema do not exist in the official schema.
In the end, I abandoned any idea of migration and I opted for a new installation from scratch, forgetting about 6 months rolling results.
This migration was motivated by the support of PHP 7 (it works fine) and the hope to get the buildid back when submitting, because we would like to display it and create a link to the build report in Gitlab (we haven't figured out how to get it back yet :( ).
Sébastien
get the buildid back when submitting
We've got a merge request open to add a BUILD_ID option to ctest_submit: https://gitlab.kitware.com/cmake/cmake/merge_requests/3120
In the meantime, if you run ctest with --debug
it will print to stdout the responses it receives from CDash. You should see the XML response from CDash which contains the buildid that it created.
I am looking at trying to update to 2.4.0 before updating to 2.6.0. I did for in our instance and it worked around the issue for us.
I installed 2.6.0 (zip file) from scratch, and visiting .../upgrade.php anc clicking on "upgrade database" i also got
Upgrading tables: Applying 2.8 patches: CDash Upgrade Successful.
NOTE: my cdash MySQL was created from scratch by install.php!
I had this problem and resolved it, can't remember how off the top of my head. I will have a look and see if anything jogs my memory. I think it was either adding a database table which was missing in my install buy the update code was looking at to check the version, or using a differnt build of cdash 2.6.0 which fixed the version checking. Or I updated to 2.4.0 first, then went to 2.6.0.
On Thu, 9 Apr 2020, 01:18 Gemfony scientific, [email protected] wrote:
I installed 2.6.0 (zip file) from scratch, and visiting .../upgrade.php anc clicking on "upgrade database" i also got
Upgrading tables: Applying 2.8 patches: CDash Upgrade Successful.
NOTE: my cdash MySQL was created from scratch by install.php!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kitware/CDash/issues/780#issuecomment-611258996, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB54FAWW7YVBEDMOGQZEVDRLUH5ZANCNFSM4GKMULOQ .