Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71312

Fix problems reported in apache logs before 3.11 release






      This is about to inspect apache logs for complete behat runs and fix as many notices / problems are shown there. Aggregating information from all supported themes.

      Used this regexp against goutte and chrome webserver logs, for reference:

      ag -v 'POST|GET|OPTIONS|\] (checking plan|(saving|calculating|loading|setting) controller|(applying|loading|instantiating) (backup|restore|plan)|(activity|section) skipped|setting file inclusion|processing file aliases|Unknown setting: (questionbank|overwrite_conf|course_shortname|course_fullname|course_startdate))|Failed Login: ' aggregated.txt > results.txt

      (where aggregated.txt is the union of goutte and chrome web server logs of all core themes)

      Trick: When it's difficult to find which exact behat test is causing the problem, it's useful to run the tests with the --pretty command, getting the date prepended, that way later can match them with the dates in apache error logs. To do so just add the following to your behat run command:

      vendor/bin/behat ......  --format pretty --no-colors | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'

      You can see the actual results @ results.txt

      Trick: Always look to previous release issue to verify if the error already was detected there and considered ok.


      Problem A: Cannot find session record. It happens 2 times.

      Happens in scenario "As a student, request deletion of account and data"

      48953:[Fri Apr 09 21:59:24.170459 2021] [php7:notice] [pid 2042] [client] Cannot find session record 2a6ab10f130092ec1d6cbfd42d026b93 for user 104000, creating new session., referer: http://webserver8561236a31f1d360/behatrun1/user/profile.php?id=104000

      Confirmed that it's testing exactly that the session becomes has expired (see prev. release). So 100% ignorable.

      Problem B: User id 'xxxxxx' already has a grade. It happens 2 times.

      Happens with scenario "Delete and restore a quiz with user data.

      136170:[Fri Apr 09 23:25:03.534388 2021] [php7:notice] [pid 4195] [client] User id '105001' already has a grade entry for grade item id '255000', referer: http://webserver8561236a31f1d360/behatrun2/admin/tool/recyclebin/index.php?contextid=101002

      Confirmed that it's trying to recreate already existing course grade (see MDL-68961 and prev. release). So 100% ignorable.

      Problem C: Coding error detected, it must be fixed by a programmer. It happens 2 times (classic).
      Happens with scenarios: "Edit a self-enrolled user's enrolment from the course participants page" and "Unenrol a self-enrolled student from the course participants page"

      250116:[Fri Apr 09 20:29:07.635171 2021] [php7:notice] [pid 2051] [client] Default exception handler: Coding error detected, it must be fixed by a programmer: No further information available for this branch Debug:
      Error code: codingerror


        Issue Links



              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              0 Vote for this issue
              1 Start watching this issue