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

Strip quotes around group name and parallel ci build id #5686

Closed
bahmutov opened this issue Nov 13, 2019 · 2 comments · Fixed by #5692 · May be fixed by ngChile/ngx-devkit-cypress-builder#20 or qsays/grafana#1
Closed

Strip quotes around group name and parallel ci build id #5686

bahmutov opened this issue Nov 13, 2019 · 2 comments · Fixed by #5692 · May be fixed by ngChile/ngx-devkit-cypress-builder#20 or qsays/grafana#1
Assignees
Labels

Comments

@bahmutov
Copy link
Contributor

Cypress v3.6.1

When running in GitHub Actions like https://github.com/cypress-io/cypress-example-kitchensink/runs/301196919 across multiple OS I have noticed that the start command might pass group name and parallel ci build arguments differently depending on the platform. Sometimes there are quotes around the CLI arguments, sometimes not. For example, on Windows

Running Cypress tests
Cypress test command: npx cypress run --record --parallel --ci-build-id "Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb" --group "Parallel 2x on windows-latest"
C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npx.cmd" cypress run --record --parallel --ci-build-id """Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb""" --group """Parallel 2x on windows-latest""""

> cypress-example-kitchensink@0.0.0-development start:ci:windows d:\a\cypress-example-kitchensink\cypress-example-kitchensink
> serve --no-clipboard --listen 8080

2019-11-13T14:43:27.518Z cypress:cli cli starts with arguments ["C:\\Program Files\\nodejs\\node.exe","d:\\a\\cypress-example-kitchensink\\cypress-example-kitchensink\\node_modules\\cypress\\bin\\cypress","run","--record","--parallel","--ci-build-id","Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb","--group","Parallel 2x on windows-latest"]
2019-11-13T14:43:27.518Z cypress:cli NODE_OPTIONS is not set
2019-11-13T14:43:27.518Z cypress:cli program parsing arguments
2019-11-13T14:43:27.518Z cypress:cli running Cypress
2019-11-13T14:43:27.595Z cypress:cli parsed cli options {
  record: true,
  parallel: true,
  group: 'Parallel 2x on windows-latest',
  ciBuildId: 'Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb'
}

While on Linux same code produces

Running Cypress tests
Cypress test command: npx cypress run --record --parallel --ci-build-id "Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb" --group "Parallel 2x on ubuntu-latest"
/usr/local/bin/npx cypress run --record --parallel --ci-build-id "Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb" --group "Parallel 2x on ubuntu-latest"

> cypress-example-kitchensink@0.0.0-development start /home/runner/work/cypress-example-kitchensink/cypress-example-kitchensink
> serve --listen ${PORT:-8080}

2019-11-13T14:42:09.519Z cypress:cli cli starts with arguments ["/usr/local/bin/node","/home/runner/work/cypress-example-kitchensink/cypress-example-kitchensink/node_modules/.bin/cypress","run","--record","--parallel","--ci-build-id","\"Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb\"","--group","\"Parallel 2x on ubuntu-latest\""]
2019-11-13T14:42:09.521Z cypress:cli NODE_OPTIONS is not set
2019-11-13T14:42:09.521Z cypress:cli program parsing arguments
2019-11-13T14:42:09.522Z cypress:cli running Cypress
2019-11-13T14:42:09.564Z cypress:cli parsed cli options {
  record: true,
  parallel: true,
  group: '"Parallel 2x on ubuntu-latest"',
  ciBuildId: '"Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb"'
}

Notice group: '"Parallel 2x on ubuntu-latest"' and ciBuildId: '"Using Cypress GH Action - ec4d499628cc1385bc222f7c06168808f24852bb"' which leads to a different run from Windows run.

Proposal: automatically remove quotes around group name and ci build id. We already do this for some environment variables, like Cypress record key.

@bahmutov bahmutov self-assigned this Nov 13, 2019
@bahmutov bahmutov added the cli label Nov 13, 2019
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Nov 13, 2019
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Nov 15, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 15, 2019

The code for this is done in cypress-io/cypress#5692, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 27, 2019

Released in 3.7.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.