Bug 20521 - dev installations should run with problematic SQL modes
Summary: dev installations should run with problematic SQL modes
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 20177 20179 20180 20229
Blocks: 21597
  Show dependency treegraph
 
Reported: 2018-04-04 19:28 UTC by Jonathan Druart
Modified: 2018-11-05 12:37 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
To aid in catching possible SQL issue's early in development, this patch allows enabling the strictest of SQL modes for development (and makes it the default for continuous integration) environments.


Attachments
Bug 20521: Enable problematic SQL modes for dev installs (2.10 KB, patch)
2018-04-04 19:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20521: Enable problematic SQL modes for dev installs (2.39 KB, patch)
2018-04-05 02:42 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 20521: Enable problematic SQL modes for dev installs (2.45 KB, patch)
2018-04-05 12:55 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 20521: Use a specific config for strict sql modes (1.29 KB, patch)
2018-10-18 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-04-04 19:28:28 UTC
So far we have bug 17258 (omnibus to list the issue we have with the new default SQL modes), bug 20144 (which fixed our test suite with these modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.
Comment 1 Jonathan Druart 2018-04-04 19:31:02 UTC
Created attachment 73659 [details] [review]
Bug 20521: Enable problematic SQL modes for dev installs

So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.

Test plan:
- Revert commit 0180524bb9b1464c441bb1b858d0d8df37524d72
- prove t/db_dependent/Koha/Biblios.t

=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass
Comment 2 M. Tompsett 2018-04-05 02:42:00 UTC
Created attachment 73670 [details] [review]
Bug 20521: Enable problematic SQL modes for dev installs

So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.

Test plan:
- Revert commit 0180524bb9b1464c441bb1b858d0d8df37524d72
- prove t/db_dependent/Koha/Biblios.t

=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass

NOTE: The commit number was wrong. Using
    git log -- t/db_dependent/Koha/Biblios.t
    This showed bug 20176 which was 524eab678833b2719187e67128ee4f83a2a48ba4
    Also dev_install was in koha_conf.xml already, so I just had to
    toggle 0 and 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Tomás Cohen Arazi 2018-04-05 12:55:47 UTC
Created attachment 73683 [details] [review]
Bug 20521: Enable problematic SQL modes for dev installs

So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.

Test plan:
- Revert commit 0180524bb9b1464c441bb1b858d0d8df37524d72
- prove t/db_dependent/Koha/Biblios.t

=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass

NOTE: The commit number was wrong. Using
    git log -- t/db_dependent/Koha/Biblios.t
    This showed bug 20176 which was 524eab678833b2719187e67128ee4f83a2a48ba4
    Also dev_install was in koha_conf.xml already, so I just had to
    toggle 0 and 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Jonathan Druart 2018-04-06 18:07:13 UTC
This is blocked by bug 20177, bug 20179 and bug 20180, otherwise the tests will not pass.
Comment 5 Jonathan Druart 2018-10-09 12:47:57 UTC
Back to PQA.
Comment 6 Nick Clemens 2018-10-17 19:22:18 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Jonathan Druart 2018-10-18 14:08:28 UTC
Created attachment 80851 [details] [review]
Bug 20521: Use a specific config for strict sql modes

To avoid dev to complain to much it will be turned off by default.
We will turn it on for Jenkins so devs will have to take care of the
regressions they introduce (!)
Comment 8 Nick Clemens 2018-10-18 14:30:04 UTC
(In reply to Jonathan Druart from comment #7)
> Created attachment 80851 [details] [review] [review]
> Bug 20521: Use a specific config for strict sql modes
> 
> To avoid disrupting testers and new developers it will be turned off by default.
> We will turn it on for Jenkins so devs will have to take care of the
> regressions they introduce (!)

(Amended) follow-up pushed to master
Comment 9 Martin Renvoize 2018-10-26 13:07:23 UTC
I think this is a solid choice for going forward.. but backporting all the fixes to enable currently unsupported SQL modes seems unnecessary. As such, I've chosen not to backport this one.
Comment 10 Martin Renvoize 2018-11-05 12:33:56 UTC
Pushed to 18.05.x for 18.05.06.. now that the followup makes it more configurable I've chosen to backport it.. it's a nice goal to strive for SQL compatibility for bugfixes.