Conversation
Walkthrough이 PR은 cs25-service Dockerfile에서 Bash 기반 래퍼를 POSIX /bin/sh 스크립트로 교체하고, application.properties에서 Brave 연결 인자를 "--stdio"에서 ["--transport","stdio"]로 분리해 지정하도록 수정합니다. 그 외 빌드 단계는 변경되지 않았습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant App as cs25-service
participant Wrapper as /usr/local/bin/server-brave-search (/bin/sh)
participant Node as node
participant Brave as @brave/.../dist/index.js
App->>Wrapper: invoke with args ["--transport","stdio", ...]
Wrapper->>Node: node dist/index.js $@
Node->>Brave: start MCP server
Brave-->>App: communicates via stdio (per args)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cs25-service/Dockerfile (1)
38-45: POSIX sh 래퍼로 전환 및 인자 위임("$@") 처리 적절. 사소한 견고성/이미지 슬림화 제안현재 래퍼는 Node 탐색(fallback 포함)과 인자 위임이 올바르며, 애플리케이션 설정의 분리 인자와도 일관됩니다. 두 가지 소소한 개선을 권장합니다.
- 래퍼 스크립트에 에러/미정의 변수 실패를 켜두면 향후 변경 시 방어력이 올라갑니다.
- 런타임에서 bash를 직접 사용하지 않는다면 bash 패키지 설치를 제거해 이미지 크기/공격면을 줄일 수 있습니다. (이 변경은 본 변경 범위 밖이므로 참고용 예시를 덧붙입니다.)
래퍼 견고성 강화(변경 범위 내) 제안:
&& { \ - echo '#!/bin/sh'; \ + echo '#!/bin/sh'; \ + echo 'set -eu'; \ echo 'NODE=$(command -v node || echo /usr/bin/node)'; \ echo 'exec "$NODE" "'"$SRCDIR"'/dist/index.js" "$@"'; \ } > /usr/local/bin/server-brave-search \이미지 슬림화(변경 범위 밖 참고용) 예시:
# 기존 apt-get install -y --no-install-recommends curl ca-certificates gnupg bash # 제안: bash 미사용 시 제거 apt-get install -y --no-install-recommends curl ca-certificates gnupg
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cs25-service/Dockerfile(1 hunks)cs25-service/src/main/resources/application.properties(1 hunks)
🔇 Additional comments (1)
cs25-service/src/main/resources/application.properties (1)
72-73: 검증 완료:--stdio단일 플래그 잔여 사용처 없음
rg --fixed-strings -- '--stdio'전역 검색 결과, 과거 단일--stdio플래그 사용 흔적이 없습니다.- Spring Boot properties에 설정된
배열 인자 전달 방식은 순서를 유지하며 Dockerfile의spring.ai.mcp.client.stdio.connections.brave.args[0]=--transport spring.ai.mcp.client.stdio.connections.brave.args[1]=stdio"$@"래퍼를 통해 최종 실행 시--transport와stdio가 별도 인자로 정상 전달됩니다.따라서 브레이브 MCP 인자 분리 적용은 합리적이며, 추가 조치 없이 머지 진행해도 좋습니다.
🔎 작업 내용
Summary by CodeRabbit
버그 수정
작업(Chores)