You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mdx): Handle read-only filesystems during MDX compilation (#15453)
More research needed. It appears like we are generating files (or at
least a directory) at build-time in an immutable vercel lambda task. We
need to figure out why, then either move it to /tmp or prevent it all
together, which is what this PR is geared towards right now.
-----
## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*
Fixes
[DOCS-915](https://sentry.io/organizations/sentry/issues/6544953280/).
The issue was that: esbuild failed to create the image output directory
in the read-only Lambda environment because `options.write: true`
triggered an unprotected internal `mkdir` call.
- Prevents esbuild from automatically writing files during MDX
compilation.
- Manually writes output files from esbuild only during build time (when
filesystem is writable).
- Gracefully handles read-only filesystems (e.g., Lambda runtime) by
skipping file writing if it fails, assuming files already exist from
build time.
This fix was generated by Seer in Sentry, triggered by Cody De Arkland.
👁️ Run ID: 2524763
Not quite right? [Click here to continue debugging with
Seer.](https://sentry.io/organizations/sentry/issues/6544953280/?seerDrawer=true)
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## LEGAL BOILERPLATE
<!-- Sentry employees and contractors can delete or ignore this section.
-->
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
---------
Co-authored-by: seer-by-sentry[bot] <157164994+seer-by-sentry[bot]@users.noreply.github.com>
Co-authored-by: Kyle a.k.a. TechSquidTV <git@techsquidtv.com>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
0 commit comments