[Bug 39740] New: Follow-up for bug 36932
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Bug ID: 39740 Summary: Follow-up for bug 36932 Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz See 36932. Adjust handling of dev_install, gitified_install etc. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36932 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36932 [Bug 36932] koha-plack: Add parameter for specifically enabling Starman development environment -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Still thinking about Joubu's suggestion on 36932:
2. split dev_install in the config and have gitified + dev_install
Actually, I now think that I just need some flag to tell me if it is a production or a test system (not KTD). (Not just that is gitified, since I can have a gitified production and a gitified test system.) Say that I find $KTD_HOME in the env of some system, then I know that it should be a test system. But note that not all test systems are using KTD (mine..), so [in that case] I need another var to indicate also that it is a test system. What about TEST_SYSTEM :) The confusion comes from the fact that DEV_INSTALL actually only means that the setup of some folders is different. Misc, not bin. Lib in root. No cgi-bin in path of opac and intranet folders. But (in some cases like mine) it could be a production system! Adding TEST_SYSTEM or something similar for non-KTD test systems might be the easiest approach to undo the 36932 side-effects. Any feedback? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184187&action=edit Bug 39740: Add is_test_system to koha-functions, incorporate in koha-plack Result of is_test_system will be determined by looking at KTD_HOME and TEST_SYSTEM in the environment. If is_test_system returns true or the flag --development (introduced on bug 36932) is set when calling koha-plack, koha-plack allows dumping a stack trace. Test plan: Copy koha-plack to /usr/sbin, and koha-functions.sh to /usr/share/koha/bin. Source bin/koha-functions.sh ('. bin/koha-functions.sh') Play with values of KTD_HOME and TEST_SYSTEM and look at results of: if is_test_system; then echo 'Test system'; fi Add a die in e.g. opac/opac-main.pl causing a 500. Do you see a stack trace and is that expected? It will be in KTD, otherwise you need to make sure that TEST_SYSTEM=1 is exported in your environment. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Follow-up for bug 36932 |[Follow-up of 36932] Check | |is_test_system for stack | |trace in koha-plack -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Marking as a minor fix of the change in 36932 which was minor too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #3)
Marking as a minor fix of the change in 36932 which was minor too.
Minor? Devs do not have stacktrace for several months, it's critical :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
(In reply to Marcel de Rooy from comment #3)
Marking as a minor fix of the change in 36932 which was minor too.
Minor? Devs do not have stacktrace for several months, it's critical :D
Well, please test asap :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- KTD_HOME is not set within the ktd container, this does not work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
KTD_HOME is not set within the ktd container, this does not work.
Please list the exported env vars. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Just curious about this statement in the KTD repo btw: Set some mandatory environment variables: echo "export PROJECTS_DIR=$PROJECTS_DIR" >> ~/.bashrc echo 'export SYNC_REPO=$PROJECTS_DIR/koha' >> ~/.bashrc echo 'export KTD_HOME=$PROJECTS_DIR/koha-testing-docker' >> ~/.bashrc echo 'export PATH=$PATH:$KTD_HOME/bin' >> ~/.bashrc echo 'export LOCAL_USER_ID=$(id -u)' >> ~/.bashrc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #8)
Just curious about this statement in the KTD repo btw:
Set some mandatory environment variables:
echo "export PROJECTS_DIR=$PROJECTS_DIR" >> ~/.bashrc echo 'export SYNC_REPO=$PROJECTS_DIR/koha' >> ~/.bashrc echo 'export KTD_HOME=$PROJECTS_DIR/koha-testing-docker' >> ~/.bashrc echo 'export PATH=$PATH:$KTD_HOME/bin' >> ~/.bashrc echo 'export LOCAL_USER_ID=$(id -u)' >> ~/.bashrc
Yes, on the host. This is to make the `ktd` script working on the host, to startup the container. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- I wrote that: https://gitlab.com/joubu/koha-misc4dev/-/commit/ddd5f61b0b62c775326ae7b98898... But the flag is lost when restart_all is called, because we restart koha-common which does not (and should not) pass -dev. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Why not splitting the config finally? we should not consider ktd is the only koha dev env. Checking for a "ktd" env var from koha-plack is too specific. for me the "is dev env setup" config flag is the correct solution -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #11)
Why not splitting the config finally?
we should not consider ktd is the only koha dev env. Checking for a "ktd" env var from koha-plack is too specific.
for me the "is dev env setup" config flag is the correct solution
Yeah, ok. The confusing thing is the existing DEV_INSTALL and what it actually means in the code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184187|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184432&action=edit Bug 39740: Add is_test_system to koha-functions, incorporate in koha-plack Result of is_test_system will be determined by looking at TEST_SYSTEM in the environment. If is_test_system returns true or the flag --development (introduced on bug 36932) is set when calling koha-plack, koha-plack allows dumping a stack trace. Test plan: Copy koha-plack to /usr/sbin, and koha-functions.sh to /usr/share/koha/bin. Source bin/koha-functions.sh ('. bin/koha-functions.sh') Play with value of TEST_SYSTEM and look at results of: if is_test_system; then echo 'Test system'; fi Add a die in e.g. opac/opac-main.pl causing a 500. Do you see a stack trace and is that expected (you need to make sure that TEST_SYSTEM=1 is exported in your environment; e.g. add to $KTD_HOME/.env). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- Suggestion (same as before): 1. Replace the existing dev_install/DEV_INSTALL (that is dealing with paths adjustement) with "gitified" 2. Add the dev_install that is going to be used for dev purpose (here passing -dev to koha-plack) We will need a trivial change in ktd (add gitified): files/templates/koha-conf-site.xml.in: <dev_install>1</dev_install> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #14)
Suggestion (same as before): 1. Replace the existing dev_install/DEV_INSTALL (that is dealing with paths adjustement) with "gitified" 2. Add the dev_install that is going to be used for dev purpose (here passing -dev to koha-plack)
We will need a trivial change in ktd (add gitified): files/templates/koha-conf-site.xml.in: <dev_install>1</dev_install>
See comment1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
KTD_HOME is not set within the ktd container, this does not work.
Removed from the patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Waiting for a reponse from Tomas -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #18 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I'd say KTD should set an env flag and we should query for it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #18)
I'd say KTD should set an env flag and we should query for it.
Hi. This patch checks TEST_SYSTEM in the env. Does that correspond with what you meant here? We could rename DEV_INSTALL to GIT_INSTALL btw to perhaps lower confusion? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #20 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #19)
We could rename DEV_INSTALL to GIT_INSTALL btw to perhaps lower confusion?
This is almost what I suggested. However I think we need the flag in the koha config as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #21 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #18)
I'd say KTD should set an env flag and we should query for it.
Let me clarify my comment :-D I think we should have a `koha-conf.xml` entry or section for this things. I would like to be able to enable stack traces in koha-conf.xml instead of detecting how it is being run. We could also override using variables which `run.sh` (the startup script KTD uses) could set. This could be useful for running in jenkins where we might want to disable stacktraces for (say) Cypress tasks so they are similar to production, but enable them by default in KTD. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184798 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184798&action=edit Bug 39740: Add is_git_install and is_test_system Test plan: Copy koha-functions.sh to /usr/share/koha/bin. Source bin/koha-functions.sh ('. bin/koha-functions.sh') Test in bash (Yes expected; adjust instance name): GIT_INSTALL=1; if is_git_install your_instance; then echo Yes; fi Add/set git_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi Set git_install to 0 in koha-conf.xml. Test in bash (No expected): unset GIT_INSTALL; if ! is_git_install your_instance; then echo No; fi Remove git_install and add/set dev_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi A few similar tests with test_system. Add/set test_system to 0 in koha-conf.xml. Test in bash (Yes expected): TEST_SYSTEM=1; if is_test_system your_instance; then echo Yes; fi Test in bash (No expected): unset TEST_SYSTEM; if ! is_test_system your_instance; then echo No; fi Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184799&action=edit Bug 39740: Rename function to adjust_paths_git_install Logical follow-up for moving away from dev_install to git_install. Result of running git grep -l adjust_paths_dev_install | xargs sed -i -e "s/adjust_paths_dev_install/adjust_paths_git_install/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184800 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184800&action=edit Bug 39740: Replace DEV_INSTALL by GIT_INSTALL Resulting from the following sed statement: git grep -l DEV_INSTALL | xargs sed -i -e "s/DEV_INSTALL/GIT_INSTALL/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184801&action=edit Bug 39740: Fix a few occurrences of dev_install in code Test plan: Check if git_install is set correctly for your system in koha-conf.xml. Adjust otherwise. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Run koha-shell your_clone. Does that works like expected? Run t/Koha/Config.t. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184802&action=edit Bug 39740: Replace envvar check by calling is_git_install on instance level Replace the $GIT_INSTALL check by is_git_install. Some scripts did call is_git_install once while potentially looping over multiple instances. Note: koha-reset-passwd only runs on one instance (unlike most). Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Note: We will still test koha-plack and -z3950-responder later. Test running a few of the other changed koha-* scripts on one or more instances. Verify that things work as expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #27 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184803&action=edit Bug 39740: Adjust koha-plack and koha-z3950-responder Changes to koha-plack - Check is_test_system and -development for stack trace - Add check on set $environment for debugger - Move export to do_instance, remove three local's NOTE: GIT_INSTALL ie exported for koha-plack ONLY! The debian scripts call is_git_install. Changes to koha-z3950-responder - debugger needs test_system flag - Rearrange exports before calling start_z3950 and friends. Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Add a die in e.g. opac/opac-main.pl. Set test_system to 1 in koha-conf.xml or export TEST_SYSTEM=1 in your environment. Restart Plack. Hit opac-main. Do you see a stack trace? Export TEST_SYSTEM=0. Restart Plack. Hit opac-main again. You should not see a stack trace. Start koha-z3950-responder with/without debug flag. Works as expected? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #28 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184804&action=edit Bug 39740: Adjust koha-conf.xml Test plan: Look at changes in this patch. Note that we already tested these settings with former patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184432|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #29 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #21)
(In reply to Tomás Cohen Arazi (tcohen) from comment #18)
I'd say KTD should set an env flag and we should query for it.
Let me clarify my comment :-D Thanks
I think we should have a `koha-conf.xml` entry or section for this things. I would like to be able to enable stack traces in koha-conf.xml instead of detecting how it is being run.
We could also override using variables which `run.sh` (the startup script KTD uses) could set. This could be useful for running in jenkins where we might want to disable stacktraces for (say) Cypress tasks so they are similar to production, but enable them by default in KTD.
Two koha-conf entries: git_install and test_system. Two (optional) env vars overriding them: GIT_INSTALL and TEST_SYSTEM. Please have a look. Patch 5 includes a few more changes for consistency between koha scripts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #30 from Jonathan Druart <jonathan.druart@gmail.com> --- Excellent, thanks for the patches. Just wondering if TEST_SYSTEM shouldn't actually be DEBUG_MODE (?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #31 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #30)
Excellent, thanks for the patches.
Just wondering if TEST_SYSTEM shouldn't actually be DEBUG_MODE (?)
It was already used ;) But they sound very close indeed.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #32 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hmm. Spotting - if [ "$GIT_INSTALL" = "" ]; then + if ! is_git_install $name; then -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #33 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #32)
Hmm. Spotting
- if [ "$GIT_INSTALL" = "" ]; then + if ! is_git_install $name; then
Thats correct. Scratch it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #34 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #31)
(In reply to Jonathan Druart from comment #30)
Excellent, thanks for the patches.
Just wondering if TEST_SYSTEM shouldn't actually be DEBUG_MODE (?)
It was already used ;) But they sound very close indeed..
The env var is not used DEBUG_MODE yet (is it?). We only using one option in koha-plack (and koha-z3950-responder?), and that would make sense to turn debug-mode ON when $DEBUG_MODE is ON. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #35 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #30)
Excellent, thanks for the patches.
Just wondering if TEST_SYSTEM shouldn't actually be DEBUG_MODE (?)
I agree we should pick DEBUG_MODE. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #36 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #35)
(In reply to Jonathan Druart from comment #30)
Excellent, thanks for the patches.
Just wondering if TEST_SYSTEM shouldn't actually be DEBUG_MODE (?)
I agree we should pick DEBUG_MODE.
Thx Will do. 2 - 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Follow-up of 36932] Check |[Follow-up of 36932] Split |is_test_system for stack |dev_install into |trace in koha-plack |git_install and debug_mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #37 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184873&action=edit Bug 39740: (QA follow-up) Rename test_system/TEST_SYSTEM See comment30 and comment36. Result of two sed's: git grep -l test_system | xargs sed -i -e "s/test_system/debug_mode/g" git grep -l TEST_SYSTEM | xargs sed -i -e "s/TEST_SYSTEM/DEBUG_MODE/g" The next patch will take care of the debugger options in the plack and z3950 responder scripts. Test plan: Read the patch. (Testing in next patch.) git grep -i test_system Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #38 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184874&action=edit Bug 39740: (QA follow-up) Adjust debugger for koha-plack and koha-z3950-responder This patch mainly renames var debug_mode in both scripts when it refers to the debugger instead of the instance's debug_mode. Note: Removing $environment from responder, probably copied. Test plan: cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Repeat steps from patch: "Replace envvar check by calling..." Repeat steps from patch: "Adjust koha-plack and koha-z3950-responder" Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #39 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Open for testing again ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #40 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184920&action=edit Bug 39740: Fix adjust_paths_git_install in koha-es-indexer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #41 from Jonathan Druart <jonathan.druart@gmail.com> --- 1. We need to adjust koha-conf's koha-testing-docker https://gitlab.com/koha-community/koha-testing-docker/-/blob/main/files/temp... replace dev_install with git_install and add debug_mode 2. I am wondering if there is an easy way to keep backward compatibility for dev_install: for instance ktd images for 25.05 won't be able to test "main". And ktd's main won't be able to test older commits. We will always have to reset_all or adjust koha-conf. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #42 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #40)
Created attachment 184920 [details] [review] Bug 39740: Fix adjust_paths_git_install in koha-es-indexer
Patch 2 did change it ;) But another patch restored the old name: + adjust_paths_dev_install $name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #43 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #41)
2. I am wondering if there is an easy way to keep backward compatibility for dev_install: for instance ktd images for 25.05 won't be able to test "main". And ktd's main won't be able to test older commits. We will always have to reset_all or adjust koha-conf.
I kept a second check for dev_install in the function: # now check koha-conf; looking at dev_install as historical fallback if [ "$instancename" != "" ] && is_instance $instancename; then git_install=$(run_safe_xmlstarlet $instancename git_install) if [ -z "$git_install" ]; then git_install=$(run_safe_xmlstarlet $instancename dev_install); fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #44 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #43)
(In reply to Jonathan Druart from comment #41)
2. I am wondering if there is an easy way to keep backward compatibility for dev_install: for instance ktd images for 25.05 won't be able to test "main". And ktd's main won't be able to test older commits. We will always have to reset_all or adjust koha-conf.
I kept a second check for dev_install in the function: # now check koha-conf; looking at dev_install as historical fallback if [ "$instancename" != "" ] && is_instance $instancename; then git_install=$(run_safe_xmlstarlet $instancename git_install) if [ -z "$git_install" ]; then git_install=$(run_safe_xmlstarlet $instancename dev_install); fi
Perfect, I missed that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184798|0 |1 is obsolete| | Attachment #184799|0 |1 is obsolete| | Attachment #184800|0 |1 is obsolete| | Attachment #184801|0 |1 is obsolete| | Attachment #184802|0 |1 is obsolete| | Attachment #184803|0 |1 is obsolete| | Attachment #184804|0 |1 is obsolete| | Attachment #184873|0 |1 is obsolete| | Attachment #184874|0 |1 is obsolete| | Attachment #184920|0 |1 is obsolete| | --- Comment #45 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184989 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184989&action=edit Bug 39740: Add is_git_install and is_test_system Test plan: Copy koha-functions.sh to /usr/share/koha/bin. Source bin/koha-functions.sh ('. bin/koha-functions.sh') Test in bash (Yes expected; adjust instance name): GIT_INSTALL=1; if is_git_install your_instance; then echo Yes; fi Add/set git_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi Set git_install to 0 in koha-conf.xml. Test in bash (No expected): unset GIT_INSTALL; if ! is_git_install your_instance; then echo No; fi Remove git_install and add/set dev_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi A few similar tests with test_system. Add/set test_system to 0 in koha-conf.xml. Test in bash (Yes expected): TEST_SYSTEM=1; if is_test_system your_instance; then echo Yes; fi Test in bash (No expected): unset TEST_SYSTEM; if ! is_test_system your_instance; then echo No; fi Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #46 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184990 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184990&action=edit Bug 39740: Rename function to adjust_paths_git_install Logical follow-up for moving away from dev_install to git_install. Result of running git grep -l adjust_paths_dev_install | xargs sed -i -e "s/adjust_paths_dev_install/adjust_paths_git_install/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #47 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184991&action=edit Bug 39740: Replace DEV_INSTALL by GIT_INSTALL Resulting from the following sed statement: git grep -l DEV_INSTALL | xargs sed -i -e "s/DEV_INSTALL/GIT_INSTALL/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #48 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184992&action=edit Bug 39740: Fix a few occurrences of dev_install in code Test plan: Check if git_install is set correctly for your system in koha-conf.xml. Adjust otherwise. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Run koha-shell your_clone. Does that works like expected? Run t/Koha/Config.t. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #49 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184993&action=edit Bug 39740: Replace envvar check by calling is_git_install on instance level Replace the $GIT_INSTALL check by is_git_install. Some scripts did call is_git_install once while potentially looping over multiple instances. Note: koha-reset-passwd only runs on one instance (unlike most). Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Note: We will still test koha-plack and -z3950-responder later. Test running a few of the other changed koha-* scripts on one or more instances. Verify that things work as expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #50 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184994&action=edit Bug 39740: Adjust koha-plack and koha-z3950-responder Changes to koha-plack - Check is_test_system and -development for stack trace - Add check on set $environment for debugger - Move export to do_instance, remove three local's NOTE: GIT_INSTALL ie exported for koha-plack ONLY! The debian scripts call is_git_install. Changes to koha-z3950-responder - debugger needs test_system flag - Rearrange exports before calling start_z3950 and friends. Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Add a die in e.g. opac/opac-main.pl. Set test_system to 1 in koha-conf.xml or export TEST_SYSTEM=1 in your environment. Restart Plack. Hit opac-main. Do you see a stack trace? Export TEST_SYSTEM=0. Restart Plack. Hit opac-main again. You should not see a stack trace. Start koha-z3950-responder with/without debug flag. Works as expected? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #51 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184995&action=edit Bug 39740: Adjust koha-conf.xml Test plan: Look at changes in this patch. Note that we already tested these settings with former patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #52 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184996&action=edit Bug 39740: (QA follow-up) Rename test_system/TEST_SYSTEM See comment30 and comment36. Result of two sed's: git grep -l test_system | xargs sed -i -e "s/test_system/debug_mode/g" git grep -l TEST_SYSTEM | xargs sed -i -e "s/TEST_SYSTEM/DEBUG_MODE/g" The next patch will take care of the debugger options in the plack and z3950 responder scripts. Test plan: Read the patch. (Testing in next patch.) git grep -i test_system Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #53 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184997&action=edit Bug 39740: (QA follow-up) Adjust debugger for koha-plack and koha-z3950-responder This patch mainly renames var debug_mode in both scripts when it refers to the debugger instead of the instance's debug_mode. Note: Removing $environment from responder, probably copied. Test plan: cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Repeat steps from patch: "Replace envvar check by calling..." Repeat steps from patch: "Adjust koha-plack and koha-z3950-responder" Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #54 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 184998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184998&action=edit Bug 39740: Fix adjust_paths_git_install in koha-es-indexer Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #55 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #45)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Thx ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184989|0 |1 is obsolete| | Attachment #184990|0 |1 is obsolete| | Attachment #184991|0 |1 is obsolete| | Attachment #184992|0 |1 is obsolete| | Attachment #184993|0 |1 is obsolete| | Attachment #184994|0 |1 is obsolete| | Attachment #184995|0 |1 is obsolete| | Attachment #184996|0 |1 is obsolete| | Attachment #184997|0 |1 is obsolete| | Attachment #184998|0 |1 is obsolete| | --- Comment #56 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186194&action=edit Bug 39740: Add is_git_install and is_test_system Test plan: Copy koha-functions.sh to /usr/share/koha/bin. Source bin/koha-functions.sh ('. bin/koha-functions.sh') Test in bash (Yes expected; adjust instance name): GIT_INSTALL=1; if is_git_install your_instance; then echo Yes; fi Add/set git_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi Set git_install to 0 in koha-conf.xml. Test in bash (No expected): unset GIT_INSTALL; if ! is_git_install your_instance; then echo No; fi Remove git_install and add/set dev_install to 1 in koha-conf.xml. Test in bash (Yes expected): unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi A few similar tests with test_system. Add/set test_system to 0 in koha-conf.xml. Test in bash (Yes expected): TEST_SYSTEM=1; if is_test_system your_instance; then echo Yes; fi Test in bash (No expected): unset TEST_SYSTEM; if ! is_test_system your_instance; then echo No; fi Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #57 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186195&action=edit Bug 39740: Rename function to adjust_paths_git_install Logical follow-up for moving away from dev_install to git_install. Result of running git grep -l adjust_paths_dev_install | xargs sed -i -e "s/adjust_paths_dev_install/adjust_paths_git_install/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #58 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186196&action=edit Bug 39740: Replace DEV_INSTALL by GIT_INSTALL Resulting from the following sed statement: git grep -l DEV_INSTALL | xargs sed -i -e "s/DEV_INSTALL/GIT_INSTALL/g" Test plan: Read the patch. The scripts will be tested later on. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #59 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186197&action=edit Bug 39740: Fix a few occurrences of dev_install in code Test plan: Check if git_install is set correctly for your system in koha-conf.xml. Adjust otherwise. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Run koha-shell your_clone. Does that works like expected? Run t/Koha/Config.t. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #60 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186198&action=edit Bug 39740: Replace envvar check by calling is_git_install on instance level Replace the $GIT_INSTALL check by is_git_install. Some scripts did call is_git_install once while potentially looping over multiple instances. Note: koha-reset-passwd only runs on one instance (unlike most). Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Note: We will still test koha-plack and -z3950-responder later. Test running a few of the other changed koha-* scripts on one or more instances. Verify that things work as expected. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #61 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186199&action=edit Bug 39740: Adjust koha-plack and koha-z3950-responder Changes to koha-plack - Check is_test_system and -development for stack trace - Add check on set $environment for debugger - Move export to do_instance, remove three local's NOTE: GIT_INSTALL ie exported for koha-plack ONLY! The debian scripts call is_git_install. Changes to koha-z3950-responder - debugger needs test_system flag - Rearrange exports before calling start_z3950 and friends. Test plan: Check/adjust git_install and test_system in koha-conf.xml for used instances. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Add a die in e.g. opac/opac-main.pl. Set test_system to 1 in koha-conf.xml or export TEST_SYSTEM=1 in your environment. Restart Plack. Hit opac-main. Do you see a stack trace? Export TEST_SYSTEM=0. Restart Plack. Hit opac-main again. You should not see a stack trace. Start koha-z3950-responder with/without debug flag. Works as expected? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #62 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186200&action=edit Bug 39740: Adjust koha-conf.xml Test plan: Look at changes in this patch. Note that we already tested these settings with former patches. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #63 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186201 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186201&action=edit Bug 39740: (QA follow-up) Rename test_system/TEST_SYSTEM See comment30 and comment36. Result of two sed's: git grep -l test_system | xargs sed -i -e "s/test_system/debug_mode/g" git grep -l TEST_SYSTEM | xargs sed -i -e "s/TEST_SYSTEM/DEBUG_MODE/g" The next patch will take care of the debugger options in the plack and z3950 responder scripts. Test plan: Read the patch. (Testing in next patch.) git grep -i test_system Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #64 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186202 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186202&action=edit Bug 39740: (QA follow-up) Adjust debugger for koha-plack and koha-z3950-responder This patch mainly renames var debug_mode in both scripts when it refers to the debugger instead of the instance's debug_mode. Note: Removing $environment from responder, probably copied. Test plan: cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ cp debian/templates/plack.psgi /etc/koha/plack.psgi Repeat steps from patch: "Replace envvar check by calling..." Repeat steps from patch: "Adjust koha-plack and koha-z3950-responder" Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #65 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186203&action=edit Bug 39740: Fix adjust_paths_git_install in koha-es-indexer Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #66 from Jonathan Druart <jonathan.druart@gmail.com> --- Opened https://gitlab.com/koha-community/koha-testing-docker/-/issues/502 and created a merge request. Lucas, we need the merge request to be merged right before you push this! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #67 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #68 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This will not be backported to the 25.05.x branch. Have a great day! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #69 from David Nind <david@davidnind.com> --- No changes to the manual required (as far as I can tell - more development-related). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 --- Comment #70 from David Cook <dcook@prosentient.com.au> --- So I don't think this works the way people think it works... DEBUG_MODE="" is the same as DEBUG_MODE=1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42366 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39740 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org