Skip to content

chore: add wrangler logs to console output on deploy errors#80

Open
mcnulty-fp wants to merge 5 commits into
mainfrom
chore/INTER-2232-add-wrangler-logging
Open

chore: add wrangler logs to console output on deploy errors#80
mcnulty-fp wants to merge 5 commits into
mainfrom
chore/INTER-2232-add-wrangler-logging

Conversation

@mcnulty-fp

@mcnulty-fp mcnulty-fp commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
  • Update the wranglerDeploy and wranglerDelete functions to search the output from wrangler for its log file on failure and if the log file exists, read it and log it so it shows up in the workflow logs. This will help troubleshoot transient wrangler deploy issues.
  • Centralize invocation of wrangler in e2e deployment automation and enhance error handling of wrangler invocations

- Update the `wranglerDeploy` and `wranglerDelete` functions to
  search the output from wrangler for its log file on failure
  and if the log file exists, read it and log it so it shows
  up in the workflow logs. This will help troubleshoot transient
  wrangler deploy issues.
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d29b7f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 88.24% 878/995
🟢 Branches 82.54% 312/378
🟢 Functions 91.41% 181/198
🟢 Lines 88.3% 868/983

Test suite run success

303 tests passing in 87 suites.

Report generated by 🧪jest coverage report action from ec00930

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟢 All files 88.24 82.53 91.41 88.3
🔴  ...gent-processor 0 0 0 0
🔴   index.ts 0 0 0 0 4-17
🔴  ...s/instrumentor 20.68 6.66 16.66 21.42
🔴   index.ts 0 100 0 0 6-15
🟡   instrumentor.ts 75 50 100 75 26-27
🔴   protectedApis.ts 0 0 0 0 5-33
🟢  ...or/fingerprint 100 100 100 100
🟢   ...herContext.ts 100 100 100 100
🟢  ...mentor/patcher 89.13 83.33 100 89.13
🟢   context.ts 87.87 83.33 100 87.87 116-117,129-130
🟢   ...sInjection.ts 92.3 83.33 100 92.3 66
🟢  .../patcher/fetch 95.23 96.15 100 95.23
🟢   fetch.ts 89.28 90 100 89.28 29-31,72
🟢   ...herRequest.ts 100 100 100 100
🟢   requestInit.ts 100 100 100 100
🟢  ...r/patcher/form 85.96 85.71 100 85.96
🟢   form.ts 100 100 100 100
🟡   ...alsElement.ts 75.75 71.42 100 75.75 ...30,37-38,43,48
🟢   observer.ts 100 100 100 100
🟢  ...or/patcher/xhr 87.87 94.44 100 87.3
🟢   open.ts 86.95 100 100 86.36 44-46,72
🟢   ...herRequest.ts 85.71 100 100 85.71 25
🟢   send.ts 92.85 100 100 92.3 75,82
🟢   types.ts 100 100 100 100
🟡   xhr.ts 71.42 80 100 71.42 14-15
🟡  scripts/shared 62.5 20 50 62.5
🟡   logger.ts 62.5 20 50 62.5 19,26,33,44-48
🔴  ...ed/fingerprint 0 100 0 0
🔴   import.ts 0 100 0 0 5-22
🟢  shared 90.9 66.66 80 90.9
🟢   const.ts 100 100 100 100
🟢   ...rationInfo.ts 100 100 100 100
🟡   types.ts 80 66.66 66.66 80 29
🟢  worker 91.24 78.87 95.12 91.24
🟢   cookies.ts 92.85 81.81 100 92.85 79,86-87
🟢   env.ts 82.85 57.69 100 82.85 ...80,102-105,111
🟢   errors.ts 81.81 100 71.42 81.81 28,46
🟢   handler.ts 93.75 100 100 93.75 60
🟢   index.ts 100 100 100 100
🟢   scripts.ts 100 100 100 100
🟢   urlMatching.ts 100 100 100 100
🟢  ...er/fingerprint 96.07 89.55 96.29 96.55
🟢   agent.ts 100 100 100 100
🟢   ...tionClient.ts 96.49 88.09 90.9 97.34 185,221-222
🟢   ...lientTypes.ts 100 100 100 100
🟢   region.ts 100 100 100 100
🟢   ruleset.ts 94.28 90.9 100 94.28 105-106
🟢   tampering.ts 93.1 92.85 100 93.1 80-82
🟢  worker/handlers 93.82 83.78 90.9 93.82
🔴   handleError.ts 0 0 0 0 4-10
🟢   ...otectedApi.ts 100 100 100 100
🟢   ...ApiOptions.ts 100 90.9 100 100 57
🟢   handleScript.ts 100 100 100 100
🟢   ...sInjection.ts 91.66 50 100 91.66 53
🟢  worker/utils 92.71 90.9 100 92.5
🟢   cache.ts 87.5 73.33 100 87.5 10,25,45,94
🟢   edgeHeaders.ts 100 100 100 100
🟢   headers.ts 90.47 90 100 89.65 30-36
🟢   ip.ts 100 100 100 100
🟡   origin.ts 61.9 83.33 100 61.9 12-21
🟢   request.ts 100 100 100 100
🟢   response.ts 100 100 100 100
🟢   string.ts 100 100 100 100

} else {
if (stdout) {
if (stdout.includes('This Worker does not exist on your account')) {
if (ignoreWorkerNotFound && stdout.includes('This Worker does not exist on your account')) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: could you elaborate what ignoreWorkerNotFound does? It is not clear to me what "ignore" means. What happens when it is passed as true, as opposed to false? 1-2 sentences as a comment could help

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clarified in d29b7f6

necipallef
necipallef previously approved these changes Jun 24, 2026
TheUnderScorer
TheUnderScorer previously approved these changes Jun 24, 2026
@mcnulty-fp mcnulty-fp dismissed stale reviews from TheUnderScorer and necipallef via d29b7f6 June 26, 2026 19:02
@mcnulty-fp mcnulty-fp requested a review from necipallef June 26, 2026 19:03
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

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.

3 participants