Bug 34683 - The DB upgrade process is not tested
Summary: The DB upgrade process is not tested
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 34684 34685
Blocks: 34841
  Show dependency treegraph
 
Reported: 2023-09-01 07:37 UTC by Jonathan Druart
Modified: 2023-09-20 12:15 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-09-01 07:37:21 UTC
We need a test to catch errors during the DB upgrade process.
Comment 1 Jonathan Druart 2023-09-01 08:09:00 UTC
This is not very nice, but it will be efficient enough for now.

I am suggesting to run the DB upgrade twice, before we run the test suite on Jenkins.

The plan here is:
1. Push bug 34684 and bug 34685 that are needed
2. Merge https://gitlab.com/koha-community/koha-misc4dev/-/issues/72
It includes the DB starting point (19.11.00) on which we will run the DB upgrade, twice.
3. Adjust the Jenkins job (there is a new flag --run-db-upgrade-only that will need to be used from, at least, MySQL 8).

If we had that before, we would have caught bug 34276.
Comment 2 Kyle M Hall 2023-09-06 13:19:24 UTC
I concur. This sounds like a good course of action!
Comment 3 Pedro Amorim 2023-09-06 16:12:52 UTC
Ran the test plan, works as expected. This is a good addition!
Comment 4 Martin Renvoize 2023-09-09 06:13:30 UTC
Worked well for me too, seems a decent course of action.
Comment 5 Jonathan Druart 2023-09-20 07:14:47 UTC
Thanks for the feedback. I am going to merge the misc4dev's merge request!
Comment 6 Jonathan Druart 2023-09-20 07:25:30 UTC
We also need https://gitlab.com/koha-community/koha-testing-docker/-/issues/399
Comment 7 Jonathan Druart 2023-09-20 09:13:31 UTC
Koha_Master_My8/1257 run successfully for the first time using this.
Comment 8 Jonathan Druart 2023-09-20 10:42:53 UTC
(In reply to Jonathan Druart from comment #7)
> Koha_Master_My8/1257 run successfully for the first time using this.

I moved the "run db upgrade" step before running the other tests (Issue #399: Run the DB upgrade before running the tests) and everything is broken now (see Koha_Master_My8/1258).

I will have a look later today.