question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Re-run failed jobs" will not work with a parallel workflow

See original GitHub issue

After implementing a custom build ID to ensure I could re-run workflows which I’ve integrated with Cypress Dashboard and configured to run parallelly, I’ve run into an issue (oddly different than this one).

Here is my job FWIW:

- id: cypress-mocked-api-tests
  uses: cypress-io/github-action@v2
  with:
    wait-on: 'https://localhost:9001/index.js'
    start: npm run start:${{ env.NODE_ENV }}
    config-file: cypress/config/${{ env.NODE_ENV }}.json
    config: video=true,videoUploadOnPasses=false
    spec: '**/*.spec.ts'
    install: false
    record: true
    parallel: true
    group: 'Mocked-API'
    ci-build-id: ${{ needs.prepare.outputs.uuid }}

This job will load balance all my spec files across five containers under a “Mocked-API” group. This works great and I can re-run all jobs without issue.

On a recent run, one of the five containers failed because one test failed. I thought I’d test how “Re-run failed jobs” worked on just the failed container job. My hope/expectation was that it would be smart enough to know which spec files it ran when the entire workflow executed originally (which would have been six spec files which included 22 test) and run those. Instead it ran zero spec files and completed successfully. It seems like the matrix-level orchestration that is needed is not occurring when only a failed container job is re-run. It looks like someone else has run into this issue too and is trying to solve it by disabling the “Re-run failed jobs” option in Github (which doesn’t seem possible).

This is a fairly big problem because it resulted in the group (which I’ve configured as a status check in my trunk branch protection rule) passing and the PR being able to be merged when it had never successfully run all tests.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ilovegithub2commented, Jul 4, 2022

We are seeing exactly the same issue - rerunning failed jobs only will not run any tests but mark each as passed.

Here is our configuration

      - name: Run integration tests
        timeout-minutes: 20
        uses: cypress-io/github-action@v4
        env:
          CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          ci-build-id: ${{ needs.prepare.outputs.uuid }}
          config: baseUrl=${{ format('https://pr{0}-www.build.{1}', github.event.number, env.CBR_PROJECT_DOMAIN) }}
          wait-on: ${{ format('https://pr{0}-www.build.{1}', github.event.number, env.CBR_PROJECT_DOMAIN) }}
          wait-on-timeout: 120
          browser: chrome
          record: true
          parallel: true
          group: merge
          install: false
          working-directory: tests/web
          ```
1reaction
admahcommented, Sep 14, 2022

@mellis481 yes, I will be providing updates as they’re available.

I will be closing this and updating in #531 since this is a duplicate of that issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Save time with partial re-runs in GitHub Actions
It is now possible to re-run only failed jobs or a single job in GitHub Actions workflows. Save time with partial re-runs in...
Read more >
Rerun job from the job detail page | Cloud Feature Requests
Run from failed continues where the previous workflow left off, restoring its state and then continuing on. In that case, all failed jobs...
Read more >
How do i get parallel jobs working on failure - Stack Overflow
I try the resume execution/retry failed nodes, it triggers both the jobs again. Is there any setting in rundeck which can trigger only...
Read more >
Run jobs in parallel with workflows to decrease your build times
Let's take a look at how we can harness the power of CircleCI 2.0's workflows and how running jobs in parallel can unlock...
Read more >
Repairing and resuming a workflow run - AWS Glue
If one or more nodes (jobs or crawlers) in a workflow do not successfully complete, this means that the workflow only partially ran....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found