Repository navigation
chore: Dockerfile 시간대 설정 이중화 및 주석 정정 (#76) - #77
Merged
Merged
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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.
개요
Dockerfile의 시간대 주석이 존재하지 않는 클래스를 가리키고 있었고, 운영 시간대가ENV TZ한 줄의 단일 실패점이었다. 주석을 사실에 맞게 고치고-Duser.timezone으로 이중화한 뒤, 사라지면 CI가 잡도록 테스트를 넣었다.Closes #76
변경 내용
1. 주석 정정 —
TimeZoneConfig는 #59 작업 중 만들었다가 버그를 유발해 삭제한 클래스다. 코드에 없다. 주석이 "컨테이너 TZ는 보조 수단"처럼 읽혔는데 실제로는 그게 전부였다.2.
ENTRYPOINT에-Duser.timezone=Asia/Seoul추가 — 둘 중 하나만 남아도 동작한다.3.
ServerTimeZoneTest에 Dockerfile 검증 테스트 추가 — 두 줄 중 하나라도 사라지면 실패한다. 양쪽을 각각 지워 보고 실제로 FAILED가 되는 것까지 확인했다.운영 베이스 이미지에서 실측
eclipse-temurin:21-jre/21-jdk로 직접 확인했다.user.timezoneTimeZone.getDefault()now()nullEtc/UTCTZ=Asia/SeoulnullAsia/Seoul-Duser.timezone=Asia/Seoul만Asia/SeoulAsia/SeoulAsia/SeoulAsia/Seoul둘 다 설정해도 충돌하지 않는다.
빌드한 이미지로 검증
왜
TimeZone.setDefault()를 쓰지 않는지 (주석에도 남김)setDefault()는user.timezone시스템 프로퍼티를 갱신하지 않는다. 그래서 JDBC는 UTC로, 애플리케이션은 KST로 동작하고LocalDate가 DB 왕복에서 하루 밀린다. #59 작업 중 실측한 값이다.테스트
전체 120개 통과 (119 + 1).
서버 영향
없다. 설정값이 바뀌지 않고 같은 시간대를 두 경로로 거는 것뿐이다. 재배포만 하면 된다.
Summary by CodeRabbit