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

feat(build): collect errors + warnings with @sentry/node #8571

Merged
merged 5 commits into from
May 11, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Apr 4, 2023

Summary

Problem

We emit a lot of warnings and errors during our yari builds, but we don't actively track them.

Solution

Adds and configures Sentry Node to track console.warn/error/assert() calls during our builds.

Note: This does not enable Sentry for the website.


How did you test this change?

Set SENTRY_DSN_BUILD in my .env file and ran yarn build:prepare && yarn build --locale en-us --nohtml web/html, verifying that some warnings and errors appear in our (internal) Sentry project.

@caugner caugner requested a review from LeoMcA April 4, 2023 12:21
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Apr 4, 2023
@caugner caugner changed the title feat(build): add @sentry/node feat(build): collect errors + warnings with @sentry/node Apr 4, 2023
@caugner caugner temporarily deployed to stage April 5, 2023 14:38 — with GitHub Actions Inactive
@caugner caugner marked this pull request as draft April 5, 2023 15:56
@caugner caugner temporarily deployed to stage April 5, 2023 16:13 — with GitHub Actions Inactive
@caugner caugner marked this pull request as ready for review April 5, 2023 16:14
@github-actions github-actions bot added merge conflicts 🚧 Please rebase onto or merge the latest main. labels May 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

This pull request has merge conflicts that must be resolved before it can be merged.

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2023

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added merge conflicts 🚧 Please rebase onto or merge the latest main. and removed merge conflicts 🚧 Please rebase onto or merge the latest main. labels May 9, 2023
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 Please rebase onto or merge the latest main. label May 11, 2023
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Code looks good: my one concern is if this massively increases the length of our build action, can we kick off a test stage build before merging?

@caugner caugner temporarily deployed to stage May 11, 2023 18:40 — with GitHub Actions Inactive
@caugner
Copy link
Contributor Author

caugner commented May 11, 2023

my one concern is if this massively increases the length of our build action, can we kick off a test stage build before merging?

FWIW @LeoMcA Your manual stage-build yesterday took 26m 57s, and now mine took 26m 53s on this branch. Sentry just adds an error handler or a log middleware, so it only incurs runtime cost when errors actually occur.

PS: Interestingly, the scheduled runs seem to be slightly faster, around 25m 10s (last night, Tuesday, Monday).

@caugner caugner merged commit f18d609 into main May 11, 2023
@caugner caugner deleted the add-build-sentry branch May 11, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file github-actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants