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

Behat random failures with the "Change grading options in an H5P activity" feature

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Hide

      CIs will tell us, given the random nature of the issue, it's really hard to reproduce it locally. Only if you've a super-computer like me, you will be able to. :-D

      Show
      CIs will tell us, given the random nature of the issue, it's really hard to reproduce it locally. Only if you've a super-computer like me, you will be able to. :-D

      It started around 02 October 2022. And it's quite strange, be warned!

      • It affects to ALL branches (39, 311, 400, master).
      • It affects to ALL databases (though happen often with Oracle).
      • Only Chrome
      • Always happening on workers 11, 12 and 13, that are the ones already upgraded to Ubuntu 22.04 (jammy) and being tested before upgrading all.
      • In Mac, I've been able to reproduce it, but with very varying results (0, 1, 19, 27 failures in 50 repetitions).

      So it seems clear that, somehow (maybe because they are slower, or maybe because they are quicker...) only the workers running 22.04 are affected. Here there are some runs showing the failures:

      But, as said, results are varying, sometimes they pass without a fail, see:

      Also, here there are some Mac runs (on iron, not using docker):

      • 50 repetitions locally (mac iron headless): repeat finished: 50 executions, 49 ok, 1 failed.
      • 50 repetitions locally (mac iron headless): repeat finished: 50 executions, 23 ok, 27 failed. !!!
      • 50 repetitions locally (mac iron headless): rrepeat finished: 50 executions, 31 ok, 19 failed.
      • 50 repetitions locally (mac iron headless): repeat finished: 50 executions, 50 ok, 0 failed.

      And here there are some CI runs (on docker):

      To reproduce the (random and mysterious) failures, just run the "Change grading options in an H5P activity" scenario a number of times and you will get 0..n failures.

      Affected scenarios, all them within that feature are:

      • Default grading is max attempt grade
      • Change setting to average attempt
      • Change maximum grade without rescaling grade
      • Reescale existing grades changing the maximum grade

      The theory is that, for some reason, the new workers are more sensible to those tests, maybe because they run quicker, or maybe because they run slower, that's to determine. And that makes that the 3 attempts the student does in the background of the feature file are not recorded on time. So, later, when it's checked in the scenarios, the averages, maximum and so on don't match the expectations, because the attempts (wrong, good, wrong / 0, 100, 0) are not there.

      Also, getting so unconsistent results (0, 1, 19, 27..) failures makes it tricky to trace.

      Let's see, here there are 2 proposed steps to try to advance:

      1. Whenever an attempt is recorded, send something to webserver logs, so we can see how many of them are effectively saved.
      2. Irrespectively of the previous point... we should create generators for the attempts of the h5p activity so all those "iframe" steps don't need to be executed anymore (but in some scenario exclusively checking them, we must ensure we have at very least one covering the manual attempts).

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours
                1d 4h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.