Skip to content

[Fix] CD 변경 #311

Merged
david-parkk merged 38 commits intoKU-rum:developfrom
david-parkk:feat/#303
Sep 26, 2025
Merged

[Fix] CD 변경 #311
david-parkk merged 38 commits intoKU-rum:developfrom
david-parkk:feat/#303

Conversation

@david-parkk
Copy link
Contributor

@david-parkk david-parkk commented Sep 26, 2025

#️⃣ 연관된 이슈

closes #303

📝작업 내용

  • CD변경

작업 상세 내용

CD mysql의존성 추가

💬리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.

Summary by CodeRabbit

  • Chores
    • 프로덕션 백엔드 배포 워크플로우에 MySQL 서비스를 통합해 실행 환경 일관성과 안정성을 강화하고 헬스 체크로 가용성을 모니터링합니다.
    • 빌드/테스트 파이프라인 구성을 단순화해 파이프라인 신뢰성을 개선하고 불필요한 단계 호출을 제거했습니다.

david-parkk and others added 30 commits September 9, 2025 19:35
- 불필요한 의존성 삭제
- MySQL 환경
- MySQL 버전 번경
@coderabbitai
Copy link

coderabbitai bot commented Sep 26, 2025

Walkthrough

GitHub Actions의 backend-prod 워크플로에 mysql:latest 서비스가 추가되었고, Gradle 실행이 ./gradlew clean build +x test에서 ./gradlew clean build로 변경되어 테스트 관련 플래그가 제거되었습니다. MySQL은 포트 매핑, 환경 변수 및 헬스체크가 설정되어 있습니다.

Changes

Cohort / File(s) Summary
CI: MySQL 서비스 추가
\.github/workflows/backend-prod.yml
워크플로 잡에 mysql:latest 서비스 추가, 3306:3306 포트 매핑, MYSQL_DATABASEMYSQL_ROOT_PASSWORD 환경 변수 설정, 다중 플래그 기반 헬스체크 구성
CI: Gradle 실행 변경
\.github/workflows/backend-prod.yml
Gradle 실행 커맨드를 ./gradlew clean build +x test에서 ./gradlew clean build로 변경하여 테스트 태스크에 대한 플래그 조작 제거

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as 개발자
    participant GH as GitHub Actions Runner
    participant MySQL as MySQL 서비스
    participant Gradle as Gradle 빌드

    Dev->>GH: 푸시 / 워크플로 트리거
    GH->>MySQL: mysql:latest 서비스 시작 (env, 포트 3306)
    GH-->>MySQL: 헬스체크 수행 (다중 플래그)
    Note over GH,MySQL: 헬스체크 통과 대기

    GH->>Gradle: ./gradlew clean build 실행
    Gradle-->>GH: 빌드 결과 반환

    rect rgba(220, 245, 220, 0.6)
    note right of GH: 변경 요약: MySQL 서비스 추가, Gradle 테스트 플래그 제거
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • [Fix] CD 변경 #309: 동일 워크플로 파일(.github/workflows/backend-prod.yml)에서 Gradle 테스트 호출 관련 변경이 있었음 — 플래그 처리 관점에서 직접 관련.
  • [Fix] CD 변경 #310: 같은 워크플로의 Gradle 단계에 대해 -x test로 변경한 PR — 테스트 실행 방식 변경과 강한 연관성.

Poem

