Skip to content
Snippets Groups Projects

Fixes "retryable" value for merge train pipelines as JSON

All threads resolved!

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
Screenshot_2024-05-13_at_16.55.41 image

How to set up and validate locally

  1. 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
  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)
  2. Open an MR with an arbitrary change
  3. Hit Merge and wait for the merge train pipeline to fail
  4. 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)
Edited by Miguel Rincon

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in issue #436348 (closed)

  • Shinya Maeda requested review from @avielle and removed review request for @shinya.maeda

    requested review from @avielle and removed review request for @shinya.maeda

  • Miguel Rincon added 1 commit

    added 1 commit

    • 69828a25 - Fixes "retryable" value for merge train pipelines as JSON

    Compare with previous version

  • A deleted user added documentation label

    added documentation label

  • Miguel Rincon changed the description

    changed the description

  • Miguel Rincon added 1 commit

    added 1 commit

    • 61a7fdf8 - Fixes "retryable" value for merge train pipelines as JSON

    Compare with previous version

  • Miguel Rincon requested review from @veethika

    requested review from @veethika

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 61a7fdf8

    expand 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: :x: test report for 61a7fdf8

    expand 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  | ❌     |
    +----------------+--------+--------+---------+-------+-------+--------+
  • Veethika Mishra changed the description

    changed the description

  • Veethika Mishra approved this merge request

    approved this merge request

  • added pipelinetier-2 label and removed pipelinetier-1 label

  • Veethika Mishra removed review request for @veethika

    removed review request for @veethika

  • Avielle Wolfe requested review from @lauraXD and removed review request for @avielle

    requested review from @lauraXD and removed review request for @avielle

  • Laura Montemayor
  • Laura Montemayor
  • Laura Montemayor approved this merge request

    approved this merge request

  • added pipelinetier-3 label and removed pipelinetier-2 label

  • Laura Montemayor requested review from @avielle

    requested review from @avielle

  • Avielle Wolfe resolved all threads

    resolved all threads

  • Avielle Wolfe approved this merge request

    approved this merge request

  • Avielle Wolfe enabled an automatic merge when the pipeline for b5bb2712 succeeds

    enabled an automatic merge when the pipeline for b5bb2712 succeeds

  • Avielle Wolfe mentioned in commit 9655b21e

    mentioned in commit 9655b21e

  • Miguel Rincon changed the description

    changed the description

  • added workflowstaging label and removed workflowcanary label

  • mentioned in issue #442453 (closed)

  • mentioned in issue #300257 (closed)

  • Please register or sign in to reply
    Loading