Skip to content

build: Suppress sentry-webpack-plugin logs - #91

Merged
dcalhoun merged 1 commit into
trunkfrom
build/supress-sentry-webpack-plugin-logs
May 6, 2024
Merged

build: Suppress sentry-webpack-plugin logs#91
dcalhoun merged 1 commit into
trunkfrom
build/supress-sentry-webpack-plugin-logs

Conversation

@dcalhoun

@dcalhoun dcalhoun commented May 6, 2024

Copy link
Copy Markdown
Member

Proposed Changes

Avoid unnecessary development environment noise from a production-only
plugin.

Testing Instructions

Verify no logs display when environment variable is undefined

  1. npm start
  2. Verify no sentry-webpack-plugin values display in the server log.

Verify logs display when environment variable is defined

  1. SENTRY_AUTH_TOKEN='mock-value' npm start
  2. Verify sentry-webpack-plugin values display in the server log (a Sentry permission error will display due to an invalid token value).
sentry-webpack-plugin-logs

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@dcalhoun dcalhoun self-assigned this May 6, 2024
@dcalhoun
dcalhoun force-pushed the build/supress-sentry-webpack-plugin-logs branch from a70b8c7 to cade8c0 Compare May 6, 2024 14:30
Avoid unnecessary development environment noise from a production-only
plugin.
@dcalhoun
dcalhoun force-pushed the build/supress-sentry-webpack-plugin-logs branch from cade8c0 to d350f51 Compare May 6, 2024 14:30
@dcalhoun
dcalhoun marked this pull request as ready for review May 6, 2024 14:38
@dcalhoun
dcalhoun requested a review from a team May 6, 2024 14:38

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice It works as described and now the dev log is cleaner. Thanks!

npm start                                                  14s Node 20.9.0 21:41:36

> studio@1.0.1 start
> electron-forge start

✔ Checking your system
✔ Locating application
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies: 1 / 1 [0.2s]
✔ Running generateAssets hook
✔ [plugin-webpack] Compiling main process code [3s]
✔ [plugin-webpack] Compiling main process code [3s]
✔ [plugin-webpack] Compiling main process code [3s]
✔ [plugin-webpack] Launching dev servers for renderer process code [7s]
  › Output Available: http://localhost:9000

vs

SENTRY_AUTH_TOKEN='mock-value' npm start                 х INT Node 20.9.0 21:42:18

> studio@1.0.1 start
> electron-forge start

✔ Checking your system
✔ Locating application
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies: 1 / 1 [0.3s]
✔ Running generateAssets hook
⠋ [plugin-webpack] Compiling main process code
◼ [plugin-webpack] Launching dev servers for renderer process code
⠧ [plugin-webpack] Compiling main process code
◼ [plugin-webpack] Launching dev servers for renderer process code
⠋ [plugin-webpack] Compiling main process code
◼ [plugin-webpack] Launching dev servers for renderer process code
error: API request failed
  caused by: sentry reported an error: Invalid token (http status: 401)

⠙ [plugin-webpack] Compiling main process code
◼ [plugin-webpack] Launching dev servers for renderer process code

An unhandled rejection has occurred inside Forge:
...
@dcalhoun
dcalhoun merged commit cdc1034 into trunk May 6, 2024
@dcalhoun
dcalhoun deleted the build/supress-sentry-webpack-plugin-logs branch May 6, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants