Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated README warning for parallel re-runs #1074

Closed
MikeMcC399 opened this issue Nov 6, 2023 · 7 comments · Fixed by #1113
Closed

Outdated README warning for parallel re-runs #1074

MikeMcC399 opened this issue Nov 6, 2023 · 7 comments · Fixed by #1113
Labels
bug Something isn't working Cypress Cloud documentation Improvements or additions to documentation

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Nov 6, 2023

The Warning paragraph in the README > Parallel section does not reflect how Cypress Cloud currently handles re-runs. It also does not distinguish between the different modes of re-running a workflow in the GitHub Actions UI ("Run workflow" used again, "Re-run jobs" > "Re-run failed jobs" and "Re-run jobs" > "Re-run all jobs").

The Warning text is currently:

Warning ⚠️: Cypress actions use GITHUB_TOKEN to get the correct branch and the number of jobs run, making it possible to re-run without the need of pushing an empty commit. If you don't want to use the GITHUB_TOKEN you can still run your tests without problem with the only note that Cypress Cloud's API connects parallel jobs into a single logical run using GitHub commit SHA plus workflow name. If you attempt to re-run GitHub checks, Cypress Cloud thinks the run has already ended. In order to truly rerun parallel jobs, push an empty commit with git commit --allow-empty -m "re-run checks" && git push. As another work around you can generate and cache a custom build id, read Adding a unique build number to GitHub Actions.

  1. If "Run workflow" is used to repeat the run of a workflow with no changes in it, and GITHUB_TOKEN is passed, then the workflow run is correctly recorded in Cypress Cloud.
  2. If "Re-run jobs" > "Re-run failed jobs" is used then the workflow run will be repeated and recorded in Cypress Cloud, however the full set of Cypress specs are then run in the number of containers which contained failed Cypress specs. "Re-run failed jobs" does not lead to re-running only failed Cypress specs. This needs to be explained.

This text needs to be reworked.

It would also be good to add references to the following capabilities of Cypress Cloud in the context of re-running failed Cypress specs:

Related issues

@MikeMcC399 MikeMcC399 added bug Something isn't working documentation Improvements or additions to documentation Cypress Cloud labels Nov 6, 2023
@MikeMcC399
Copy link
Collaborator Author

I'm not sure if I have enough information to rework the warning, since it describes in part how Cypress Cloud works and this is not open source, so I would be limited to reverse engineering, which is not the ideal basis to provide definitive documentation.

The first step would be in any case for the Cypress (Cloud) team to review this part of the documentation.

@MikeMcC399
Copy link
Collaborator Author

@ryanpei Are you still involved in this area, and if so, could you comment?

@ryanpei
Copy link

ryanpei commented Dec 27, 2023

Thanks @MikeMcC399 , I will try to find someone on our side who knows the exact behavior here. I'm not sure if "Re-run jobs" (as opposed to just the failed jobs, specifically) would re-run only on the containers which had failed. But otherwise this sounds right.

@ryanpei
Copy link

ryanpei commented Jan 2, 2024

Yes, @MikeMcC399 's suggested edits are correct

@MikeMcC399
Copy link
Collaborator Author

@ryanpei

Thanks for your confirmation! Unfortunately since I haven't really understood the original warning text I have great difficulty in revising it sensibly, so I'm not able to resolve this issue on my own.

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jan 19, 2024

@MikeMcC399 We used to have issues where users would click 'Rerun jobs' in GitHub Actions and the run would look like it's recording and running, but it essentially just exits 0 and looks like the tests passed, but they didn't run at all. That was because a new unique ci-build-id wasn't generated for each rerun.

If you're not seeing this behavior anymore (that all tests rerun in all situations of rerunning in github-action) then this may have been addressed on the Cloud side. I know they did do some work around better detecting unique identifiers of reruns.

If you're seeing the correct behavior on reruns, we can just remove the entire warning section.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Jan 22, 2024

@jennifer-shehane

Note that

is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cypress Cloud documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants