Skip to content

feat: always provide ci-build-id so actions can be re-run#340

Merged
bahmutov merged 1 commit intocypress-io:send-ci-build-idfrom
Andarist:always-use-build-id
May 4, 2021
Merged

feat: always provide ci-build-id so actions can be re-run#340
bahmutov merged 1 commit intocypress-io:send-ci-build-idfrom
Andarist:always-use-build-id

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

@Andarist Andarist commented Apr 1, 2021

closes #363

I know that there are known workarounds for this, mentioned both in the README and some issue comments.

Since this is relevant not only for parallel runs I think that adding this at all times would improve the DX and provide this improvement out of the box for all users. The expected result is that a GitHub action should be able to re-run the workflow and create a new test run in the Cypress dashboard.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 1, 2021

CLA assistant check
All committers have signed the CLA.

@jennifer-shehane
Copy link
Copy Markdown
Member

I would like it if I did not have to continuously answer this question for people. They don't see the warning about it in the github actions readme.

@Andarist
Copy link
Copy Markdown
Contributor Author

Andarist commented Apr 1, 2021

So... you are on board with the idea? 😅 not entirely sure if i got the intention right

@jennifer-shehane
Copy link
Copy Markdown
Member

@bahmutov thoughts?

@bahmutov
Copy link
Copy Markdown
Contributor

I am not sure I understand what this PR changes. There is refactoring, but ultimately we still use the same ciBuildId, no? How would it change anything the user has to do?

@Andarist
Copy link
Copy Markdown
Contributor Author

Andarist commented May 1, 2021

@bahmutov this ciBuildId was only used when either group or parallel options were used. This PR refactors this and starts using it for all scenarios (minus when the explicit ciBuildId is given, of course)

@bahmutov
Copy link
Copy Markdown
Contributor

bahmutov commented May 3, 2021

@Andarist do you have a situation that without this PR it does NOT create a new test run? I am trying this right now in https://github.com/bahmutov/cypress-gh-action-small-example and it creates new dashboard runs on every re-run just fine, no?

@Andarist
Copy link
Copy Markdown
Contributor Author

Andarist commented May 3, 2021

I'm using this in a private repo - I could try to set up a public repro later if you will require that.

I've tracked down my workflow runs from before I've fixed this on our side and I got:

The run you are attempting to access is already complete and will not accept new groups.

The existing run is: xxxx

When a run finishes all of its groups, it waits for a configurable set of time before finally completing. You must add more groups during that time period.

The --tag flag you passed was: 
The --group flag you passed was: integration

Which was a result of re-running the workflow manually from the GitHub interface. I've resolved this on our side by generating a ciBuildId with a date in it:

- command: yarn ci:test:integration:cypress
+ command: yarn ci:test:integration:cypress -- --ci-build-id ${{ steps.date.outputs.date }}

which has fixed the issue.

@bahmutov bahmutov changed the base branch from master to send-ci-build-id May 4, 2021 02:00
Copy link
Copy Markdown
Contributor

@bahmutov bahmutov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let me merge it into our branch to fully test it

@bahmutov bahmutov merged commit c79aadf into cypress-io:send-ci-build-id May 4, 2021
bahmutov added a commit that referenced this pull request May 4, 2021
* feat: always provide ci-build-id so actions can be re-run (#340) and not just when using parallel or group parameters

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@Andarist Andarist deleted the always-use-build-id branch May 4, 2021 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send ci build id when using --group parameter

4 participants