Conversation
|
Warning Rate limit exceeded@choubung has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 34 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughCloud Run 배포에 Cloud SQL 내부 터널을 위한 인스턴스 연결을 추가하고, JDBC에 Cloud SQL Socket Factory를 사용하도록 DB_URL을 변경했으며 MySQL Socket Factory 의존성을 추가하고 서버 포트를 PORT 환경변수로 구성 가능하게 바꿨습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant App as 애플리케이션
participant SF as Socket Factory
participant CT as Cloud SQL 터널
participant DB as MySQL DB
Note over App,DB: 이전(직접 연결)
App->>DB: DB_URL(비소켓)로 직접 접속
Note over App,DB: 변경된 흐름(소켓 팩토리 + 내부 터널)
App->>SF: DB_URL + cloudSqlInstance로 접속 요청
SF->>CT: 내부 터널 생성 요청
CT->>DB: Cloud SQL 연결
DB-->>CT: 응답
CT-->>SF: 터널링된 연결 반환
SF-->>App: 소켓을 통한 DB 연결 제공
Estimated code review effort🎯 2 (단순) | ⏱️ ~10분
Possibly related PRs
Suggested labels
축하 시
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/cd.yml (1)
74-74: 데이터베이스 이름mydb를 환경 변수로 구성하는 것을 검토하세요.현재 JDBC URL에 데이터베이스 이름이 하드코딩되어 있습니다. 프로덕션 환경과 개발 환경에서 다른 데이터베이스를 사용해야 한다면, 환경 변수로 분리하는 것이 좋습니다.
- DB_URL=jdbc:mysql://google/mydb?socketFactory=com.google.cloud.sql.mysql.SocketFactory&cloudSqlInstance=${{ secrets.GCP_SQL_CONNECTION_NAME }}&useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8 + DB_URL=jdbc:mysql://google/${{ secrets.DB_NAME }}?socketFactory=com.google.cloud.sql.mysql.SocketFactory&cloudSqlInstance=${{ secrets.GCP_SQL_CONNECTION_NAME }}&useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/cd.yml(1 hunks)build.gradle(1 hunks)src/main/resources/application.properties(1 hunks)
🔇 Additional comments (2)
src/main/resources/application.properties (1)
3-3: 환경 변수 기반 동적 포트 설정이 올바르게 구현되었습니다.Spring 속성 자리표시자 문법을 올바르게 사용하였고, 기본값 9090으로 이전 환경과의 하위 호환성을 유지합니다. 기존 데이터베이스 설정 패턴과도 일관성이 있습니다.
.github/workflows/cd.yml (1)
67-68: Cloud SQL 내부 터널 설정이 올바르게 구성되었습니다.
add-cloudsql-instances필드로 Cloud Run과 Cloud SQL 인스턴스 간의 내부 터널을 설정하는 것이 올바릅니다. 이를 통해 공개 IP를 노출하지 않고 안전하게 연결할 수 있습니다.
Summary by CodeRabbit
새로운 기능
변경 사항