Description
Jonathan Druart
2020-05-19 09:22:35 UTC
Again on Master_D9_MDB_Latest #303 You need to make sure the used fw has the checked girls set to display in the relevant interface. (In reply to Tomás Cohen Arazi from comment #3) > You need to make sure the used fw has the checked girls set to display in > the relevant interface. Why would that make it fail randomly? This is because KOHA_OPAC_URL is not set. On both U18 and D11 I get the following (known error that should not have been ignored so long): root@c4adf9b9b785:koha(master|BISECTING)$ kshell bash: /root/.bashrc: Permission denied This can be recreated easily by defining a wrong KOHA_OPAC_URL. $ koha-shell ${KOHA_INSTANCE} -p -c "echo $KOHA_OPAC_URL" Created attachment 105675 [details] [review] Bug 25538: Don't run search_utf8.t if KOHA_*_URL empty koha-testing-docker related issue: https://gitlab.com/koha-community/koha-testing-docker/-/issues/202 Created attachment 105676 [details] [review] Bug 25538: Use sudo -i in koha-shell See man sudo, -i parameter. Should we expect regressions? Test plan: 0. Use D11 or U18. Don't apply this patch 1. $ echo $KOHA_INTRANET_URL $ sudo koha-shell kohadev $ echo $KOHA_INTRANET_URL 2. Apply this patch $ cp debian/scripts/koha-shell /usr/sbin/koha-shell 3. Repeat 1. Created attachment 105685 [details] [review] Bug 25538: Default to --login|-i if no command passed Created attachment 105686 [details] [review] Bug 25538: Don't run search_utf8.t if KOHA_*_URL empty Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 105687 [details] [review] Bug 25538: Use sudo -i in koha-shell See man sudo, -i parameter. Should we expect regressions? Test plan: 0. Use D11 or U18. Don't apply this patch 1. $ echo $KOHA_INTRANET_URL $ sudo koha-shell kohadev $ echo $KOHA_INTRANET_URL 2. Apply this patch $ cp debian/scripts/koha-shell /usr/sbin/koha-shell 3. Repeat 1. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 105688 [details] [review] Bug 25538: Default to --login|-i if no command passed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Looks good to me and works as expected when running in koha-testing-docker interactively. Signing off I tried it on an Ubuntu 18.04 KTD (19.11-bionic) and it doesn't seem to fix the issue, and it also feels like it is choosing a different shell: root@744612f9fc98:kohadevbox$ export KOHA_INTRANET_URL=hola root@744612f9fc98:kohadevbox$ echo $KOHA_INTRANET_URL hola root@744612f9fc98:kohadevbox$ koha/debian/scripts/koha-shell kohadev $ echo $KOHA_INTRANET_URL $ Will try on different images. $KOHA_INTRANET_URL is not supposed to be the one coming from the shell you had before (does it?). It is defined in the .bashrc of the kohadev-koha $ grep KOHA_INTRANET_URL /var/lib/koha/kohadev/.bashrc export KOHA_INTRANET_URL=http://koha:8081 I think the env vars must be kept if --preserve-env is passed. But in that case we should do the test in the bashrc (if vars exist, don't reset them with the default values). Also I guess the following lines should be removed (var must be defined in bashrc?) 51 "env " 52 . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " 53 . "PERL5LIB=$perl5lib But we are going to far, the whole script needs its own bug report (if the above is correct). (In reply to Jonathan Druart from comment #16) > I think the env vars must be kept if --preserve-env is passed. > But in that case we should do the test in the bashrc (if vars exist, don't > reset them with the default values). > > Also I guess the following lines should be removed (var must be defined in > bashrc?) > 51 "env " > 52 . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " > 53 . "PERL5LIB=$perl5lib > > But we are going to far, the whole script needs its own bug report (if the > above is correct). It smells like this is a problem in KTD, the run.sh script should be doing things in a different way. We passed things like KOHA_INTRANET_URL to the koha-shell because the different default shells pick or not the variables depending on which is being used. Created attachment 105763 [details] [review] Bug 25538: Don't run search_utf8.t if KOHA_*_URL empty Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 105764 [details] [review] Bug 25538: Use sudo -i in koha-shell See man sudo, -i parameter. Should we expect regressions? Test plan: 0. Use D11 or U18. Don't apply this patch 1. $ echo $KOHA_INTRANET_URL $ sudo koha-shell kohadev $ echo $KOHA_INTRANET_URL 2. Apply this patch $ cp debian/scripts/koha-shell /usr/sbin/koha-shell 3. Repeat 1. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 105765 [details] [review] Bug 25538: Default to --login|-i if no command passed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> It all makes sense now that I've spent enough time trying myself to fix. root@3c7b0504a2a3:koha(master|BISECTING)$ cp debian/scripts/koha-shell /usr/sbin/koha-shell root@3c7b0504a2a3:koha(master|BISECTING)$ kshell bash: /root/.bashrc: Permission denied kohadev-koha@3c7b0504a2a3:/kohadevbox/koha$ pwd /kohadevbox/koha kohadev-koha@3c7b0504a2a3:/kohadevbox/koha$ exit # Switching to branch bug_25538 root@3c7b0504a2a3:koha(master|BISECTING)$ cp debian/scripts/koha-shell /usr/sbin/koha-shell root@3c7b0504a2a3:koha(master|BISECTING)$ kshell kohadev-koha@3c7b0504a2a3:~$ pwd /var/lib/koha/kohadev Isn't this actually a problem? root@3c7b0504a2a3:koha(master|BISECTING)$ koha-shell kohadev -p -c "prove t/DateUtils.t" t/DateUtils.t .. ok All tests successful. Files=1, Tests=79, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.49 cusr 0.03 csys = 0.55 CPU) Result: PASS So I should not break the tests launched by ktd. Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.01 backported to 19.11.x for 19.11.07 Backported to 19.05.x branch for 19.05.12 Still the same failure on 20.05_U18/11 (note that selenium/authentication.t is failing as well) Please report here when it happens. 19.11_U18 #190 > Please report here when it happens. https://jenkins.koha-community.org/view/19.05/job/Koha_19.05_D9/246/consoleText I moved the original issue to bug 26031. |