Skip to content

Commit

Permalink
Fix: skip sending stdout on PUT /instances (cypress-io#7635)
Browse files Browse the repository at this point in the history
* Fix: skip sending stdout on PUT /instances

* Add comment for why we're setting stdout to null

Co-authored-by: Brian Mann <brian.mann86@gmail.com>

Co-authored-by: Brian Mann <brian.mann86@gmail.com>
  • Loading branch information
tgriesser and brian-mann committed Jun 15, 2020
1 parent cf87458 commit b20a77a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/server/lib/modes/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,11 @@ const updateInstanceStdout = (options = {}) => {
}

const updateInstance = (options = {}) => {
const { instanceId, results, captured, group, parallel, ciBuildId } = options
const { instanceId, results, group, parallel, ciBuildId } = options
let { stats, tests, hooks, video, screenshots, reporterStats, error } = results

video = Boolean(video)
const cypressConfig = options.config
const stdout = captured.toString()

// get rid of the path property
screenshots = _.map(screenshots, (screenshot) => {
Expand All @@ -228,7 +227,7 @@ const updateInstance = (options = {}) => {
error,
video,
hooks,
stdout,
stdout: null, // don't send stdout with the instance payload to prevent requests that are too large. stdout will later get uploaded separately anyway.
instanceId,
screenshots,
reporterStats,
Expand Down Expand Up @@ -696,7 +695,6 @@ const createRunAndRecordSpecs = (options = {}) => {
group,
config,
results,
captured,
parallel,
ciBuildId,
instanceId,
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/unit/api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ describe('lib/api', () => {
screenshots: [],
cypressConfig: {},
reporterStats: {},
stdout: 'foo\nbar\nbaz',
stdout: null,
}

this.putProps = _.omit(this.updateProps, 'instanceId')
Expand Down

0 comments on commit b20a77a

Please sign in to comment.