Skip to content

Commit

Permalink
do not retry instance creation, report that cannot proceed with faile…
Browse files Browse the repository at this point in the history
…d cloud in serial
  • Loading branch information
cacieprins committed Dec 2, 2024
1 parent 9c2277e commit 6386b9e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ export const AllCypressErrors = {
${fmt.highlightSecondary(arg1.response)}
Because you passed the ${fmt.flag(`--record`)} flag, this run cannot proceed because it requires a valid response from our servers.
${fmt.listFlags(arg1.flags, {
group: '--group',
ciBuildId: '--ciBuildId',
Expand Down
28 changes: 13 additions & 15 deletions packages/server/lib/cloud/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,20 @@ export default {
'platform',
])

return retryWithBackoff((attemptIndex) => {
return rp.post({
body,
url: recordRoutes.instances(runId),
json: true,
encrypt: preflightResult.encrypt,
timeout: timeout ?? SIXTY_SECONDS,
headers: {
'x-route-version': '5',
'x-cypress-run-id': runId,
'x-cypress-request-attempt': attemptIndex,
},
})
.catch(RequestErrors.StatusCodeError, formatResponseBody)
.catch(tagError)
return rp.post({
body,
url: recordRoutes.instances(runId),
json: true,
encrypt: preflightResult.encrypt,
timeout: timeout ?? SIXTY_SECONDS,
headers: {
'x-route-version': '5',
'x-cypress-run-id': runId,
'x-cypress-request-attempt': 0,
},
})
.catch(RequestErrors.StatusCodeError, formatResponseBody)
.catch(tagError)
},

postInstanceTests (options) {
Expand Down

0 comments on commit 6386b9e

Please sign in to comment.