Skip to content

fix(observability,ci): SERVER_PORT 바인딩 선언 및 deploy.yml 중복 키 제거 #141 - #152

Merged
kusuri12-09 merged 2 commits into
developfrom
bug/141-observability-deploy
Sep 13, 2026
Merged

fix(observability,ci): SERVER_PORT 바인딩 선언 및 deploy.yml 중복 키 제거 #141#152
kusuri12-09 merged 2 commits into
developfrom
bug/141-observability-deploy

Conversation

@tlgms

@tlgms tlgms commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

#142 머지 뒤 남은 배포 문제 두 가지를 고친다.

  • observability 만 server.port 를 선언하지 않아, SERVER_PORT 가 빠지면 조용히 8080 으로 떠 Gateway 의 모니터링 경로 전체가 502 가 되는 문제
  • deploy.yml 의 중복 키 때문에 GitHub 가 워크플로를 읽지 못해, 모든 브랜치 푸시마다 실패 실행이 생기고 main 푸시에서 배포가 돌지 않는 문제

Related Issue

Root Cause

observability SERVER_PORT

  • observability-bootstrapapplication.yaml 에만 server.port 가 없었다. 나머지 6개 서비스는 모두 port: ${SERVER_PORT} 를 선언한다(admin 은 fix(admin): SERVER_PORT 바인딩 선언 및 .env.example 추가 #135 #136 에서 추가)
  • .env.observabilitySERVER_PORT 가 있으면 relaxed binding 으로 먹어서 드러나지 않는다. 없으면 Spring 기본값 8080 으로 뜨는데, Gateway 는 systems/gateway/.env.example 관례대로 8085 를 호출하므로 연결이 거부되고 GatewayGlobalExceptionHandler 가 502 로 응답한다

deploy.yml

  • 547b349(CI/CD 구축 #79)에서 docker/build-push-actionwith: 블록에 tagscache-to 가 두 번씩 들어갔다. GitHub 는 이 파일을 파싱하지 못한다
  • 오류: (Line: 73, Col: 11): 'tags' is already defined, (Line: 78, Col: 11): 'cache-to' is already defined
  • 파일을 못 읽으니 on.push.branches: [main] 필터도 적용되지 않는다. 브랜치와 상관없이 푸시마다 잡이 없는 실패 실행(이름이 .github/workflows/deploy.yml)이 생기고, main 푸시에서는 빌드·배포가 실행되지 않는다

Fix Description

  • observability application.yamlport: ${SERVER_PORT} 추가. 다른 서비스처럼 기본값 없이 두어 누락 시 기동 단계에서 바로 실패하게 한다. systems/observability/.env.example 에는 이미 SERVER_PORT=8085 가 있다
  • deploy.yml 에서 :latest 만 붙이던 앞쪽 tags 와 중복 cache-to 를 지우고, :latest:<sha> 를 함께 붙이는 뒤쪽 tags 를 남긴다. 결과 파일이 chore(ci): PR 단위 Bazel 빌드/테스트 자동화 #93 #95c42ba1c 와 같아서 그 PR 과 충돌하지 않는다

Testing

  • Reproduced before fix
  • Verified after fix
  • Test details:
    • deploy.yml 수정 전: 푸시마다 위 파싱 오류로 실패한다(예: run 34756866638)
    • deploy.yml 수정 후: cf0c0c2 푸시에서 deploy.yml 실행이 생기지 않는다(main 이 아니므로 정상). chore/93-ci-pipeline 에서도 같은 변경(c42ba1c) 이후 실패 실행이 사라졌다
    • observability: SERVER_PORT 없이 기동하면 Could not resolve placeholder 'SERVER_PORT' 로 바로 실패한다. 수정 전 8080 기동은 선언 누락을 코드로만 확인했다

Risk & Impact

  • Risk level: Medium
  • 배포 전에 확인할 것
    • 배포 서버 .env.observabilitySERVER_PORT 가 없으면 이 변경 뒤 observability 가 기동에 실패한다. 조용히 502 가 나는 대신 로그에 드러나게 하려는 의도지만, 배포 전에 넣어 두어야 한다
    • main 에 머지되면 Deploy 워크플로가 실제로 돌기 시작한다. 7개 서비스 이미지를 빌드해 :latest, :<sha> 로 GHCR 에 푸시하고, DEPLOY_HOSTS 변수가 있으면 EC2 배포까지 실행한다
  • Affected areas: observability 기동 설정, .github/workflows/deploy.yml. 런타임 로직 변경 없음

Checklist

  • No new regressions introduced
  • Edge cases considered
  • Logs / error handling updated if needed (해당 없음)

🤖 Generated with Claude Code

tlgms and others added 2 commits September 13, 2026 21:22
observability 만 server.port 선언이 빠져 있어, .env 에 SERVER_PORT 가 없으면 조용히
8080 으로 뜬다. Gateway 는 관례대로 8085 를 부르므로 연결이 거부되고 모니터링 경로
전체가 502 가 된다.

다른 서비스와 동일하게 기본값 없이 ${SERVER_PORT} 로 선언해 누락 시 기동 단계에서
드러나게 한다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
build-push-action 의 with 블록에 tags 와 cache-to 가 두 번씩 선언돼 있어 GitHub 가
워크플로 파일을 파싱하지 못한다. 파싱이 안 되면 on.push.branches 필터도 적용되지
않으므로, 547b349 이후 모든 브랜치의 푸시마다 잡 없는 실패 실행이 생기고 main
푸시에서는 배포가 아예 돌지 않는다.

뒤에 선언된 tags(latest + sha) 를 남기고 앞의 단일 tags 와 중복 cache-to 를 지운다.
PR #95c42ba1c 와 같은 변경이라 그 PR 과 충돌하지 않는다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tlgms tlgms added the ready-for-review CodeRabbit 자동 리뷰 대상 (.coderabbit.yaml) label Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 92cac42a-2ccf-43bb-aad3-0734068ce344

📥 Commits

Reviewing files that changed from the base of the PR and between 77df2e7 and cf0c0c2.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • systems/observability/observability-bootstrap/src/main/resources/application.yaml

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.

@kusuri12-09
kusuri12-09 merged commit 2c9d280 into develop Sep 13, 2026
2 checks passed
@tlgms
tlgms deleted the bug/141-observability-deploy branch September 13, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review CodeRabbit 자동 리뷰 대상 (.coderabbit.yaml)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants