fix: deploy.sh가 OTel agent jar를 앱 jar로 잘못 선택하는 버그 수정 - #204
Merged
Conversation
JAR_PATH를 ls *.jar | grep -v plain | head -1로 고르고 있었는데, grafana-opentelemetry-java.jar가 알파벳순으로 server-*.jar보다 앞에 와서 OTel agent jar 자체를 애플리케이션으로 실행하려다 즉시 크래시하는 문제가 있었음. grep -v opentelemetry를 추가해 제외. 8080 배포가 이 버그로 실패했으나, 롤링 재시작 설계 덕분에 8081이 계속 서비스해서 전체 다운은 없었음.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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.
문제
Redis 캐싱 PR(#203) 배포 중 8080 프로세스가 크래시하며 배포 실패(
d-EO2NEUOXJ).deploy.sh의 JAR 선택 로직:JAR_PATH=$(ls $APP_DIR/*.jar | grep -v plain | head -1)grafana-opentelemetry-java.jar가 알파벳순으로server-0.0.1-SNAPSHOT.jar보다 앞에 와서, OTel agent jar 자체를 애플리케이션 jar로 잘못 선택해java -javaagent:grafana-opentelemetry-java.jar -jar grafana-opentelemetry-java.jar를 실행하려다 즉시 크래시.처음 배포 스크립트를 만들 때는 이 디렉토리에 OTel agent jar가 없어서 안 걸렸는데, 이후 OTel 경로 문제를 고치면서
/home/ec2-user/app/에 복사해둔 게 이번에 문제가 됨.수정
grep -v opentelemetry추가해 OTel agent jar를 명시적으로 제외.영향
8080 배포는 실패했지만, 롤링 재시작 설계(포트 하나씩만 처리, 실패 시 그 포트만 멈춤) 덕분에 8081이 계속 서비스해서 전체 다운은 없었음(외부에서는 계속 200 응답). 이번 PR 머지 후 재배포하면 8080도 정상화됨.