Problem/Motivation

Currently, the test-only job relies on a rebased MR to detect the changes and then do the rest of the logic. If the MR is not rebased, it will pick up other files not changed at all in the current MR.

Steps to reproduce

Create an MR against 11.x, wait until the next commit in 11.x, then run the "Test-only" job, you'll see that the list of files changed shown in the job contains more files than the ones that were changed in the MR.

Proposed resolution

Use a different "git diff" logic to detect the exact changes of the MR.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#14 3401971-nr-bot.txt90 bytesneeds-review-queue-bot

Issue fork drupal-3401971

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

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Status: Active » Needs review

The files reported here https://git.drupalcode.org/issue/drupal-3401971/-/jobs/341345 were the correct ones, even if the MR needs a rebase.

The fix I made was suggested here: https://stackoverflow.com/questions/68260856/gitlab-diff-between-merge-r...

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

This would be huge. Thanks for linking to the stackoverflow for reference.

  • catch committed 1706acdb on 10.2.x
    Issue #3401971 by fjgarlin: Test-only job shouldn't require constant...

  • catch committed 372878cf on 11.x
    Issue #3401971 by fjgarlin: Test-only job shouldn't require constant...
catch’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!

wim leers’s picture

🙏🙏🙏🙏🙏🙏

🤩🤩🤩🤩🤩🤩

smustgrave’s picture

Looking very forward to trying this out today

fjgarlin’s picture

Status: Fixed » Needs work

I've been getting fatal: bad object 7ddc1b8e0e312c46b62b8fecf49cf5795323052d in certain jobs (ie: https://git.drupalcode.org/issue/drupal-3395977/-/jobs/353396).

This seems to be due to the shallow clone depth, which is set to 20.
Reference: https://docs.gitlab.com/ee/ci/pipelines/settings.html#limit-the-number-o...

We are currently setting this value to a low number GIT_DEPTH: "3" currently in the .gitlab-ci.yml file
We might need to set this variable to a bigger value. Investigating...

wim leers’s picture

We might need to set this variable to a bigger value. Investigating...

Can we not simply override that only for the "test only" job? Since that's manually triggered anyway, the extra load would be minimal?

fjgarlin’s picture

Version: 10.2.x-dev » 11.x-dev
Status: Needs work » Needs review

That's exactly what I did :-)

MR is ready for review: https://git.drupalcode.org/project/drupal/-/merge_requests/5451/diffs
The failing job where I discovered is no longer failing: https://git.drupalcode.org/issue/drupal-3395977/-/jobs/353569

I went with 50 but happy for that to be changed to whatever makes the most sense.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

fjgarlin’s picture

Status: Needs work » Needs review

Rebased.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Failure appears random.

  • catch committed 0f92317d on 10.2.x
    Issue #3401971 by fjgarlin: Test-only job shouldn't require constant...

  • catch committed b90362e8 on 11.x
    Issue #3401971 by fjgarlin: Test-only job shouldn't require constant...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed the follow-up to 11.x and 10.2.x, thanks!

alexpott’s picture

Version: 11.x-dev » 10.2.x-dev

Status: Fixed » Closed (fixed)

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