Skip to content

Commit 0cd12eb

Browse files
ryanthemanuelcypress-bot[bot]
and
cypress-bot[bot]
authored
fix: ensure debugging your ci failures message displays (#31563)
* fix: ensure having trouble debugging your ci failures message displays * bump cache version * index on ryanm/fix/having-trouble-debugging-your-ci-failures-minimal: 5580494 fix: ensure having trouble debugging your ci failures message displays * index on ryanm/fix/having-trouble-debugging-your-ci-failures-minimal: 5580494 fix: ensure having trouble debugging your ci failures message displays * index on ryanm/fix/having-trouble-debugging-your-ci-failures-minimal: 5580494 fix: ensure having trouble debugging your ci failures message displays * fix test * Update tooling/v8-snapshot/package.json * Delete cli/vue2/README.md * Delete cli/vue2/package.json * Update ci_failure_spec_ts.js * rename --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
1 parent 1edfc24 commit 0cd12eb

File tree

11 files changed

+128
-20
lines changed

11 files changed

+128
-20
lines changed

.circleci/cache-version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Bump this version to force CI to re-create the cache from scratch.
22

3-
4-17-2025-v1
3+
4-22-2025

.circleci/workflows.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
3838
- /^release\/\d+\.\d+\.\d+$/
3939
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4040
- 'update-v8-snapshot-cache-on-develop'
41-
- 'ryanm/chore/full-snapshot-threaded'
41+
- 'ryanm/fix/having-trouble-debugging-your-ci-failures-minimal'
4242

4343
# usually we don't build Mac app - it takes a long time
4444
# but sometimes we want to really confirm we are doing the right thing
@@ -49,7 +49,11 @@ macWorkflowFilters: &darwin-workflow-filters
4949
- equal: [ develop, << pipeline.git.branch >> ]
5050
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5151
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
52-
- equal: [ 'ryanm/chore/full-snapshot-threaded', << pipeline.git.branch >> ]
52+
- equal:
53+
[
54+
'ryanm/fix/having-trouble-debugging-your-ci-failures-minimal',
55+
<< pipeline.git.branch >>
56+
]
5357
- matches:
5458
pattern: /^release\/\d+\.\d+\.\d+$/
5559
value: << pipeline.git.branch >>
@@ -60,7 +64,11 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
6064
- equal: [ develop, << pipeline.git.branch >> ]
6165
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
6266
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
63-
- equal: [ 'ryanm/chore/full-snapshot-threaded', << pipeline.git.branch >> ]
67+
- equal:
68+
[
69+
'ryanm/fix/having-trouble-debugging-your-ci-failures-minimal',
70+
<< pipeline.git.branch >>
71+
]
6472
- matches:
6573
pattern: /^release\/\d+\.\d+\.\d+$/
6674
value: << pipeline.git.branch >>
@@ -83,7 +91,11 @@ windowsWorkflowFilters: &windows-workflow-filters
8391
- equal: [ develop, << pipeline.git.branch >> ]
8492
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
8593
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
86-
- equal: [ 'ryanm/chore/full-snapshot-threaded', << pipeline.git.branch >> ]
94+
- equal:
95+
[
96+
'ryanm/fix/having-trouble-debugging-your-ci-failures-minimal',
97+
<< pipeline.git.branch >>
98+
]
8799
- matches:
88100
pattern: /^release\/\d+\.\d+\.\d+$/
89101
value: << pipeline.git.branch >>
@@ -157,7 +169,7 @@ commands:
157169
name: Set environment variable to determine whether or not to persist artifacts
158170
command: |
159171
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
160-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/chore/full-snapshot-threaded" ]]; then
172+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/fix/having-trouble-debugging-your-ci-failures-minimal" ]]; then
161173
export SHOULD_PERSIST_ARTIFACTS=true
162174
fi' >> "$BASH_ENV"
163175
# You must run `setup_should_persist_artifacts` command and be using bash before running this command

cli/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ _Released 4/22/2025 (PENDING)_
66
**Bugfixes:**
77

88
- Fixed an issue where auto scroll in the Cypress Command Log was not scrolling correctly. Fixes [#31530](https://github.com/cypress-io/cypress/issues/31530).
9+
- Fixed an issue where a message pointing users to the Cypress Cloud was not displaying on runs with failures in CI. Fixes [#31550](https://github.com/cypress-io/cypress/issues/31550).
910

1011
## 14.3.1
1112

packages/server/__snapshots__/cypress_spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,10 @@ exports['CLOUD_RECOMMENDATION_MESSAGE'] = `
412412
413413
----------------------------------------------------------------------------------------------------
414414
415-
Having trouble debugging your CI failures?
415+
Debug faster with full visibility.
416416
417-
Record your runs to Cypress Cloud to watch video recordings for each test,
418-
debug failing and flaky tests, and integrate with your favorite tools.
417+
Record to Cypress Cloud and get instant access to full test details and replays.
418+
Inspect the DOM, network events, and console logs exactly as they ran in CI.
419419
420420
>> https://on.cypress.io/cloud-get-started
421421

packages/server/lib/util/print-run.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ type Screenshot = {
2929
}
3030

3131
export const cloudRecommendationMessage = `
32-
Having trouble debugging your CI failures?
32+
Debug faster with full visibility.
3333
34-
Record your runs to Cypress Cloud to watch video recordings for each test,
35-
debug failing and flaky tests, and integrate with your favorite tools.
34+
Record to Cypress Cloud and get instant access to full test details and replays.
35+
Inspect the DOM, network events, and console logs exactly as they ran in CI.
3636
`
3737

3838
function color (val: any, c: string) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
exports['CI failure fails and displays the message that points users to the cloud 1'] = `
2+
3+
====================================================================================================
4+
5+
(Run Starting)
6+
7+
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
8+
│ Cypress: 1.2.3 │
9+
│ Browser: FooBrowser 88 │
10+
│ Specs: 1 found (simple_failing.cy.js) │
11+
│ Searched: cypress/e2e/simple_failing.cy.js │
12+
└────────────────────────────────────────────────────────────────────────────────────────────────┘
13+
14+
15+
────────────────────────────────────────────────────────────────────────────────────────────────────
16+
17+
Running: simple_failing.cy.js (1 of 1)
18+
19+
20+
simple failing spec
21+
1) fails1
22+
2) fails2
23+
24+
25+
0 passing
26+
2 failing
27+
28+
1) simple failing spec
29+
fails1:
30+
AssertionError: Timed out retrying after 100ms: expected true to be false
31+
[stack trace lines]
32+
33+
2) simple failing spec
34+
fails2:
35+
Error: fails2
36+
[stack trace lines]
37+
38+
39+
40+
41+
(Results)
42+
43+
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
44+
│ Tests: 2 │
45+
│ Passing: 0 │
46+
│ Failing: 2 │
47+
│ Pending: 0 │
48+
│ Skipped: 0 │
49+
│ Screenshots: 0 │
50+
│ Video: false │
51+
│ Duration: X seconds │
52+
│ Spec Ran: simple_failing.cy.js │
53+
└────────────────────────────────────────────────────────────────────────────────────────────────┘
54+
55+
56+
====================================================================================================
57+
58+
(Run Finished)
59+
60+
61+
Spec Tests Passing Failing Pending Skipped
62+
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
63+
│ ✖ simple_failing.cy.js XX:XX 2 - 2 - - │
64+
└────────────────────────────────────────────────────────────────────────────────────────────────┘
65+
✖ 1 of 1 failed (100%) XX:XX 2 - 2 - -
66+
67+
----------------------------------------------------------------------------------------------------
68+
69+
Debug faster with full visibility.
70+
71+
Record to Cypress Cloud and get instant access to full test details and replays.
72+
Inspect the DOM, network events, and console logs exactly as they ran in CI.
73+
74+
>> https://on.cypress.io/cloud-get-started
75+
76+
----------------------------------------------------------------------------------------------------
77+
78+
`

system-tests/test/ci_failure_spec.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import systemTests from '../lib/system-tests'
2+
3+
describe('CI failure', () => {
4+
systemTests.setup()
5+
6+
it('fails and displays the message that points users to the cloud', function () {
7+
return systemTests.exec(this, {
8+
browser: 'electron',
9+
spec: 'simple_failing.cy.js',
10+
processEnv: {
11+
CI: '1',
12+
CYPRESS_COMMERCIAL_RECOMMENDATIONS: '1',
13+
},
14+
expectedExitCode: 2,
15+
snapshot: true,
16+
config: {
17+
screenshotOnRunFailure: false,
18+
},
19+
})
20+
})
21+
})

tooling/v8-snapshot/cache/darwin/snapshot-meta.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"norewrite": [
3+
"./ci-info/index.js",
34
"./evil-dns/evil-dns.js",
45
"./get-stream/buffer-stream.js",
56
"./graceful-fs/polyfills.js",
@@ -70,10 +71,8 @@
7071
"./packages/server/lib/util/process_profiler.ts",
7172
"./packages/server/lib/util/suppress_warnings.js",
7273
"./packages/server/node_modules/axios/lib/adapters/http.js",
73-
"./packages/server/node_modules/ci-info/index.js",
7474
"./packages/server/node_modules/glob/node_modules/minimatch/minimatch.js",
7575
"./packages/server/node_modules/graceful-fs/polyfills.js",
76-
"./packages/server/node_modules/is-ci/index.js",
7776
"./packages/server/node_modules/mocha/node_modules/debug/src/node.js",
7877
"./process-nextick-args/index.js",
7978
"./signal-exit/index.js",

tooling/v8-snapshot/cache/linux/snapshot-meta.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"norewrite": [
3+
"./ci-info/index.js",
34
"./evil-dns/evil-dns.js",
45
"./get-stream/buffer-stream.js",
56
"./graceful-fs/polyfills.js",
@@ -70,10 +71,8 @@
7071
"./packages/server/lib/util/process_profiler.ts",
7172
"./packages/server/lib/util/suppress_warnings.js",
7273
"./packages/server/node_modules/axios/lib/adapters/http.js",
73-
"./packages/server/node_modules/ci-info/index.js",
7474
"./packages/server/node_modules/glob/node_modules/minimatch/minimatch.js",
7575
"./packages/server/node_modules/graceful-fs/polyfills.js",
76-
"./packages/server/node_modules/is-ci/index.js",
7776
"./packages/server/node_modules/mocha/node_modules/debug/src/node.js",
7877
"./process-nextick-args/index.js",
7978
"./signal-exit/index.js",

tooling/v8-snapshot/cache/win32/snapshot-meta.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"norewrite": [
3+
"./ci-info/index.js",
34
"./evil-dns/evil-dns.js",
45
"./get-stream/buffer-stream.js",
56
"./graceful-fs/polyfills.js",
@@ -70,10 +71,8 @@
7071
"./packages/server/lib/util/process_profiler.ts",
7172
"./packages/server/lib/util/suppress_warnings.js",
7273
"./packages/server/node_modules/axios/lib/adapters/http.js",
73-
"./packages/server/node_modules/ci-info/index.js",
7474
"./packages/server/node_modules/glob/node_modules/minimatch/minimatch.js",
7575
"./packages/server/node_modules/graceful-fs/polyfills.js",
76-
"./packages/server/node_modules/is-ci/index.js",
7776
"./packages/server/node_modules/mocha/node_modules/debug/src/node.js",
7877
"./process-nextick-args/index.js",
7978
"./signal-exit/index.js",

tooling/v8-snapshot/src/setup/force-no-rewrite.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ export default [
6969
'node_modules/prettier/parser-meriyah.js',
7070
'node_modules/prettier/parser-typescript.js',
7171
'node_modules/prettier/third-party.js',
72-
'packages/server/node_modules/is-ci/index.js',
73-
'packages/server/node_modules/ci-info/index.js',
72+
'ci-info/index.js',
7473
'node_modules/@babel/traverse/lib/index.js',
7574
'node_modules/@babel/types/lib/definitions/index.js',
7675
'packages/server/node_modules/axios/lib/adapters/http.js',

0 commit comments

Comments
 (0)