Skip to content

Conversation

@7zrv
Copy link
Collaborator

@7zrv 7zrv commented Jan 19, 2025

📌 과제 설명

전체, 월, 주간 봉사시간 랭킹을 반환하는 기능을 구현했습니다.
매시 50분마다 랭킹을 계산하고 Redis에 해당값을 캐싱하여
캐싱된 값을 반환하도록 구현했습니다.

👩‍💻 요구 사항과 구현 내용

  • 일부 클래스명 컨벤션에 맞게 수정
  • 일부 에러가 발생하는 테스트 수정
  • 랭킹 계산 유스케이스 구현
  • 랭킹 캐싱 유스케이스 구현
  • 랭킹 반환 유스케이스 구현
  • 랭킹 계산, 캐싱을 위한 스케줄러 구현
  • 기존 테스트용 H2 DB와 Redis를 Test Containner로 대체

✅ PR 포인트 & 궁금한 점

QueryDSL의 경우 MySQL의 고급 기능 사용에 제약이 있어 불가피 하게 native query로
랭킹 조회 쿼리를 구현했습니다.

DB 전환후 발견된 문제로 컨트롤러 테스트시 Hikari connection을 제대로 반환하지않는 문제를 발견했습니다.
컨트롤러 테스트로 인해 테스트 시간이 증가했었다고 추정이 됩니다.
현재는 build시 컨트롤러 테스트를 제외시킨 상태이며 정확한 문제 진단후 해결해보겠습니다.

7zrv added 29 commits January 18, 2025 02:17
- 기존 봉사 기록 생성 유스케이스와 구현체에 대한 네이밍 수
- 본 클래스의 컨벤션에 맞춘 네이밍 수정에 따라 테스트 클래스의 명칭도 수정
- 레포지토리 인터페이스에 전체, 월, 주간 봉사 시간 랭킹 메서드 추가
- Jpa 레포지토리에 native쿼리 메서드 추가
- 레포지토리 구현체에 인터페이스 기능 구현
- 테스트 작성및 검증 완료
- 랭킹 계산 유스케이스 인터페이스 생성
- 구현체 생성및 랭킹 계산 메서드 구현
- 전체, 월, 주간 랭킹을 담는 Dto 클래스 구현
- 랭킹 객체 -> 랭킹 Dto mapper 구현
- 모든 랭킹을 담는 record 구현
- 테스트 작성및 검증 완료
- Redis 레포지토리 생성및 랭킹 저장 메서드 구현
- 랭킹 캐싱 유스케이스 생성
- 구현체 구현
- 테스트 작성및 검증 완료
- 랭킹 계산 유스케이스, 캐싱 유스케이스가 주입된 스케줄러 구현
- 테스트 작성및 검증 완료
- 유스케이스 인터페이스 생성
- 구현체 구현
- 테스트 작성및 검증 완료
- 기존 H2에서 Mysql로 변경
- 이전 커밋에서 누락된 테스트 클래스 추가
- 테스트 환경에서 mysql이용을 위한 test container 추가
- 관련 의존성 추가
- 관련 설정 클래스 생성
- 기존 support 클래스에 test container 클래스 상속
- 로그 제한을 위한 logback-test 추가
- 기존 h2, mysql 설정 제거
- 네이티브 쿼리 명시
- 맵퍼 클래스 수정
- 테스트및 검증 완료
- 봉사 랭킹 컨트롤러 구현
- 테스트및 검증 완료
- 봉사 시간 집계 실행, 종료 확인을 위한 로그 추
- 의미가 알맞은 예외 메세지로 수
- 레포지토리 인터페이스에 닉네임 리스트 반환 메서드 추가
- 레포지토리 구현체에 닉네임 리스트 반환 메서드 추가
- 테스트및 검증 완료
- 유스케이스 인터페이스 추가
- 구현체 생성
- 닉네임 리스트 반환 메서드 주입
- 테스트및 검증 완료
- Nickname앞에 volunteer를 추가하여 명시적인 이름으로 수정
- 봉사자 nickname을 담을 필드 추가
- volunteerId를 함께 반환 하도록 리팩토링
- volunteerId를 함께 반환 하도록 리팩토링
- nickname을 가진 map에서 volunteerId로 값을 가져오는 로직추가
- toUUID 컨버터의 접근 제어자를 public으로 수정
- 테스트및 검증 완료
- volunteer nickname 추가에 따른 내부 로직 수정
- 봉사자 id 추출 로직 메서드로 분리
- 닉네임 추출 로직 메서드로 분리
- 테스트및 검증 완료
- redis, mysql test container 클래스 추가
- VolunteerRepositoryImpl 수정
- VolunteerRepositoryImplTest 수정
- 도커 권한 부여 step 추가
- 기존 ci에서 push 옵션 삭제
@7zrv 7zrv added the Feature label Jan 19, 2025
@7zrv 7zrv self-assigned this Jan 19, 2025
@7zrv 7zrv linked an issue Jan 19, 2025 that may be closed by this pull request
3 tasks
@7zrv 7zrv requested review from leebs0521 and m-a-king January 19, 2025 07:00
@github-actions github-actions bot changed the title Feature/283 봉사 시간 랭킹 구현 [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 Jan 19, 2025
@github-actions github-actions bot closed this Jan 19, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

- testcontainer를 위한 설정추가
Copy link

@github-actions github-actions bot 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

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

- testcontainer를 위한 설정추가
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

- testcontainer를 위한 설정추가
Copy link

@github-actions github-actions bot 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

@github-actions github-actions bot 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

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

@7zrv 7zrv reopened this Jan 19, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

@github-actions github-actions bot changed the title [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 [BUILD FAIL] [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 Jan 19, 2025
@github-actions github-actions bot closed this Jan 19, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

- 스레드 풀의 크기를 16으로 감소
@7zrv 7zrv reopened this Jan 19, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

빌드에 실패했습니다.

@github-actions github-actions bot changed the title [BUILD FAIL] [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 [BUILD FAIL] [BUILD FAIL] [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 Jan 19, 2025
@github-actions github-actions bot closed this Jan 19, 2025
@sonarqubecloud
Copy link

@7zrv 7zrv changed the title [BUILD FAIL] [BUILD FAIL] [BUILD FAIL] Feature/283 봉사 시간 랭킹 구현 Feature/283 봉사 시간 랭킹 구현 Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 봉사 시간 랭킹 조회 기능

2 participants