새벽 깃발 들고 토끼 한 마리,
헬스체크 통과에 킥킥 뛰네 🐇
포트는 열고 비밀번호 꽉! 🔐
빌드는 간결, 테스트는 깔끔—
배포밭에 당근 한 움큼 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning 연관 이슈 #303(KP-167)은 지도 공유 로직 변경 및 폴리곤 설정 구현을 요구하지만 PR에서는 CD 파이프라인에 MySQL 서비스를 추가하고 Gradle 테스트 단계를 수정하는 변경만 포함되어 있어 이슈 요구사항을 충족하지 않습니다. 지도 공유 로직 변경 및 폴리곤 설정 구현 작업을 포함하거나 잘못 연결된 이슈 번호를 수정하여 적절한 이슈와 매핑하도록 PR을 업데이트하세요.
Out of Scope Changes Check ⚠️ Warning PR에 포함된 MySQL 서비스 추가 및 Gradle 테스트 단계 수정은 지도 공유 로직 변경 및 폴리곤 설정 구현과 무관한 CD 파이프라인 작업으로 이슈 요구사항 범위를 벗어납니다. CD 파이프라인 관련 변경을 별도 PR로 분리하거나 연관된 이슈 요구사항에 맞는 지도 공유 로직 작업을 포함하도록 PR을 수정하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed 제목이 CD 파이프라인 변경을 나타내어 본 변경사항과 관련이 있지만 구체적인 변경 내용을 포함하지 않아 다소 일반적입니다.
Description Check ✅ Passed 제출된 설명은 모든 필수 템플릿 섹션을 포함하고 있으며 연관 이슈, 작업 내용 및 상세 내용이 명확하게 작성되어 있어 템플릿 요건을 충족합니다.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95895e4 and d07c223.

📒 Files selected for processing (1)
  • .github/workflows/backend-prod.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/backend-prod.yml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c0c6ba and 95895e4.

📒 Files selected for processing (1)
  • .github/workflows/backend-prod.yml (2 hunks)

Comment on lines +25 to +26
MYSQL_DATABASE: testdb
MYSQL_ROOT_PASSWORD: testdb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

루트 비밀번호를 레포에 하드코딩하지 말아주세요.
CI 설정에 루트 비밀번호를 그대로 커밋하면 누구나 열람할 수 있어 보안 위험이 큽니다. GitHub Secrets 등에 옮겨서 참조하도록 변경해 주세요.

-          MYSQL_ROOT_PASSWORD: testdb
+          MYSQL_ROOT_PASSWORD: ${{ secrets.CD_MYSQL_ROOT_PASSWORD }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MYSQL_DATABASE: testdb
MYSQL_ROOT_PASSWORD: testdb
MYSQL_DATABASE: testdb
MYSQL_ROOT_PASSWORD: ${{ secrets.CD_MYSQL_ROOT_PASSWORD }}
🤖 Prompt for AI Agents
In .github/workflows/backend-prod.yml around lines 25-26 the MySQL root password
is hardcoded (MYSQL_ROOT_PASSWORD: testdb); remove the literal value, add the
password to the repository or organization GitHub Secrets (e.g.,
MYSQL_ROOT_PASSWORD or DB_ROOT_PASSWORD), and update the workflow to read the
secret via GitHub Actions secrets reference so the password is not stored in
source control; ensure the secret name matches the one you add and test the
workflow to verify the secret is injected at runtime.

Comment on lines 28 to 31
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

MySQL 헬스체크가 비밀번호 없이 실행되어 항상 실패합니다.
mysqladmin ping은 루트 비밀번호가 없으면 인증에 실패하므로 서비스가 Healthy 상태로 전환되지 못하고 워크플로가 중단됩니다. 비밀번호를 포함하도록 수정해야 합니다.

-          --health-cmd="mysqladmin ping --silent"
+          --health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -p${MYSQL_ROOT_PASSWORD} --silent"
🤖 Prompt for AI Agents
In .github/workflows/backend-prod.yml around lines 28 to 31, the MySQL
healthcheck uses mysqladmin ping without credentials so it always fails; update
the health command to supply the root password from the workflow/container env
(prefer using MYSQL_PWD to avoid exposing the password) and run via a shell,
e.g. run sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" mysqladmin ping -h 127.0.0.1 -u
root --silent' (ensure the workflow sets MYSQL_ROOT_PASSWORD or the correct env
var and quote the variable).

@david-parkk david-parkk merged commit 1f22bff into KU-rum:develop Sep 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[KP-167] 지도 공유 로직 변경

1 participant