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

Reduce the number of phpunit runs in core's .travis.yml

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Hide
      • Verify that the travis builds above continue passing ok, and they only have executed 3 jobs each (only those using php lowest version and pgsql as database). PHPUNIT, GRUNT and CI-TESTS.
      • Verify that there isn't any UPGRADE job executed (because we have removed it as part of this issue).
      • Bonus: play with the MOODLE_DATABASE and MOODLE_PHP env variables in your travis configuration to see they work as expected (MOODLE_DATABASE = [pgsql|mysqli|all], MOODLE_PHP = [all] . Trick, cancel the jobs as soon as they start... you only need to verify that the configured ones are launched.
      Show
      Verify that the travis builds above continue passing ok, and they only have executed 3 jobs each (only those using php lowest version and pgsql as database). PHPUNIT, GRUNT and CI-TESTS. Verify that there isn't any UPGRADE job executed (because we have removed it as part of this issue). Bonus: play with the MOODLE_DATABASE and MOODLE_PHP env variables in your travis configuration to see they work as expected (MOODLE_DATABASE = [pgsql|mysqli|all] , MOODLE_PHP = [all] . Trick, cancel the jobs as soon as they start... you only need to verify that the configured ones are launched.

      Recently travis announced their plans to kill current (concurrency-throttled, but virtually unlimited) plans for public / open-source repositories.

      Public announce: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
      Summary: https://www.theregister.com/2020/11/02/travis_ci_pricng/

      That has a big impact on everybody (HQ and non HQ) and far as all the "pushes" and PRs against repositories now account by reducing the number of remaining "credits" in all the (usage-based) plans (specially in the new free plans where everybody is being moved to by default).

      And that affectst both to core (where we share a default .travis.yml file that everybody is using) and in other public moodlehq repositories (say moodle-plugin-ci, codechecker, 3rd part plugins... a bunch of them) practically all accepting PRs). Again, HQ and non HQ.

      There are various initiatives going around (discussions, to-pay-or-not-to-pay, ask/request for their new open-source plan and see what it provides, find-alternative ci/cd solutions out there...), and we should be unifying all them and their information soon.

      While that happens (lots of open fronts right now), one simple measure to "alleviate" the spending of credits (free or paid) for all the people developing moodle-core patches around is to make the bundled .travis.yml lighter/quicker.

      Right now we run 3 complete phpunit jobs there, see this, for example (random pick). And that takes 1h45m to finish (aka, ~ 100 minutes = 1000 credits).

      So, an immediate action to try to reduce the spent credits would be to reduce the number of phpunit runs down to 1 (oldest php version one, surely).

      Note that, later, all those branches are already re-tested, both by pre-checks and post-checks @ ci.moodle.org so, if there is any problem with any combination (php version, database version...) we'll be able to detect it there.

      So, as an emergency measure... this is a proposal to perform that reduction down to just one phpunit run in core (commenting out the two highest php version ones). That will, immediately, reduce the minutes to 1/3 (aprox! ignoring other little tasks), same for credits.

      Later we can think if we want to allow that to be configurable (each dev deciding via ENV configuration...) or other details. But right now, the sooner we reduce the consume of credits the better for everybody.

      Let's see how the whole thing evolves, ciao

        1. MDL-70265-step1.png
          MDL-70265-step1.png
          84 kB
        2. MDL-70265-step2-310.png
          MDL-70265-step2-310.png
          29 kB
        3. MDL-70265-step2-311.png
          MDL-70265-step2-311.png
          29 kB
        4. MDL-70265-step2-35.png
          MDL-70265-step2-35.png
          25 kB
        5. MDL-70265-step2-38.png
          MDL-70265-step2-38.png
          30 kB
        6. MDL-70265-step2-39.png
          MDL-70265-step2-39.png
          29 kB
        7. MDL-70265-step2-master.png
          MDL-70265-step2-master.png
          28 kB
        8. MDL-70265-step3-310.png
          MDL-70265-step3-310.png
          75 kB
        9. MDL-70265-step3-311.png
          MDL-70265-step3-311.png
          75 kB
        10. MDL-70265-step3-35.png
          MDL-70265-step3-35.png
          74 kB
        11. MDL-70265-step3-38.png
          MDL-70265-step3-38.png
          76 kB
        12. MDL-70265-step3-39.png
          MDL-70265-step3-39.png
          74 kB
        13. MDL-70265-step3-config-master.png
          MDL-70265-step3-config-master.png
          104 kB
        14. MDL-70265-step3-master.png
          MDL-70265-step3-master.png
          50 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Michael Hawkins Michael Hawkins
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 30 minutes
                1d 30m

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