Match the order from REST stage api to GQL stage api
What does this MR do and why?
Fix the task Job dropdown sorting (#473907 - closed) • Rajendra Kadam • 17.4
GraphQL returned the jobs in a different order as compared to REST API before. We would want to keep the order same. So applied filtering based on ordered status.
Unblocks #407818 (comment 2033716876)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
NA
How to set up and validate locally
- Setup runner locally.
- Use the below CI yaml files for having a case for jobs ordering.
.gitlab-ci.yml
stages:
- build
- test
job:
stage: build
script:
- sleep 5
when: delayed
start_in: 2 minutes
bridge_job:
stage: test
trigger:
include: child-pipeline.yml
job:
stage: test
script:
- sleep 10
another_job:
stage: test
script:
- sleep 10
when: manual
manual_confirmation: Are you sure?
another_job_2:
stage: test
script:
- sleep 15
when: on_failure
needs: ['job']
child-pipeline.yml
job:
script:
- sleep 10
- Run the pipeline.
- The order should as attached in the screenshot below:
This order is same as REST API.
Related to #473905 (closed)
Edited by Rajendra Kadam
