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: fail production build process upon @Inject variable interpolation failure #9354

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

a-hariti
Copy link
Collaborator

@a-hariti a-hariti commented Mar 5, 2024

Pre-merge checklist

If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs
  • PR was reviewed and approved by a member of the Sentry docs team

Description of changes

This prevents showing empty code blocks when @inject variables interpolation fails.

An error is logged to the console in development mode, and the build fails in prod.

Closes #3004

Extra resources

Copy link

vercel bot commented Mar 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2024 8:37pm

Copy link

codecov bot commented Mar 5, 2024

Bundle Report

Changes will decrease total bundle size by 6.55MB ⬇️

Bundle name Size Change
sentry-docs-client 5.52MB 6 bytes ⬇️
sentry-docs-server (removed) 5.94MB ⬇️
sentry-docs-edge-server (removed) 617.59kB ⬇️

Copy link
Contributor

@stephanie-anderson stephanie-anderson left a comment

Choose a reason for hiding this comment

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

Looks good, have you tested it with a local production build? (Let's maybe merge this one next week)

@a-hariti
Copy link
Collaborator Author

a-hariti commented Mar 8, 2024

Yes, change any call to @inject packages.version('oops') to see it fail

@lizokm lizokm merged commit 0043029 into master Mar 15, 2024
8 checks passed
@lizokm lizokm deleted the fail-on-injection-failure-2 branch March 15, 2024 20:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building docs should break if version can't be resolved.
3 participants