-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(mdx): Handle read-only filesystems during MDX compilation #15453
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will decrease total bundle size by 1 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
Files in
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
| options.write = true; | ||
| // Set write to false to prevent esbuild from writing files automatically. | ||
| // We'll handle writing manually to gracefully handle read-only filesystems (e.g., Lambda runtime) | ||
| options.write = !!process.env.CI; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Dynamic Assets Unwritten in Runtime
Setting options.write = false in non-CI environments prevents esbuild from writing output files, but there's no code to manually write result.outputFiles when write is false. In Lambda/runtime environments, assetsCacheDir is null, so the copy operation at line 721 doesn't execute, leaving generated assets (images, etc.) unwritten. This breaks dynamic content that wasn't pre-built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cursoragent can you break down what is being written, where it was being written, and what its purpose was. Was this recently changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor
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. The issue was that: esbuild failed to create the image output directory in the read-only Lambda environment because
options.write: truetriggered an unprotected internalmkdircall.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.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
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