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

Various rubric behat failures

XMLWordPrintable

      This is a followup of MDL-79246 and a regression of MDL-78324

      Recently we have started to get these 3 failures in master (not always, but really, really often). And only with worker16 and worker17 (quicker ones).

      Link: https://ci.moodle.org/job/W.06.01%20-%20Behat%20-%20Chrome%20+%20Postgres%20+%20Classic/1364/

      001 Scenario: Using negative levels in rubrics # /var/www/html/grade/grading/form/rubric/tests/behat/negative_points.feature:7
            And I define the following rubric:       # /var/www/html/grade/grading/form/rubric/tests/behat/negative_points.feature:36
              Javascript code and/or AJAX requests are not ready after 10 seconds. There is a Javascript error or the code is extremely slow (amd-modal-js-pending-id-1). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)
       
      002 Example: | 70    | 1              | 38.50        | # /var/www/html/grade/grading/form/rubric/tests/behat/grade_calculation.feature:53
            And I define the following rubric:               # /var/www/html/grade/grading/form/rubric/tests/behat/grade_calculation.feature:33
              Javascript code and/or AJAX requests are not ready after 10 seconds. There is a Javascript error or the code is extremely slow (amd-modal-js-pending-id-1). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)
       
      003 Scenario: I can use rubrics to grade and edit them later updating students grades # /var/www/html/grade/grading/form/rubric/tests/behat/edit_rubric.feature:8
            And I define the following rubric:                                              # /var/www/html/grade/grading/form/rubric/tests/behat/edit_rubric.feature:36
              Javascript code and/or AJAX requests are not ready after 10 seconds. There is a Javascript error or the code is extremely slow (amd-modal-js-pending-id-2). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)
      

      In MDL-79246 some improvements were done to various ->click steps, but that did not fix master (while stables are passing ok). See this comment

      So, we agreed to roll weeklies (Sep 12th 2023) and perform a proper bisect with those failures. Here there is the bisect session details:

      1. It has been executed in worker16, with the worker reserved to get the maximum performance.
      2. master branch.
      3. 25 executions of the "Using negative levels in rubrics" scenario (one of the reported above).
      4. Bisect executed between 00f0613f99d2ca31f0b8e5b20267c0c3ba6873ea and 9b2c445143d895bf8ec53787b3e8382133e5433b (Sep 5th and Sep 12 2023) on-demand rolls.

      Results:

      a54ba682a4b73af116b0e01e56568d02ff1d590f is the first bad commit
      commit a54ba682a4b73af116b0e01e56568d02ff1d590f
      Author: Andrew Nicols <andrew@nicols.co.uk>
      Date:   Mon May 22 09:12:10 2023 +0800
       
          MDL-78324 core: Create modal factory in core/modal
          
          This commits adds a new static `create()` method to replace the existing
          ModalFactory.create approach.
          
          This allows the creation of a modal to now be simplified to:
          
          ```js
          import SomeModalClass from 'mymodule/wherever';
          
          // ...
          
          const modal = await SomeModalClass.create();
          ```
          
          Prior to this change the modal was instantiated via the ModalFactory,
          but the Type of modal was typically pulled from the ModalClass itself
          via the registry. Essentially it used to require three modules to
          instantiate a single Modal, and now it takes just one.
       
       lib/amd/build/modal.min.js             | Bin 14870 -> 15823 bytes
       lib/amd/build/modal.min.js.map         | Bin 45561 -> 48277 bytes
       lib/amd/build/modal_factory.min.js     | Bin 4852 -> 4399 bytes
       lib/amd/build/modal_factory.min.js.map | Bin 9523 -> 7882 bytes
       lib/amd/src/modal.js                   |  63 +++++++++++++++++++++++++++++++--
       lib/amd/src/modal_factory.js           |  59 +++++++-----------------------
       6 files changed, 74 insertions(+), 48 deletions(-)
      

      Aka. the 2nd commit in MDL-78324.

      This is the bisect session, in case it's of any help:

      $ git bisect log
      git bisect start
      # status: waiting for both good and bad commits
      # good: [00f0613f99d2ca31f0b8e5b20267c0c3ba6873ea] on-demand release 4.3dev+
      git bisect good 00f0613f99d2ca31f0b8e5b20267c0c3ba6873ea
      # status: waiting for bad commit, 1 good commit known
      # bad: [9b2c445143d895bf8ec53787b3e8382133e5433b] on-demand release 4.3dev+
      git bisect bad 9b2c445143d895bf8ec53787b3e8382133e5433b
      # good: [45cf011ab612f46e29b681b047fee23da5fda12f] Merge branch 'MDL-75740' of https://github.com/paulholden/moodle
      git bisect good 45cf011ab612f46e29b681b047fee23da5fda12f
      # good: [799487a3ddacd09020b8e1da3e5b85c420560a19] Merge branch 'MDL-63539' of https://github.com/danmarsden/moodle
      git bisect good 799487a3ddacd09020b8e1da3e5b85c420560a19
      # bad: [83296b266b84e1b4d58632c9f5787090a77acc7c] MDL-78324 theme_boost: Only shift focus if origin focus unchanged
      git bisect bad 83296b266b84e1b4d58632c9f5787090a77acc7c
      # bad: [98f0aebde64aa5c513ab2efc4667d37bdcedbe0a] MDL-78324 gradereport_singleview: Update modal usage to drop factory use
      git bisect bad 98f0aebde64aa5c513ab2efc4667d37bdcedbe0a
      # bad: [854da2dd7094c62f0cf68ec91874a4ef7989ba41] MDL-78324 mod_quiz: Update modals to stop using factory
      git bisect bad 854da2dd7094c62f0cf68ec91874a4ef7989ba41
      # bad: [a54ba682a4b73af116b0e01e56568d02ff1d590f] MDL-78324 core: Create modal factory in core/modal
      git bisect bad a54ba682a4b73af116b0e01e56568d02ff1d590f
      # good: [9073225c985e0277ba3ca21fd5f1725cda313f81] MDL-78324 core: Simplify modal configuration
      git bisect good 9073225c985e0277ba3ca21fd5f1725cda313f81
      # first bad commit: [a54ba682a4b73af116b0e01e56568d02ff1d590f] MDL-78324 core: Create modal factory in core/modal
      

            dobedobedoh Andrew Lyons
            stronk7 Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 39 minutes
                4h 39m

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