feat: Flyway 버전 형상 백엔드 (조회/충돌·순서역전 분석/작업중 이슈)#35
Merged
Conversation
- MigrationVersion: V31.7.0 시맨틱(숫자) 정렬, isHigherThan/sameMajorWith - MigrationFile: 파일명에서 버전/설명 파싱 - MigrationScript: SQL 정적분석으로 영향 테이블/컬럼/신규테이블 추출 (out-of-order 충돌 판정 기반) - 도메인 단위테스트 13개
- MigrationStatus(4단계 파이프라인), TrackedMigration, ConflictSeverity - OutOfOrderAnalyzer: 순서역전 감지(같은 컬럼=강/같은 테이블=약), 같은 번호 충돌 묶기 - 분석기 단위테스트 5개 (누적 18개)
- FlywayMonitorProperties: 소스(woowacourse-teams/2025-bom-bom) 좌표 기본값 + GITHUB_ISSUE_TOKEN - GitHubClient(WebClient): 트리/raw/PR+파일/이슈 조회 + flyway-wip 이슈 생성 - FlywayService: 4단계 상태판정(server/main/PR/이슈) + 디듑 + 적용본 SQL 보강 + 분석기 - FlywayController + Swagger API + 요청/응답 DTO - 서비스 단위테스트(GitHubClient mock, 순서역전 end-to-end) + 이슈 템플릿 라운드트립
수동 작업중 등록 + 백엔드 자동생성 본문 양식과 일치. 라벨 flyway-wip 은 레포 설정에서 1회 생성 필요.
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
어드민에서 Flyway 버전 형상을 조회하고, out-of-order 적용 시 발생할 수 있는 충돌(같은 번호 / 순서 역전)을 감지하며, 작업중인 마이그레이션을
flyway-wip이슈로 예약하는 백엔드 API를 추가합니다. (GET /admin/api/v1/flyway/overview,GET /flyway/script,POST /flyway/wip)❓ Why
곧 Flyway out-of-order를 도입할 예정인데, 그로 인해 두 종류의 사고가 날 수 있습니다.
이를 머지 전에 사람이 한눈에 보고 예방할 수단이 필요해, 형상을 읽어 분석/노출하는 백엔드를 만들었습니다.
🔧 How
MigrationVersion(시맨틱 정렬),MigrationFile(파일명 파싱),MigrationScript(SQL 정적분석 → 영향 테이블/컬럼),OutOfOrderAnalyzer(같은번호 충돌 + 순서역전: 같은 컬럼=강 / 같은 테이블=약)GitHubClient(WebClient) — 트리/raw/PR+파일/이슈 조회 + 이슈 생성 (기존LambdaPlaywrightService패턴 재사용)main/ 배포대기=통합−배포 차집합 / 열린PR=리뷰중 / flyway-wip 이슈=로컬작업중) + 버전 디듑 + 적용본 SQL 보강 후 분석main에 있어 적용 기준=main(server브랜치엔 마이그레이션 파일이 없음). 별도 마이그레이션-반영 deploy 브랜치가 생기면flyway.source.deploy-branch로 바꾸면 '배포 대기' 단계가 활성화됨woowacourse-teams/2025-bom-bom, 이슈 생성은Bombom-Team/admin(토큰 스코프 일치). 설정은 yml 없이 기본값 +GITHUB_ISSUE_TOKEN.github/ISSUE_TEMPLATE/flyway-wip.yml👀 Review Point
FlywayService)의 경계 케이스 검토GITHUB_ISSUE_TOKEN(설정됨) +Bombom-Team/admin에 라벨flyway-wip1회 생성 필요