Problem/Motivation
Currently, contrib tests run against the latest core version. Contrib projects may specify that a particular environment may run as "Issues & on Commit", "Branch on Commit", or "Branch Daily", but these options are always for the latest minor.
Contrib may trigger an individual test run against a different core branch using the "custom parameters", but this test run can only be triggered manually and does not become available for regular regression testing:

(Image courtesy @tim.plunkett.)
Core's minor version cycle and policies are intended to allow API additions, internal BC breaks, disruptions, UI changes, etc. in the scheduled minor versions, with only low-risk bug fixes in patch versions. However, the current testing policy means that contrib cannot take advantage of these scheduled disruptions, and is forced to track the development minor or run with broken HEAD. Something as small as changing a button text from "Save configuration" to "Save" can cause a contrib test suite that uses that form to fail, even though such a change is totally appropriate for a minor version of core. This is a frustration for contrib developers, and also makes it difficult to manage core policy for disruptions or additions to the testing API, because no matter what we do, contrib is broken immediately.
https://www.drupal.org/drupalorg/docs/drupal-ci/drupalorg-testing-policy does include a framework for triggering contrib tests against such targets, and identifies the following contrib targets (among others):
N - Semantic contrib patch-dev (2.0.x-dev)
N - Semantic contrib minor-dev(2.1.x-dev, 2.2.x-dev when 2.1.x-dev is in beta)
N - Semantic contrib major-dev(3.0.x-dev)
However, the policy does not currently cover the policy for which core code targets a contrib test can run against, and the current infrastructure does not yet support it.
There are concerns about scalability with contrib being able to specify too many frequent targets, so we discussed allowing only one environment for issues & on commit. However, having regular testing against the core versions the module supports -- both for the patch release and the minor -- is arguably more important than allowing contrib to test regularly against other databases/PHP versions/etc.
Finally, a contrib project branch might only support a certain minor version of core. my_contrib_project-8.x-1.x might work with 8.0.x, 8.1.x, and 8.2.x, while my_contrib_project-8.x-2.x might be compatible with 8.3.x+. Both 8.x-1.x and 8.x-2.x need to be tested for their respective branches until 8.3.0 is released.
Proposed resolution
Allow contrib projects to specify the desired testing scenario for the core development minor and the core stable branch, for the primary development environment only (the PHP version and database that core tests on patches and commit by default, currently PHP 5.5 / MySQL 5.5 but might be moved to PHP 7 / MySQL 5.5 in the future). This would appear at the top of the table on the QA page. The contrib maintainer would be able to select "Branch daily", "Branch on commit", or "Issues & Branch on commit" for this one environment for both relevant core branches (as rows) in the column for each of the contrib project's branches.
Remaining tasks
- Contrib maintainers can now specify tests against a specific branch of core in the new, more flexible testing interface thanks to #2651208: More-flexible, while reasonable, configured tests.
This unblocks the underlying concern of this issue.
However, this issue remains open because:
- It would be helpful to create default labels that chase core for 'current stable' and 'current dev' so that contrib maintainers don't have to manually configure the tests as core moves to keep up with testing.
- It may also be cost effective to limit these extra tests to the primary development environment, however, we did already implement a limit to a single environment for issue/patch testing. This wider branch testing is only available for the nightly tests configuration.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | branch_labels.png | 167.77 KB | mile23 |
| ctools_D82_test.png | 114.76 KB | xjm |
Comments
Comment #2
xjmComment #3
xjmComment #4
xjmComment #5
drummFor any implementation, #2651208: More-flexible, while reasonable, configured tests should happen first. This issue redesigns the project testing UI to provide more space for options, like this.
Comment #6
xjmHow far out is #2651208: More-flexible, while reasonable, configured tests? That sounds like really broad scope. The contrib issue is unfortunately a serious problem that is undercutting our use of semver, and it is becoming increasingly time-sensitive as efforts to update the test suite are underway.
Comment #7
drummThe UI half is relatively ready. The underlying implementation and deployment halves of work still need to be done. That one will save us $ because multiple tests sent in at the same time can cause bots to be over-provisioned. Getting that knocked out in the next few weeks wouldn't surprise me, but with DrupalCon coming up, I make absolutely no schedule promises.
Comment #8
MixologicThis is definitely an option that should be configurable, as contrib developers will want to be able to select which branch of core they run their development suite against, vs their regression suite.
I've updated the policy, because we definitely want to support this.
https://www.drupal.org/node/2696421/revisions/view/10112701/10112713
Comment #9
drumm#2651208: More-flexible, while reasonable, configured tests will give maintainers the ability to pin project & default issue testing to a specific branch of core, or the default that moves as core branches open up. Multiple configurations for all but issue testing can be set up.
I think that makes the main work here configuring a default environment for each API compatibility (7.x, 8.x).
Comment #10
drummComment #11
drummComment #12
drummSince the more-important part of this is done, allowing configuring contrib testing against previous core versions, unassigning myself until I'm able to get back to this. See #9 for more details.
Comment #13
hestenetComment #14
hestenetComment #15
MixologicAFAICT, this is now fixed now that contrib maintainers can select which branch label of core to test against.. is that true?
Comment #16
mile23Docs about core branch labels: https://www.drupal.org/drupalorg/docs/drupal-ci/drupal-core-branch-label...
Currently, looking at adding a test build for the Examples contrib project I see this:
So I could add a (seemingly) arbitrary number of weekly/nightly builds against both stable and supported/pre-release, even if my goal was to support only stable in issues.
I'd also be able to build against both stable and supported and/or development on commit, allowing me to see if a given commit will have a future deprecation break in the next minor.
BTW, the original issue talks about wanting to support the latest and greatest in core, but currently core has committed to guarantee BC. Therefore, for most contrib you could probably have a policy like: Support stable test builds (in issue and commit targets), and have a weekly build against development in order to find out about upcoming deprecations that affect your project. In order to accomplish this, you'd need a drupalci.yml file which says
run_tests: suppress-deprecations: false. See the drupalci.yml docs.So based on all that, I think this specific issue is fixed.
Thanks, d.o!