배포 실패를 유발한 Liquibase checksum 검증을 복구한다#120
Merged
Merged
Conversation
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.
배경
Railway production 배포가 두 단계에서 깨지고 있었습니다.
gradle-9.4.0-bin.zip을 받는 중 10초 read timeout으로 build 단계에서 실패했습니다.13-room-game-cleanupchangeset checksum 불일치로 종료되어/actuator/health가 끝까지 healthy가 되지 못했습니다.Supabase production DB의
production.databasechangelog에는13-room-game-cleanup이 이미9:ab793f9c89fa3ff8af0afacad5e1391fchecksum으로 실행된 기록이 있었습니다. 이후 같은 changeset SQL이 수정되면서 현재 코드의 checksum과 production DB의 저장 checksum이 달라진 것이 healthcheck 실패의 직접 원인이었습니다.변경 사항
13-room-game-cleanupchangeset에 production DB에 이미 기록된 checksum을validCheckSum으로 명시했습니다.COALESCE(player_rows.position, '')변경은 유지했습니다. fresh DB나 레거시 데이터 검증에서 null position을 더 안전하게 처리하는 의도는 보존하고, 이미 운영에 적용된 checksum만 허용하는 방식입니다.networkTimeout을 10초에서 120초로 늘려 Railway build 환경의 일시적인 distribution 다운로드 지연에 덜 취약하게 했습니다.AS-IS
TO-BE
검증
./gradlew test --tests com.naminhyeok.fantazzk.LiquibaseChecksumTest./gradlew check./gradlew integrationTest리뷰 포인트
validCheckSum으로 이전 checksum을 허용하는 방향이 맞는지 봐주세요.