Problem/Motivation
As per slack conversation here https://drupal.slack.com/archives/C03P8AM3B0Q/p1700075674883899
It'd be great if the test-only job would be easier/quicker to access, instead of waiting for the first steps of the pipeline and the first child pipeline to start running, to be able to trigger it.
This was also made worse by the need of constant rebases, but that was addressed and fixed here #3401971: Test-only job shouldn't require constant rebases to detect which files were changed.
Steps to reproduce
Try to run the test-only job for any MR... then think how it could be improved
Proposed resolution
Maybe have a "Test-only (defaults)" job in the parent pipeline that can be triggered as soon as the pipeline is open, and that will use the default PHP and DB version. For individual "Test-only" jobs, you can still go to each child pipeline and then trigger it from there.
Remaining tasks
MR
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | Screenshot 2023-11-21 at 16.19.48.png | 92.99 KB | fjgarlin |
| #3 | Screenshot 2023-11-16 at 19.08.16.png | 160.98 KB | fjgarlin |
Issue fork drupal-3402203
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:
- 3402203-test-only-label
changes, plain diff MR !5588
- 3402203-investigation-see-if
changes, plain diff MR !5435
Comments
Comment #3
fjgarlin commentedThis is what I suggest.

The
Test-onlyjob would be accessible straightaway when opening the main pipeline, so you don’t need to navigate to the children ones (where it’s still available).I also renamed the jobs so that the
DEFAULT - …ones are always on top.Pipeline: https://git.drupalcode.org/issue/drupal-3402203/-/pipelines/51092
The code is just a POC put together, far from the final version, so no need to check the code yet, just functionality.
Feedback is welcome whether this is an improvement or not.
Comment #4
catchI like the idea of an easily accessible version in the parent pipeline.
Comment #5
longwave+1 this makes it much easier to find.
Comment #6
fjgarlin commentedI am going to go ahead and put this as "Needs review".
I tried at first to not repeat yml template blocks, but gitlabci does not expand anchors from included files, nor allows "!reference" in the ways that we need them here.
I still simplified as much as possible the new "Test only" pipeline and was able to abstract/reuse two big blocks of code into bash files. I think this actually makes some bits easier to maintain and that way we don't need to repeat the code in more places.
https://git.drupalcode.org/issue/drupal-3402203/-/pipelines/52966 contains one run with changes to test files (to test the new test-only pipeline).
Feedback is welcomed.
Comment #7
smustgrave commentedWanted to say we just added this feature and people just started finding out where it is, Moving it may cause some confusion.
Moving to NW because before I could click into the PHP8.2 and Mysql8 job and run the test-only feature there. Now that it's out of that job what parameters is it running with? Sometimes we may want to run with different versions.
Comment #8
fjgarlin commentedWe are not "moving" it. We are adding a new one in a more convenient place.
The "old" ones will remain where they are, unchanged, and the "new" one is just placed in a handy location to trigger it quicker with the same default DB and PHP versions as the default pipeline. I just added the versions to the name to make it more obvious anyway.
You can still run the "Test-only" job for any of the other versions of PHP+DB.
Marking as "Needs review" again hoping that I answered your question.
Comment #9
smustgrave commentedIt'll be a longer string but can the label be updated to include what the "Default" test-only is running with. Default test will change and I'm not sure it's going to be clear to people what test-only default ran with.
Comment #10
fjgarlin commentedI did exactly that in the last commit here: https://git.drupalcode.org/project/drupal/-/merge_requests/5435/diffs?co...
Example of what I meant before, the "new" one and also the current ones (ie: for SQLite):

Comment #11
smustgrave commentedIn that case think this is good.
Comment #12
longwaveLooks good and I was about to commit but this now needs rebasing against 11.x.
Comment #13
fjgarlin commentedRebased and pipeline running: https://git.drupalcode.org/issue/drupal-3402203/-/pipelines/54183
Marking as RTBC as that was the previous state. The conflict on rebase was on #3403420: Test reports contain absolute path and link leads nowhere, which is applied in this one after the rebase (and in the new pipeline file too).
Comment #14
longwaveCommitted and pushed 0d44d1f7b0 to 11.x and 8f5fa56905 to 10.2.x. Thanks!
Comment #17
longwaveComment #19
fjgarlin commentedThe very last commit I made was lost on the rebase (my bad), so here is a new MR that brings it back: https://git.drupalcode.org/project/drupal/-/merge_requests/5588/diffs
Please review.
Comment #20
longwaveCommitting from NR as this is a one line change to a text string visible only in CI.
Also fixing issue credit as the commit bot overwrote the change last time.
Committed and pushed 52c25c27b5 to 11.x and 2131d24946 to 10.2.x. Thanks!