Problem/Motivation

Currently .gitlab-ci.yml calls out to .gitlab-ci/pipeline.yml to run kernel and functional tests. However, this is tricky to navigate in the GitLab UI, because the unit tests appear in the parent and other tests in a separate pipeline.

Steps to reproduce

Proposed resolution

Run the main set of tests in .gitlab-ci.yml itself.
Add a recursive call to .gitlab-ci.yml when running secondary test runs with different parameters.

Optionally, see if we can do test-only runs in a similar way.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3572375

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

longwave created an issue. See original summary.

longwave’s picture

Note: this might not be workable, but it's an idea I had while getting annoyed with clicking into child pipelines for the umpteenth time.

longwave’s picture

Status: Active » Needs review

Turns out this wasn't that tricky after all, and IMHO the pipeline and test results pages are much easier to use this way.

longwave’s picture

Should we also move the repeat and performance tests into the "additional tests" stage?

borisson_’s picture

I agree this looks much nicer. I think moving both the performance and repeat tests to additional tests make sense, that means most of the block will be ran by default?

mondrake’s picture

Status: Needs review » Needs work

Very nice. Added some comments inline. NW for the fact that PHPStan job did not run, the other ones are for thought.

longwave’s picture

Status: Needs work » Needs review

Thanks for review, fixed the PHPStan job, responded to the other feedback.

I do not understand how GitLab sorts the job titles where emoji are involved, but I moved performance and repeat tests to "Additional tests" and the layout looks pretty good to me at the moment.

longwave’s picture

I also don't understand why the suppress deprecations flag isn't working on the W3C legacy tests - but only when they are run in a child pipeline?

mondrake’s picture

Status: Needs review » Needs work

The "PHPUnit Functional Javascript (non W3C legacy)" when run in the new 'Additional Tests' stage is not ignoring deprecations apparently.

longwave’s picture

Status: Needs work » Needs review

Fixed the issue with the legacy W3C tests, the webdriver config variable was not being overridden correctly.

mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Let's go! Hard to predict if everything will work smooth for commit/daily/perf tests, but I guess we'll manage like we did in the past already for sweeping changes to the pipeline setup. Thanks

kentr’s picture

Status: Reviewed & tested by the community » Needs work

There are merge conflicts.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Rebased, the non-w3c tests are gone.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Very nice ux improvement for the pipelines. Let's try it and hope not too much breaks.

Committed/pushed to main, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed 3c911e9b on main
    task: #3572375 [ci] Run tests in top level pipeline, use recursion for...

nicxvan’s picture

I think this change is causing tests to run in the parent project rather than the issue fork, this prevents anyone but committers from rerunning tests.

I think we should revert this in the short term until we can resolve that.

dww made their first commit to this issue’s fork.

dww’s picture

Alas, I don't think so. I didn't see anything in here that would affect which project the pipelines run in. I tried opening an MR to revert the commit. https://git.drupalcode.org/project/drupal/-/merge_requests/14921/pipelines shows a new pipeline, and it's got the old pipeline shape, but it's still running in the parent project, not the issue fork: https://git.drupalcode.org/project/drupal/-/pipelines/753666

So I'm 95% sure the problem is a change in GitLab behavior from a recently deployed "upgrade", and we need to escalate #3547431: Change global settings for all GitLab projects: fork pipelines and merge trains to major or critical (at least the part about "allow pipelines to run in parent project" to be set to false).

catch’s picture

Status: Fixed » Needs work

https://git.drupalcode.org/project/drupal/-/jobs/8664868 performance tests aren't happy.

Re-opening temporarily, haven't looked yet but assume it's a side effect of things moving around in the YAML.

longwave’s picture

Status: Needs work » Needs review

MINK_DRIVER_ARGS_WEBDRIVER was only set for the FunctionalJavascript tests, but it also needs to be set for the performance tests; hoisted it to the top level of the pipeline. If this is green I think it should fix the performance tests too.

nicxvan’s picture

I still can't rerun these tests on the newest MR.

nicxvan’s picture

I added https://gitlab.com/gitlab-org/gitlab/-/issues/591657

Since it seems it could be due to the gitlab 18.9.1 update.

  • catch committed ce25fce2 on main
    task: #3572375 [ci] Run tests in top level pipeline, use recursion for...
catch’s picture

Status: Needs review » Fixed

Going to commit from needs review since there's no way to tell if this works otherwise, but we can see it hasn't broken anything via the MR pipeline.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

nicxvan’s picture

I think this runs all stages even if the linting fails, we have an issue to allow this for draft MRs, but I think it's unintentional to always run all tests.

catch’s picture

Yes I think that's a side-effect rather than intentional. But also it's nice if we can eke a few seconds shorter pipelines out of this.

I'm wondering if instead of blocking tests on all lint stages, we could instead use https://gitlab.com/gitlab-org/gitlab/-/issues/23605 to cancel the pipeline when specific linting jobs fail (and maybe not include cspell in that). If one of those jobs fails quickly it would save the CI time on a full test run, but otherwise it'll start those jobs asap.

nicxvan’s picture

We could also ask the DA if they've seen a significant increase in worker minutes since this merged.

The budget is what concerns me about this change without gating it behind the drafts.

It is slightly faster, but honestly the fact that we can't rerun tests or even view them on 11.x is the biggest blocker for me, not waiting a minute for stage one to complete.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.