Skip to content

Conversation

@johnbosco0414
Copy link
Collaborator

@johnbosco0414 johnbosco0414 commented Oct 3, 2025

제목(필수): [TYPE]: 제목 예) [FEAT]: 회원가입 기능 추가

제목 규칙 자세히 보기
  • 형식: [TYPE]: 제목
  • 제한: 50자 이내, 첫 글자 대문자, 명령문
  • TYPE: FEAT FIX REFACTOR COMMENT STYLE TEST CHORE INIT

무엇을 / 왜

  • 무엇(What):
  1. 프로덕션 환경에서 Initdata 생성하지못하도록 수정
  2. 테스트 프로파일 설정 수정 (application-test.yml)
  • jpa.hibernate.ddl-auto: create-drop 설정 추가

  • 테스트 실행 시마다 DB 스키마 초기화 및 종료 시 삭제

  • 왜(Why):

  1. 프로덕션 환경에서 Initdata 생성못하도록 수정 이유
  • InitData가 스프링 재시작 시마다 실행되어 중복 데이터 생성 및 불필요한 GEMINI API 호출 발생 (429 에러)
  • Blue-Green 배포 시에도 InitData 재실행으로 인한 리소스 낭비 방지
  1. 테스트 프로파일 설정 수정 이유
  • 기존 ddl-auto: update 설정으로 인해 이전 테스트 데이터가 H2 메모리에 남아있음
  • InitData가 DecisionLine에 대한 Scenario를 중복 생성하려 시도하여 unique constraint 위반
  • create-drop으로 변경하여 각 테스트 실행마다 깨끗한 DB 환경 보장

어떻게(요약) — 3줄 이내

테스트 격리: ddl-auto: create-drop으로 각 테스트마다 DB 초기화하여 데이터 충돌 및 unique constraint 위반 방지

영향 범위

  • API 변경
  • DB 마이그레이션
  • Breaking Change
  • 보안/권한 영향
  • 문서/가이드 업데이트 필요

체크리스트

  • 타입 라벨 부착 (FEAT/FIX/REFACTOR/COMMENT/STYLE/TEST/CHORE/INIT)
  • 로컬/CI 테스트 통과
  • 영향도 점검 완료
  • 주석/문서 반영(필요 시)

ToDo (선택)

  • 할 일 1
  • 할 일 2

스크린샷/증빙(선택)

이슈 연결 (자동)

Closes #72

Copy link
Collaborator

@lcs9317 lcs9317 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

Copy link
Collaborator

@shihan00321 shihan00321 left a comment

Choose a reason for hiding this comment

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

확인했습니다!

@johnbosco0414
Copy link
Collaborator Author

관리자계정이 관리자기능이 없는 관계로 유명무실하고, 보안 염려가 있어 코드 수정 후 다시 PR 예정

@johnbosco0414 johnbosco0414 reopened this Oct 3, 2025
Copy link
Collaborator

@Gooraeng Gooraeng left a comment

Choose a reason for hiding this comment

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

확인했습니다! 고생하셨어요!

@johnbosco0414 johnbosco0414 merged commit 889c639 into main Oct 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIX 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX]: 배포환경에서 Initdata 관련버그 수정

5 participants