Skip to content

[UPLUS-86] CI 개선 - #2

Merged
swthewhite merged 6 commits into
developfrom
feat/UPLUS-86
Jan 14, 2026
Merged

[UPLUS-86] CI 개선#2
swthewhite merged 6 commits into
developfrom
feat/UPLUS-86

Conversation

@swthewhite

Copy link
Copy Markdown
Contributor

🎫 지라 티켓

UPLUS-86


✅ 작업 사항

  • checkstyle 개선
  • cicd workflow 개선
  • 모니터링 시스템 추가
  • ops를 위한 github actions 추가
  • CI 맞춰서 코드 개선

⌨ 기타

@github-actions github-actions Bot added the size/XL PR size: XL label Jan 14, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @swthewhite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 프로젝트의 지속적인 통합 및 배포(CI/CD) 환경을 전반적으로 개선하는 데 중점을 둡니다. 코드 품질을 높이기 위한 정적 분석 도구(Checkstyle)를 강화하고, 애플리케이션의 가시성을 확보하기 위한 모니터링 시스템을 구축했습니다. 또한, 개발 프로세스의 효율성을 높이기 위해 코드 소유자 지정 및 PR 템플릿 업데이트를 포함합니다. 이러한 변경사항들은 개발 워크플로우를 표준화하고, 시스템 안정성 및 유지보수성을 향상시키는 데 기여할 것입니다.

Highlights

  • CI/CD 개선: 코드 소유자 파일 추가 및 CI/CD 파이프라인 전용 Dockerfile 도입을 통해 CI/CD 프로세스를 개선했습니다.
  • 코드 품질 강화 (Checkstyle): Checkstyle 버전을 업데이트하고, Google Java Style Guide 기반의 엄격한 코드 스타일 규칙을 적용하여 코드 일관성과 품질을 향상시켰습니다. 이로 인해 여러 Java 파일에서 포맷팅 변경이 발생했습니다.
  • 모니터링 시스템 도입: Prometheus, Logstash, Micrometer, OpenTelemetry 등의 라이브러리를 추가하고 관련 설정을 구성하여 애플리케이션 모니터링 및 분산 트레이싱 기능을 도입했습니다. 프로덕션 환경에서는 JSON 형식의 로그를 사용하도록 Logback 설정을 추가했습니다.
  • 코드 커버리지 기준 상향: Jacoco 테스트 코드 커버리지 최소 기준을 75%에서 80%로 상향 조정하여 테스트 품질을 강화했습니다.
  • Pull Request 템플릿 및 불필요한 테스트 코드 제거: Pull Request 템플릿을 업데이트하고, 더 이상 사용되지 않는 HomeControllerTest 파일을 제거했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/deploy.yml
    • .github/workflows/integrate.yml
    • .github/workflows/pr-approval-check.yml
    • .github/workflows/pr-labeler.yml
    • .github/workflows/pr-reviewer.yml
    • .github/workflows/stale-pr.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@swthewhite
swthewhite merged commit 275e535 into develop Jan 14, 2026
2 of 3 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 CI/CD 파이프라인, 코드 스타일, 모니터링 시스템을 개선하는 중요한 변경사항을 담고 있습니다. Checkstyle 규칙을 Google Java Style Guide 기반으로 강화하고, Prometheus와 OpenTelemetry를 이용한 모니터링 및 트레이싱 기능을 추가했으며, 프로덕션 환경을 위한 JSON 형식의 구조화된 로깅을 도입한 점이 인상적입니다. 전반적으로 프로젝트의 안정성과 유지보수성을 크게 향상시키는 훌륭한 작업입니다.

몇 가지 추가 개선을 위해, 표준 로깅 프레임워크 사용, 프로덕션 환경에서 테스트 코드 비활성화, 그리고 코드의 간결성을 높이기 위한 몇 가지 제안을 리뷰에 포함했습니다.

Comment on lines +13 to +16
@Override
public void run(String... args) throws Exception {
producer.sendUsageMessage("key", "사용량 알림입니다");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

CommandLineRunner는 애플리케이션 시작 시 테스트 목적의 Kafka 메시지를 전송하는 것으로 보입니다. 프로덕션 환경에서 이러한 코드가 실행되는 것은 예기치 않은 동작을 유발할 수 있습니다. 클래스 레벨에 @Profile("!prod") 어노테이션을 추가하여 프로덕션 환경에서는 이 컴포넌트가 활성화되지 않도록 하는 것을 강력히 권장합니다.

ConcurrentKafkaListenerContainerFactory<String, String> factory =
new ConcurrentKafkaListenerContainerFactory<>();
factory.setConsumerFactory(consumerFactory);
factory.setAutoStartup(true); // 기본값이 true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ConcurrentKafkaListenerContainerFactoryautoStartup 속성은 기본값이 true이므로, 이 코드는 명시적으로 설정할 필요가 없습니다. 코드를 더 간결하게 유지하기 위해 해당 라인을 제거하는 것을 고려해 보세요.

topics = "notification_topic",
groupId = "notification-consumer-test-1")
public void consume(String message) {
System.out.println("notification consumer received data : " + message);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

System.out.println을 사용하여 로그를 출력하는 대신, SLF4J 로거를 사용하는 것이 좋습니다. 새로 추가된 logback-spring.xml 설정을 통해 로그 레벨, 포맷, 출력 대상 등을 중앙에서 관리할 수 있어 유지보수에 유리합니다. 클래스에 @Slf4j 어노테이션을 추가하고 log.info()를 사용해 주세요.

Suggested change
System.out.println("notification consumer received data : " + message);
log.info("notification consumer received data : {}", message);

}
@KafkaListener(id = "usageConsumer", topics = "usage_topic", groupId = "usage-consumer")
public void consume(String message) {
System.out.println("usage consumer received data : " + message);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

로깅에 System.out.println을 사용하는 것보다 SLF4J 로거를 사용하는 것이 표준적인 방법입니다. 로거를 사용하면 로그 레벨에 따른 제어가 가능하고, 설정된 포맷에 맞춰 로그가 출력되므로 디버깅과 모니터링에 더 효과적입니다. 클래스에 @Slf4j 어노테이션을 추가하고 log.info()로 변경하는 것을 권장합니다.

Suggested change
System.out.println("usage consumer received data : " + message);
log.info("usage consumer received data : {}", message);

} No newline at end of file
/** BaseException - 도메인 예외 (ex: ApplicationException) */
@ExceptionHandler(BaseException.class)
public ResponseEntity<Object> handleBaseException(BaseException e, HttpServletRequest request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

handleBaseException 메소드 내에서 request 파라미터가 사용되지 않고 있습니다. 불필요한 파라미터는 코드의 가독성을 해칠 수 있으므로 제거하는 것이 좋습니다.

Suggested change
public ResponseEntity<Object> handleBaseException(BaseException e, HttpServletRequest request) {
public ResponseEntity<Object> handleBaseException(BaseException e) {


/** 그 외 모든 예외 */
@ExceptionHandler(Exception.class)
public ResponseEntity<Object> handleUnhandledException(Exception e, WebRequest request) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

handleUnhandledException 메소드에서도 request 파라미터가 사용되지 않고 있습니다. 코드를 간결하게 유지하기 위해 이 파라미터를 제거하는 것을 고려해 보세요.

Suggested change
public ResponseEntity<Object> handleUnhandledException(Exception e, WebRequest request) {
public ResponseEntity<Object> handleUnhandledException(Exception e) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant