Make DrupalCI generate and run test-only patches

Created on 8 December 2020, over 4 years ago
Updated 6 January 2025, 3 months ago

Problem/Motivation

I'm wondering what's the best workflow for the test/test+fix pattern.

Which should be easy to do for contributors and reviewers, and error-prone.

Some motivation:
- (Note that we can not force-push: #3071674: Decide on force push rules for issue forks, implement if necessary β†’ )
- We have a fiddle-until-it-works branch and MR, that contains test+fix
- We want a test-only MR that tests red to prove the fix is covered
- When i worked on an issue lately i had a hard time remembering if the test in both MRs still was the same. Same for reviewer.

How can we solve the last point?

Proposed resolution

What we can do now (and document β†’ )

TESTED:
- fiddle-until-it-works on MR1 and test+fix is green
- checkout and commit the test part to MR2 and prove it is red

To prove tests are identical
- rebase both MRs to current HEAD
- pull both branches to your local machine
- validate that no test filed differ via `git diff --name-only TEST-branch TEST-PLUS-FIX-branch`

ABANDONED: fiddle/test/test+fix (does not work out as cherry-picks make different commit date and hash )-:
- fiddle-until-it-works on MR1 and test+fix is green
- (close/WIP MR1)
- checkout and commit the test part to MR2 and prove it is red
- do the that very same test commit on MR3, then the fix commit
- Care that MR2 and MR3 are onto the same HEAD commit (maybe rebase them)
- reviewer can then compare commit hashes to prove the tests are identical

(i thought about creating MR3 onto MR2 branch, but then we'd have to apply two separate MRs, which is bad)

What'd be yummy

Have a testbot configuration for "Test only the test part of a branch".
And have every MR tested a) as-is, and b) only the test part

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Closed: outdated

Version

3.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany geek-merlin Freiburg, Germany

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024