fix(deploy): exclude source maps from website uploads#1738
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the deployment uploader to prevent source map files (.map) from being uploaded to public website S3 buckets, while keeping sourcemaps available in release artifacts for Datadog/debug workflows.
Changes:
- Filter out
.mapfiles (at any directory depth) during recursive S3 uploads. - Export
uploadDirectoryso it can be directly covered by Node tests. - Add a Node test verifying nested sourcemaps are excluded while normal assets still upload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/deploy.js | Skips .map files during recursive uploads and exports uploadDirectory for test coverage. |
| scripts/deploy.test.js | Adds a test that asserts .map files are excluded across nested paths while preserving upload order of remaining files. |
859310c to
2416a79
Compare
RoundingWell Care Ops Frontend
|
||||||||||||||||||||||||||||
| Project |
RoundingWell Care Ops Frontend
|
| Branch Review |
feature/fe-179-prevent-source-maps-from-being-publicly-deployed
|
| Run status |
|
| Run duration | 02m 08s |
| Commit |
|
| Committer | Paul Falgout |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
240
|
| View all changes introduced in this branch ↗︎ | |
Coverage Report for CI Build 19Coverage increased (+0.01%) to 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Closes FE-179
What
Why
Source maps are needed by Datadog and remain in the private release artifact, but they should not be publicly retrievable from application website buckets.
Scope
Deployment uploader and its Node tests only. Datadog upload, artifact packaging, checksums, release semantics, and Cypress behavior are unchanged.
Deployment Impact
Applies to future app deployments: source maps in release artifacts will no longer be copied to website buckets. No forms or bundles require a separate redeploy beyond the normal app deployment.
Testing
Summary by cubic
Exclude source maps from public website uploads while keeping them in release artifacts for Datadog. Prevents public access to
.mapfiles and applies to future deployments..mapfiles during recursive uploads viashouldSkipUploadEntry(handles nested paths; only skips files, not directories).uploadDirectoryand added a unit test proving maps are excluded at every depth and normal files still upload..mapfiles reach website buckets; other deployment behavior unchanged.Written for commit 2416a79. Summary will update on new commits.