Artifacts from previously successfully ran dependancies are not used when using only changes
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=27840) </details> <!--IssueSummary end--> ### Summary When using only changes in gitlab ci, some jobs can be skipped. However, if a job depends on one of the skipped jobs, there is no artifact available for this dependency, causing the job to fail ### Steps to reproduce Here is an example .gitlab-ci.yml file ``` stages: - build - test A: stage: build script: - 'echo test > subfolderA\testfile.txt' only: refs: - merge_requests - master changes: - subfolderA/**/* - .gitlab-ci.yml artifacts: name: "TEST_%CI_PIPELINE_ID%" when: on_success paths: - 'subfolderA/testfile.txt' B: stage: test script: - 'type subfolderA\testfile.txt' dependencies: - A only: refs: - merge_requests - master ``` Change a file in subfolderA, this will trigger the full pipeline successfully When the pipeline end, change a file NOT in subfolderA this will trigger only the job B. The job B will fail because it won't receive an artifact from A ### What is the current *bug* behavior? The job B will fail because it won't receive an artifact from A ### What is the expected *correct* behavior? The job B should receive the artifact from the last successful run of the job A gitlab-runner 11.9.1 (de08a4bb) on windows VM GitLab Community Edition 11.9.4
issue