Description
- I have searched issues for similar feature requests
What is this feature about (1 sentence)
Configurable behavior when a worker passes the director a ciBuildId corresponding to a run that has already completed. This will close a 'loophole' allowing CI pipelines to pass even when Cypress tests fail.
Why is it needed? What is the value? For whom do we build it?
I'll explain the issue with the current behavior. I'm using Gitlab as an example, but I think this applies to other scm systems:
Setup: CI pipeline running 3 parallel Cypress workers talking to sorry-cypress. One of the specs failed, so Gitlab shows cypress-2 job as failed, but cypress-1 and cypress-3 as succeeded.
Scenario: developer sees cypress-2 job failed, clicks retry on that job
cypress-2 job will start with the same ciBuildId. It connects to director, is told that all specs have already been run, and successfully quits.
However... the CI pipeline now shows as succeeding, with all jobs passing. Even though the one spec failed and was never re-run. There's no way to change this behavior from the Gitlab side, as there is no env var that a) is the same across all jobs in an initial pipeline run and b) is different when a job is re-tried.
High-level feature overview
I'm not sure what the best solution here is, but my thinking is:
- Configurable behavior in director when a worker comes in with a ciBuildId corresponding to an already-finished job
- Depending on configuration, either: PASS pass with no specs (current behavior), FAIL fail, or RE-RUN re-start the whole run and give all specs to the new worker
RE-RUN is IMO the ideal, but even just FAIL would allow closing this loophole.
@agoldis thoughts? If we can come up with an agree-able solution I'm happy to work on this, it'll save me from tearing my hair out in my professional life 😆