Contrib module branch tests should be run against all minor core versions, for example both 8.0.x and 8.1.x

This will allow contrib authors to be warned via test breakages if we knowingly or unknowingly introduce an API incompatibility while 8.1.x is in development.

Additionally, after 8.1.0 is out, it will also catch incompatibilities where contrib modules add a dependency on 8.1.x APIs without specifying an explicit core version dependency.

Nice to have would be patch testing since knowing in advance that a patch will break a branch puts the emphasis on the patch contributor rather than the module maintainer to fix the incompatibility.

Comments

catch’s picture

drumm’s picture

This can be done in two phases:

First - Make sure testing selects the one correct current version to test against. This removes the blocker, and is all we need until 8.1.x is branched.

Second - Testing against multiple core branches. I think this may only be supported with the new drupalci stack, along with other multi-environment testing.

yesct’s picture

adding "infrastructure blocker for Drupal 8.0.0" tag, since this blocks the drupal 8 core issue: #2267715: [meta] Drupal.org (websites/infra) blockers to a Drupal 8 RC1, so that the infrastructure blockers to d8 release (in issue queues outside of the core queue) is accurate. Remove the blocker tag when this issue is fixed, and update 2267715.

catch’s picture

Title: Run contrib module branch tests against all support minor core branches » Run contrib module branch tests against all minor core branches
isntall’s picture

Project: Drupal.org Testbots » DrupalCI: Dispatcher (Modernizing Testbot Initiative)
catch’s picture

Title: Run contrib module branch tests against all minor core branches » Run contrib module branch tests against both dev and latest stable core branches

Clarifying the title, when I opened this I think we were still talking about supporting multiple stable minor branches at a time, whereas we really just need two at a time afaik.

Mixologic’s picture

Would we need to run the branch tests against every environment for *both* dev and latest stable, or would acceptable to use just the 'default' testing environment (probably mysql 5.5/php5.5) for contrib branch tests run with the dev branch of core?

mallezie’s picture

Could we make the default test environment(s) selectable per contrib branch? By default test against the default (php5.5/mysql5.5) and add environments to default test against.
I think the default (php5.5/mysql5.5) is enough for most, but for some projects it could be useful to set another / extra default test environment (thinking for example db driver projects). Could be a followup perhaps to set additional default test environments.

Mixologic’s picture

@mallezie - that already exists - contrib can specify which environments that branch, commit, and patch tests are ran against. This issue is about what branch of *core* is checked out for those contrib tests.

There is another wrinkle in this, however, and that is if we get to a state where we are using composer to resolve core's dependencies, then we might need to also run the tests against both versions of core (dev and stable) by their minimum and maximum supported dependency versions.

catch’s picture

There is another wrinkle in this, however, and that is if we get to a state where we are using composer to resolve core's dependencies, then we might need to also run the tests against both versions of core (dev and stable) by their minimum and maximum supported dependency versions.

I'm not sure this will be necessary. Even if we remove code from /vendor, I'd expect us to check the composer.lock file into core, so that everyone gets exactly the same version of vendor libraries regardless of tarball vs. git etc. If for some reason we decide not to do that though, then min/max dependency testing would be very necessary though!

catch’s picture

Just a note we discussed core branching at Drupalcon and may want to look at opening release branches for release candidates and/or patch releases. For that having tests run on both the release branch (one at a time) and 8.0.x would be useful. To do this during rc means we'd need support for this earlier than anticipated.

Also we may want to open 8.1.x earlier than previously anticipated. And possibly opening the 8.2 branch around when 8.1 gets to rc stage.

This would mean running contrib tests against the 8.0.x, 8.0.1, 8.1.x and 8.2.x branches all at the same time. That ought to be the maximum though.

catch’s picture

Opened #2576141: Release branches for core patch releases/release candidates for the core side of using release branches. What we're able to do here obviously affects what's possible there.

webchick’s picture

drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

Two parts to solving this issue:

  • Testing against 8.0.x is hard-coded right now. We can always change the hard-coding at the right time, but it really shouldn't be hard-coded.
  • Actually adding the option to test against a non-default core branch.

For part one, there currently isn't a programmatic way for Drupal.org to know whether 8.1.x or 8.0.x is current. #2385781: Replace "Snapshot" on Releases page for projects with per-release field will add a field that PIFT can use.

drumm’s picture

With #2385781: Replace "Snapshot" on Releases page for projects with per-release field now deployed, Drupal core can branch 8.2.x as a placeholder, make the release, unchecking "Show in project’s download table when branch is supported". That checkbox will do what it says, and issues can be moved to the 8.2.x version.

And PIFT can use this to know that the most recent shown in the download table is the current core branch.

drumm’s picture

drumm’s picture

Project: DrupalCI: Dispatcher (Modernizing Testbot Initiative) » Project issue file test
Version: » 7.x-3.x-dev
Component: Code » User interface

