Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Suppress sentry-webpack-plugin logs #91

Merged
merged 1 commit into from
May 6, 2024

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented May 6, 2024

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
Copy link
Member

@sejas sejas left a comment

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
10 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants