"only: changes:" triggered when rebasing but files not changed
Summary
When creating a Merge Request, we have our Gitlab pipeline run a certain job dependent on files changed. For this example, say I amend some file in Folder1 and we have an "only:changes:" block for that folder. The MR will then kick off the pipeline running the build that depend on changes in the folder, as we expect. If then someone else has their MR accepted, we need to rebase before we can merge into the target branch, however, doing this then triggers builds from the change that is pulled.
For example, if the previous commit to the target branch has changed something in Folder2, even though my MR changes shows zero changes to the Folder2 files (as I haven't touched, I have merely rebased) it will still run the pipeline/builds for "only:changes:" based on Folder2.
Steps to reproduce
Create a couple of root folders in a repo, have your gitlab YAML have a couple of builds, one with only changes for one folder, and the other build with only changes for the second folder. Create a new branch, change stuff in the first folder, make an MR, watch the pipeline fire off the first folder builds correctly.
Now, amend the target branch (master I guess) to change something in folder2 (or do another MR and approve then merge it) and the original MR will be 1 commit behind. Rebase and you'll see that the pipeline now wants to also run the build for changes in folder2, when nothing has actually changed content wise.
Example Project
Unfortunately we use a self-hosted Gitlab so don't have a project to share.
We are running GitLab Enterprise Edition 11.9.1-ee
What is the current bug behavior?
Runs builds for changes that haven't happened on the branch in question.
What is the expected correct behavior?
The MR auto pipeline bit realizes nothing has changed so doesn't fire off unrelated builds.
Results of GitLab environment info
I don't have access to our Gitlab to run any of these sudo commands, just Web UI access where I can see the version
Results of GitLab application Check
Ditto above