Problem/Motivation

Currently the Test stage depends on the entire lint stage completing before it starts.

Instead, we can depend specifically on the phpcs and spellcheck jobs (which build the yarn and composer caches) and set the entire job to cancel if linting fails. That way, a lint failure should still prevent the entire job from running while also allowing tests to start as soon as their absolute dependencies are met.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3468848

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review

Made a branch where phpstan fails - you can see that the Test jobs all start, but then get cancelled because the phpstan job fails. In this case it was within a few seconds of each other (hard to tell unless watching it live) which means the Test jobs didn't start a pod yet. https://git.drupalcode.org/project/drupal/-/pipelines/257801

This means we get the benefit of the lint jobs preventing a full test run if they fail without having to wait for every single lint step to finish first.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

As mentioned probably hard to see without it being live. But idea of starting as soon as phpcs is done makes sense. And probably be very welcome as I've seen code that probably works but never ran because a spacing issue or something small.

  • nod_ committed 4a46235f on 10.3.x
    Issue #3468848 by catch: Allow child jobs to run as soon as phpcs and...

  • nod_ committed b74565b0 on 10.4.x
    Issue #3468848 by catch: Allow child jobs to run as soon as phpcs and...

  • nod_ committed 7ca814c4 on 11.0.x
    Issue #3468848 by catch: Allow child jobs to run as soon as phpcs and...
nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Let's see how it goes

Committed and pushed c1463afbf7 to 11.x and 7ca814c420 to 11.0.x and b74565b08b to 10.4.x and 4a46235f62 to 10.3.x. Thanks!

  • nod_ committed c1463afb on 11.x
    Issue #3468848 by catch: Allow child jobs to run as soon as phpcs and...
nod_’s picture

  • catch committed e280ae1b on 10.3.x
    Revert "Issue #3468848 by catch: Allow child jobs to run as soon as...

  • catch committed 5bed46c9 on 10.4.x
    Revert "Issue #3468848 by catch: Allow child jobs to run as soon as...

  • catch committed 447a23c4 on 11.0.x
    Revert "Issue #3468848 by catch: Allow child jobs to run as soon as...

  • catch committed 7dc2d0ca on 11.x
    Revert "Issue #3468848 by catch: Allow child jobs to run as soon as...
catch’s picture

Version: 10.3.x-dev » 11.x-dev
Status: Fixed » Needs work

This broke the performance test pipeline. I think we could probably fix it by moving the performance pipeline into the main .gitlabci.yml, but reverting for now.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.