Allow to control these parts of the script in particular: if [ "$DEV_INSTALL" = "1" ]; then # Maybe we should switch off debug_mode if DEV_INSTALL is not set? environment="development" fi and if [ "$debug_mode" = "yes" ]; then environment="development"
Created attachment 167069 [details] [review] Bug 36932: Add deployment parameter to koha-plack Test plan (needs dev_install or ktd): Add a die in a script somewhere to simulate a crash. * For example in opac-main.pl: die "Line 43"; Run koha-plack --restart without -dep and hit that page. Dev output? Run koha-plack --restart with -dep and hit page again. No dev output? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Is that to make running KTD in production safer?
Or to someone needing to briefly enable debug mode in production?
(In reply to Victor Grousset/tuxayo from comment #2) > Is that to make running KTD in production safer? (In reply to Victor Grousset/tuxayo from comment #3) > Or to someone needing to briefly enable debug mode in production? The patch allows you to make a DEV_INSTALL (gitified package install, not only KTD) safer whether you want that in production or test environment.
Ok, so like someone deploying koha with branches for flexibility of managing additional patches? Which would still be using the commands like koha-plack.
Created attachment 167256 [details] [review] Bug 36932: Add deployment parameter to koha-plack Test plan (needs dev_install or ktd): Add a die in a script somewhere to simulate a crash. * For example in opac-main.pl: die "Line 43"; Run koha-plack --restart without -dep and hit that page. Dev output? Run koha-plack --restart with -dep and hit page again. No dev output? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
It works! :) --- Clarification: > like someone deploying koha with branches * with a git repo to be able to use branches --- Not sure about the -dep , it sounds like dependency instead of deployment. No big deal if nothing else sounds better. --- new param is not documented in the --help --- Since it's a safeguard to make sure people don't expose errors info in production: shouldn't it be the opposite approach? So like a -dev flag that ktd would have to add in it's startup command line call to koha-plack. Wait, here with the current proposal it's very easy to switch back to an unsafe state: restart plack without putting the flag again. How do the people in the usecases needing this flag manage the automated startup of koha on machine boot? Because that place will need also to not have the -dep forgotten. Do we have any setting that we already have to a value for dev envs and another one for regular prod instances and prod instance using a gittified setup? (IIUC that's the usecase for this flag). How do we do it? ENV var that KTD overides and everywhere else it's a prod oriented value? koha-conf.xml attribute that the KTD startup replaces with a dev oriented value so the everywhere else it's a prod oriented value?
(In reply to Victor Grousset/tuxayo from comment #5) > Ok, so like someone deploying koha with branches for flexibility of managing > additional patches? Which would still be using the commands like koha-plack. Yeah possibly.
(In reply to Victor Grousset/tuxayo from comment #7) > Not sure about the -dep , it sounds like dependency instead of deployment. > No big deal if nothing else sounds better. > > > --- > > > new param is not documented in the --help > > --- > > > Since it's a safeguard to make sure people don't expose errors info in > production: shouldn't it be the opposite approach? So like a -dev flag that > ktd would have to add in it's startup command line call to koha-plack. > > Wait, here with the current proposal it's very easy to switch back to an > unsafe state: restart plack without putting the flag again. > How do the people in the usecases needing this flag manage the automated > startup of koha on machine boot? > Because that place will need also to not have the -dep forgotten. > > Do we have any setting that we already have to a value for dev envs and > another one for regular prod instances and prod instance using a gittified > setup? (IIUC that's the usecase for this flag). > How do we do it? ENV var that KTD overides and everywhere else it's a prod > oriented value? > koha-conf.xml attribute that the KTD startup replaces with a dev oriented > value so the everywhere else it's a prod oriented value? Coming back a bit later for these things. Since we are in 24.11 now, blocking this one temporarily.
Created attachment 172101 [details] [review] Bug 36932: Add development parameter to koha-plack Test plan: NOTE: Needs dev_install or ktd. [1] Add a die in a script somewhere to simulate a crash. For example in opac-main.pl: die "Line 43"; [2] Run koha-plack --restart YOUR_CLONE (without -dev) and hit that page. See no dev output? [3] Run koha-plack --restart -dev YOUR_CLONE and hit page again. See dev output? [4] BONUS: Do a koha-plack --reload YOUR_CLONE (without -dev). Hit page. Verify that environment did not change. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>