Drupal.org blog: GitLab CI templates will make Drupal 11 the default version to run

Whenever a new major version of Drupal is released, we update Drupal's GitLab CI testing templates to automatically update the versions being tested. Here's an outline of our plan:

Where we are now

Drupal 11 was released on August 6th. You can learn more about it on the Drupal 11 landing page.

This means that we are in the middle of a transition period where many sites and modules will want to be in Drupal 11, whereas some others might still want to stay in Drupal 10.

From a GitLab CI point of view, testing for both Drupal 10 and 11 simultaneously has been available for months, providing module maintainers with a great tool to test their code before Drupal 11 was launched.

This was available by setting one variable in the .gitlab-ci.yml like this:

variables: OPT_IN_TEST_NEXT_MAJOR: 1

Many maintainers have leveraged this already and we can see many modules already claiming full Drupal 11 support within days of the release. To be more specific, as of August 20th, 2870 projects have no compatibility errors anymore, and 1720 have made Drupal 11 compatible releases.

Where we want to be

We are preparing to update the default testing configuration for the GitLab CI templates, but we want to make sure to continue to support maintainers who still need to test against Drupal 10 and 11. We've outlined the changes we'll be making and the timeline below.

As of today:

  • Current version (default) is Drupal 10
  • Next major version is Drupal 11
  • Previous major version is Drupal 9

When we do the shift, this will change to:

  • Current version (default) is Drupal 11
  • Next major version will be Drupal 12 (when development starts) - see note below.
  • Previous major version is Drupal 10

For modules that were testing Drupal 10 and Drupal 11 simultaneously, the change will be as easy as this:

variables: # OPT_IN_TEST_NEXT_MAJOR: 1 OPT_IN_TEST_PREVIOUS_MAJOR: 1

Instead of opting in to test the next major, all you need to do is opt into the previous major.

Note: Drupal 12 development branch does not exist yet. Enabling this version might not do anything until this branch is created.

Steps

We are actively working on making the above switch in this issue: Update templates so 11.0 is the default/current branch.

We are going to be taking the following steps in the coming days / weeks.

Step 1: Make all modules start testing against Drupal 11

We will set the default value for OPT_IN_TEST_NEXT_MAJOR to 1 temporarily, and release version 1.5.6 of the templates. This will automatically become the default for all Contrib.

Modules that have not yet tested their code against Drupal 11 will now see "Next Major" test jobs in their pipelines, in addition to the "current" Drupal 10 variant. These new jobs have allow_failure: true, so the overall result of the pipelines should not change. This should show a good sense of where the module is at in relation to Drupal 11. Maintainers can still override the variable to be 0 if they don't want this behavior.

The expected date for this change is: August 26th, 2024 (next Monday)

Step 2: Roll out the shift and make it available for Contrib

When the issue Update templates so 11.0 is the default/current branch and all its dependencies all sorted, we will deploy the changes and create a new release 1.6.0. This will be available to Contrib projects using "gitlab ref" main or 1.x-latest

The expected date for this change is: September 5th, 2024 (2 weeks from now)

Step 3: Make the shift default for all Contrib

Then we will make this new release be the default for all contrib projects automatically.

However, we have provided several alternatives for modules that don't want to do the shift at this point. Any of the following can be used:

  • You can pin the version of the templates for your module to 1.5.6. This is the latest version released before the switch. Learn more about pinning the templates version in this page. Note that this means you will not get any updates to the templates for new features or bug fixes, until you un-pin the release.
  • You can set OPT_IN_TEST_PREVIOUS_MAJOR to 1 and OPT_IN_TEST_CURRENT to 0 to continue testing Drupal 10 and not Drupal 11.
  • You can configure your own variants as described on this page.
  • You can tweak the key variables used when creating variants so they have the versions that you desire. Check the above link for that information.

For those wanting to do the shift, you will not need to do anything at all.

The expected date for this change is: September 12th, 2024 (3 weeks from now)

After the shift is made

Onwards and upwards, that means that Drupal 11 is the default version to be tested for all new issues, merge requests, and pipelines for all contrib projects, allowing us to keep the Drupal ecosystem up to date and relevant.

There are some issues that are not blockers for this change, but are related, so we encourage you to see the issue list before reporting anything new, but otherwise create a new issue if you discover a problem and don't find it in the queue.

PubDate

Tags