Fixes "retryable" value for merge train pipelines as JSON
What does this MR do and why?
Implements #436348 (closed), part of #442453 (closed)
This change updates the value of "retryable" in merge train pipelines when the pipeline is fetched with JSON format.
This allows the "retryable" to stay consistent across the GraphQL API and other models.
Changelog: fixed
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
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- You'll need a
.gitlab-ci.yml
compatible with merge trains, that also happens to pass during a regular pipeline and fail during a merge train.
I used the following:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
stages:
- build
normal-job:
stage: build
environment: production
script:
- echo "Running..."
- sleep 20
- echo "Done."
fail-on-merge-train:
stage: build
rules:
- if: $CI_MERGE_REQUEST_EVENT_TYPE == 'merge_train'
script:
- echo $CI_MERGE_REQUEST_EVENT_TYPE
- echo "Failing because this is a merge train, sorry!"
- exit 1
- Enable merge trains by selecting "Enable merge trains" at Project -> Settings -> Merge requests (e.g. http://gdk.test:3000/my-group/my-merge-trains/-/settings/merge_requests)
- Open an MR with an arbitrary change
- Hit Merge and wait for the merge train pipeline to fail
- Visit the Pipelines tab and confirm there is no retry button (e.g. http://gdk.test:3000/my-group/my-merge-trains/-/merge_requests/5/pipelines)
Merge request reports
Activity
changed milestone to %17.1
assigned to @mrincon
- A deleted user
added documentation label
1 Warning There were no new or modified feature flag YAML files detected in this MR. If the changes here are already controlled under an existing feature flag, please add
the feature flagexists. Otherwise, if you think the changes here don't need
to be under a feature flag, please add the label feature flagskipped, and
add a short comment about why we skipped the feature flag.For guidance on when to use a feature flag, please see the documentation.
1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/api/graphql/reference/index.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Category Reviewer Maintainer backend @paulobarros
(UTC+2, same timezone as author)
@vij
(UTC+1, 1 hour behind author)
UX @veethika
(UTC+0, 2 hours behind author)
Maintainer review is optional for UX ~"Verify" Reviewer review is optional for ~"Verify" @tianwenchen
(UTC+10, 8 hours ahead of author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
removed documentation label
- Resolved by Avielle Wolfe
@shinya.maeda
I am working on #436348 (closed) and came across your previous fix for a similat issue at !52463 (merged).I found that your fix in the
pipeline_presenter.rb
didn't affect the JSON serialization we do with thePipelineSerializer
we use when showing list of pipelines (they use/-/pipelines.json
endpoint).What do you think of this fix as a more general solution? It doesn't address some issues with the job
retryable?
state, but I think its a step in the right direction. ... or is there a nicer way to fix this? Thanks!EDIT: I'll fix and add tests if we decide this is the right direction!
Edited by Miguel Rincon
requested review from @shinya.maeda
- Resolved by Miguel Rincon
mentioned in issue #436348 (closed)
requested review from @avielle and removed review request for @shinya.maeda
added pipelinetier-1 label
added 1 commit
- 69828a25 - Fixes "retryable" value for merge train pipelines as JSON
- A deleted user
added documentation label
added pipeline:run-all-e2e pipeline:run-all-rspec labels
removed workflowready for development label
added Enterprise Edition label
added 1 commit
- 61a7fdf8 - Fixes "retryable" value for merge train pipelines as JSON
- Resolved by Miguel Rincon
@veethika You worked on refining #436348 (closed), would you like to have a look to verify?
requested review from @veethika
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 61a7fdf8expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 31 | 0 | 1 | 30 | 32 | ✅ | | Plan | 54 | 0 | 2 | 47 | 56 | ✅ | | Create | 111 | 0 | 9 | 94 | 120 | ✅ | | Govern | 64 | 0 | 1 | 41 | 65 | ✅ | | Release | 5 | 0 | 0 | 5 | 5 | ✅ | | Package | 19 | 0 | 12 | 19 | 31 | ✅ | | Data Stores | 31 | 0 | 0 | 22 | 31 | ✅ | | Monitor | 8 | 0 | 0 | 7 | 8 | ✅ | | Analytics | 2 | 0 | 0 | 1 | 2 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 325 | 0 | 26 | 266 | 351 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 61a7fdf8expand test summary
+---------------------------------------------------------------------+ | suites summary | +----------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------+--------+--------+---------+-------+-------+--------+ | Plan | 127 | 0 | 11 | 0 | 138 | ✅ | | Package | 120 | 7 | 52 | 7 | 179 | ❌ | | Govern | 132 | 0 | 7 | 1 | 139 | ✅ | | Create | 464 | 2 | 53 | 3 | 519 | ❌ | | Verify | 60 | 0 | 10 | 0 | 70 | ✅ | | Fulfillment | 4 | 0 | 25 | 2 | 29 | ✅ | | GitLab Metrics | 2 | 0 | 1 | 0 | 3 | ✅ | | Manage | 30 | 2 | 8 | 2 | 40 | ❌ | | Systems | 7 | 0 | 0 | 0 | 7 | ✅ | | Analytics | 3 | 0 | 0 | 0 | 3 | ✅ | | Data Stores | 69 | 0 | 10 | 0 | 79 | ✅ | | Monitor | 20 | 0 | 9 | 0 | 29 | ✅ | | Configure | 1 | 0 | 3 | 0 | 4 | ✅ | | Release | 7 | 0 | 1 | 0 | 8 | ✅ | | Secure | 3 | 0 | 1 | 2 | 4 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | | Ai-powered | 0 | 0 | 1 | 0 | 1 | ➖ | +----------------+--------+--------+---------+-------+-------+--------+ | Total | 1049 | 11 | 195 | 17 | 1255 | ❌ | +----------------+--------+--------+---------+-------+-------+--------+
added Beautifying our UI label
added pipeline:mr-approved label
- Resolved by Miguel Rincon
@veethika
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipelinetier-2 label and removed pipelinetier-1 label
removed review request for @veethika
- Resolved by Laura Montemayor
- Resolved by Laura Montemayor
added pipelinetier-3 label and removed pipelinetier-2 label
requested review from @avielle
enabled an automatic merge when the pipeline for b5bb2712 succeeds
mentioned in commit 9655b21e
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
mentioned in issue #442453 (closed)
mentioned in issue #300257 (closed)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!3098 (merged)