Skip to content

Retrying a parallel job created using cypress cloud on gitlab executes entire suite instead of just the failed job #28743

Open
@mpansare-applied

Description

@mpansare-applied

Current behavior

We are trying to setup CI parallelization using cypress cloud in GitLab. We created the parallel job. But with this, if we get a failure in one of the jobs, the job can not be retried as it is, if I press retry on the job, it will run all tests in the suite as part of that job instead of subset of tests assigned.

For example, lets say I have a test suite of 9 tests (named 1-9). I want to run them in parallel in 3 jobs. So I have configured my pipeline that way. Now, when the pipeline runs, the cypress job does get split into 3. Lets assume job 1 has tests 1,2,3. Job 2 has 4,5,6 and job 3 has 7,8,9. Now lets assume that job 2 fails where test 5 has failed. In this case, I want to retry the job. But when I retry it, it does not run just test 4,5,6 instead it runs all tests 1 to 9.

Desired behavior

Retrying a failed job should only retry the tests that are assigned to the job not entire suite.

Test code to reproduce

Our pipeline job is something like this :

e2e_test_cypress_regression_chrome:
  stage: e2e:test:regression
  variables:
    BROWSER: chrome
    GROUPNAME: regression-chrome
  script:
    - cypress run --record --parallel --browser ${BROWSER:-chrome} --group $GROUPNAME --headless --ci-build-id=$CI_PIPELINE_ID-$CI_JOB_ID
  parallel: 3

Cypress Version

13.6.1

Node version

20.6.1

Operating System

linux container

Debug Logs

No response

Other

If we dont use the ci-build-id argument in cypress run command, we face same issue as this : #8451

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureNew feature that does not currently exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions