Repository navigation
[BOM-1290] chore: 배포시 코드가 바뀌지 않은 JS 파일은 이름이 바뀌지 않도록 빌드 설정 변경 - #382
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
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. |
sanghee01
commented
Nov 2, 2026
sanghee01
left a comment
Member
Author
There was a problem hiding this comment.
🤖 PR Review
✅ 꼭 고쳐야 할 문제는 찾지 못했습니다.
🚨 0 Critical ·
⚠️ 0 Major · 📝 0 MinorCritical: 장애·데이터 손실·보안 문제 · Major: 특정 상황에서 생기는 버그 · Minor: 동작은 하지만 고치면 좋은 것
요약
꼭 고쳐야 할 문제는 찾지 못했습니다. 번들에서 읽는 환경변수가 모두 개별 정의에 들어 있고, Sentry release는 Sentry.init에서 직접 넘기고 있어 주입을 꺼도 이벤트의 release 값은 그대로입니다.
👀 Review Point 확인 결과
| 항목 | 결과 | 근거 |
|---|---|---|
| JS 파일 이름 비교 (141 / 142) | ❔ 확인 못 함 | 운영 빌드를 직접 돌리지 않았습니다. 코드상으로는 배포마다 바뀌는 값이 SENTRY_RELEASE(env.ts에 들어감)뿐이라 작성자 측정 결과와 맞습니다. |
| process 관련 런타임 에러 여부 | ✅ 문제 없음 | head 기준 web/src·shared/src에서 process.env를 읽는 곳은 web/src/apis/env.ts:2-12뿐이고, 그 키는 모두 CLIENT_ENV_KEYS, ENABLE_MSW, webpack mode의 NODE_ENV로 정의됩니다. |
| dev 배포 후 Sentry 이벤트의 release | ✅ 문제 없음 | web/src/libs/sentry/initSentry.ts의 init에 release: ENV.sentryRelease를 넘기고 있어 주입값에 의존하지 않습니다. 실제 이벤트는 배포 후 확인이 필요합니다. |
| 운영 배포 후 source map 연결 | ❔ 확인 못 함 | release.inject: false는 release 주입만 끄고 sourcemaps 업로드와 debug ID 주입 설정은 그대로입니다. 실제 연결은 배포 후 Sentry에서 확인해야 합니다. |
📋 리뷰하면서 확인한 내용
web/webpack.config.ts전체를 head 기준으로 읽었습니다.@bombom/shared/envalias가web/src/apis/env.ts를 가리켜 shared 코드도 같은 정의를 씁니다.git grep 'process\.env'로web/src·shared/src를 검색해 env.ts 외 사용처가 없음을 확인했습니다. node_modules 안 라이브러리의process.env.*참조는 확인하지 않았습니다.SENTRY_RELEASE는.github/workflows/frontend-ci-base.yml:57에서github.sha로 넣고 있어 release 이름과 업로드는 기존과 같습니다.- 빌드, lint, type-check, 브라우저 실행은 하지 않았습니다.
🤖 Claude PR Review
Generated by Claude Code
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 What
❓ Why
🔧 How
SENTRY_RELEASE={id:"<커밋 sha>"}삽입release.inject: false로 주입 끔process.env정의process.env전체를 정의src/apis/env.ts가 쓰는 값만 개별로 정의, 나머지는 빈 객체Sentry.init에 직접 넘기고 있어(src/libs/sentry/initSentry.ts) 주입값은 쓰이지 않았음NODE_ENV는 webpack이mode로 넣어 주므로 목록에서 제외왜
src/apis/env.ts에서 쓰는 값만 넣었나GITHUB_SHA등)가 JS 파일 2개에 들어갔고, 그 값이 배포마다 달라 두 파일 이름도 매번 바뀜👀 Review Point
release 값만 다르게 운영 빌드를 두 번 하고 JS 파일 이름 비교
남은 1개는 release 값을 담은
env.ts가 들어 있는 파일이라 배포마다 바뀌는 게 정상빌드 결과를 로컬에서 띄워 첫 화면과 메뉴 이동(JS 파일 추가 로드) 확인. 에러 화면,
process관련 에러 없음pnpm --filter web type-check,pnpm --filter web lint(에러 0, 기존 경고 2건)dev 배포 후 Sentry 이벤트에 release가 그대로 찍히는지 확인
운영 배포 후 source map이 연결된 스택 트레이스가 보이는지 확인
🤖 Generated with Claude Code