Draft: Fix manual_playable? to check for playable? jobs
What does this MR do and why?
Closes #29325
The play all button should only show when there are jobs within the stage that are playable. However, the button also appears when stages have only skipped jobs - in this case the the button does nothing and is useless and misleading.
This MR changes manually_playable?
to check for playable?
jobs within the stage so this useless button no longer shows.
Screenshots or screen recordings
Note the useless play all button in the deploy
stage of the before screenshot. It is no longer there in the after screenshot.
Before | After |
---|---|
How to set up and validate locally
- Be sure to set up runners for gdk https://gitlab.com/gitlab-org/gitlab-development-kit/blob/main/doc/howto/runner.md, this will enable you to run pipelines
- Run gdk/gitpod server, login, navigate to Build > Pipeline Editor
- Set up a pipeline (example ci config file below)
- Trigger a pipeline by creating a MR
- View a pipeline with skipped jobs in a stage - there should be no play all button. View a pipeline with manual jobs in a stage, there should still be a play all button.
Example ci config file with manual and skipped jobs:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- when: always
default:
image: busybox
stages:
- stage1
- stage2
- stage3
- stage4
job1:
stage: stage1
script:
- export
manual-job1:
stage: stage2
script: echo
when: manual
manual-job2:
stage: stage2
script: echo
when: manual
job2:
stage: stage3
script:
- exit 1
manual-job5:
stage: stage4
script: echo
when: on_success
manual-job6:
stage: stage4
script: echo
when: on_success
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Missy Davies