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
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:
- 3468848-fail
changes, plain diff MR !9248
- 3468848-allow-child-jobs
changes, plain diff MR !9249
Comments
Comment #3
catchMade 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.
Comment #5
smustgrave commentedAs 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.
Comment #9
nod_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!
Comment #11
nod_Comment #17
catchThis 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.