Add source filter to newest_first method in the Pipeline model
What does this MR do and why?
Add source filter to newest_first method in the Pipeline model
This fixes the post-merge pipeline widget status showing the latest pipeline regardless of its source
References
- Post-merge pipeline status isn't showing the co... (#418120 - closed)
- [FF] `source_filter_pipelines` -- Add source fi... (#540892 - closed)
Screenshots or screen recordings
How to set up and validate locally
- Setup a project with the following pipeline configuration
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH
branchpipeline:
script:
- cat nonexistentfile.yml
except:
- schedules
- merge_requests
mrpipeline:
script:
- sleep 5
only:
- merge_requests
schedulepipeline:
script:
- sleep 5
only:
- schedules- Create an MR and merge it to this project, take note of the post-merge pipeline ID
- Create a pipeline schedule and either wait for it to run or hit the play button in the pipeline schedule to start it
- Go back to the MR and see that the pipeline ID didn't change for the post-merge pipeline status widget
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Jose Ivan Vargas