I believe that takes care of the prerequisites. Now we need a UI for selecting the core branch for tests.

  • drumm committed 9e27b7e on 7.x-3.x
    Issue #2268449: Change label, manual project testing won't always be...

  • drumm committed 9e27b7e on 2268449-core-branches
    Issue #2268449: Change label, manual project testing won't always be...
  • drumm committed f6db84d on 2268449-core-branches
    Issue #2268449: Make pift_core_api_releases() able to get all possible...
  • drumm committed f78efd5 on 2268449-core-branches
    Issue #2268449: Run contrib module branch tests against both dev and...

  • drumm committed f6db84d on 2268449-core-branches
    Issue #2268449: Make pift_core_api_releases() able to get all possible...
drumm’s picture

StatusFileSize
new40.41 KB

Here is the UI so far for adding a one-off test for a contrib project's branch:

Screenshot

xjm’s picture

Should the UI also indicate which core branch each test is tested against? I.e., I assume the existing tests listed for CTools are 8.0.x and the added one would be in a similar pill.

  • drumm committed 43a3aed on 7.x-3.x
    Issue #2268449: Show core_branch for tests when set
    
  • drumm committed 77c2fc2 on 7.x-3.x
    Issue #2268449: Store core_branch at time of job creation
    
drumm’s picture

Yep, I've added that, along with storage for the branch.

  • drumm committed 43a3aed on 2268449-core-branches
    Issue #2268449: Show core_branch for tests when set
    
  • drumm committed 75b8461 on 2268449-core-branches
    Issue #2268449: Run contrib module branch tests against both dev and...
  • drumm committed 77c2fc2 on 2268449-core-branches
    Issue #2268449: Store core_branch at time of job creation
    
drumm’s picture

The 7.x-3.x commits are now deployed on Drupal.org. New contrib tests will now show the core branch used in the UI.

On the feature brach - the custom test UI is hooked up to the data storage. The missing part is actually listing the custom tests for the project so you can find them again. And the same for issue tests.

  • drumm committed c210fec on 7.x-3.x
    Issue #2268449: Add pift_ci_job.custom column to be able to find custom...

  • drumm committed 121bcf5 on 2268449-core-branches
    Issue #2268449: Clean up project testing page, and add custom tests...
  • drumm committed 802946a on 2268449-core-branches
    Issue #2268449: Mark custom test as custom, and clean up UI for custom...
  • drumm committed c210fec on 2268449-core-branches
    Issue #2268449: Add pift_ci_job.custom column to be able to find custom...

  • drumm committed 121bcf5 on 7.x-3.x
    Issue #2268449: Clean up project testing page, and add custom tests...
  • drumm committed 75b8461 on 7.x-3.x
    Issue #2268449: Run contrib module branch tests against both dev and...
  • drumm committed 802946a on 7.x-3.x
    Issue #2268449: Mark custom test as custom, and clean up UI for custom...
  • drumm committed f78efd5 on 7.x-3.x
    Issue #2268449: Run contrib module branch tests against both dev and...
drumm’s picture

The UI from #22 is now deployed on Drupal.org. Next up is the same for issue testing.

I put in some improvements to the project testing listing too. Now shown:

  • Most recent completed test for every branch/environment.
  • Any queued tests.
  • Custom tests created in the last 30 days.

  • drumm committed d25b35c on 7.x-3.x
    Issue #2268449: Add custom tests for issue tests, including core version...
xjm’s picture

One additional suggestion -- it was not clear to me that I had to check "Custom parameters" to get the selectors for the branch and environment. Is there any way to improve the label for that checkbox, or maybe just show those selectors all the time?

drumm’s picture

StatusFileSize
new21.51 KB

Screenshot

Good idea, here's what changed:

  • Added white space above the custom parameters checkbox, it is distinct enough from the other options.
  • Disabled the select options instead of hide when unchecked.
  • Added a fieldset to group them under the checkbox.

  • drumm committed 04a345b on 7.x-3.x
    Issue #2268449: Clean up custom parameters UI
    
drumm’s picture

Status: Active » Fixed
Issue tags: +needs drupal.org deployment

I'm going to be bold and see if this is fixed. It can be deployed to Drupal.org tomorrow.

This does only cover one-off testing with non-default core branches, not regular automated testing. This issue did get a big chunk of work done, adding the concept of custom tests, which I expect we’ll expand in the future. Making this available as a default option, like “test … with 8.0.x daily,” will need a re-think of the table-of-selects used to configure project testing currently. That probably needs a separate issue.

drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed to Drupal.org.

Status: Fixed » Closed (fixed)

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

mile23’s picture

Nice. :-)

Heres' a bit of a follow-up to cover regular automated testing: #2663018: Useful core branch defaults for contrib CI