Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YS-198] fix: recruitStatus 컬럼명 변경에 따른 스케줄러의 모집 상태 변경 로직을 true->false로 수정 #54

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

Ji-soo708
Copy link
Member

@Ji-soo708 Ji-soo708 commented Jan 23, 2025

💡 작업 내용

  • recruitStatus 컬럼명 변경에 따른 스케줄러 로직을 true->false로 수정

✅ 셀프 체크리스트

  • PR 제목을 형식에 맞게 작성했나요?
  • 브랜치 전략에 맞는 브랜치에 PR을 올리고 있나요?
  • 테스트는 잘 통과했나요?
  • 빌드에 성공했나요?
  • 본인을 assign 해주세요.
  • 해당 PR에 맞는 label을 붙여주세요.

🙋🏻‍ 확인해주세요

  • 관련된 Discussion 등이 있다면 첨부해주세요

🔗 Jira 티켓


https://yappsocks.atlassian.net/browse/YS-198

Summary by CodeRabbit

  • 버그 수정
    • 실험 게시물 상태 업데이트 로직 개선
    • 게시물의 모집 상태를 더 정확하게 관리할 수 있도록 상태 변경 조건 수정

이 업데이트는 실험 게시물의 모집 상태를 보다 정확하게 제어하여 사용자 경험을 향상시킵니다.

@Ji-soo708 Ji-soo708 added the 🐛 BUG 버그 label Jan 23, 2025
@Ji-soo708 Ji-soo708 self-assigned this Jan 23, 2025
@Ji-soo708 Ji-soo708 requested a review from chock-cho January 23, 2025 10:47
Copy link

coderabbitai bot commented Jan 23, 2025

워크스루

이 변경사항은 ExperimentPostCustomRepositoryImpl.kt 파일의 updateExperimentPostStatus 메서드에 대한 로직 수정을 포함합니다. 실험 게시물의 모집 상태(recruitStatus)를 업데이트하는 메커니즘이 변경되었으며, 현재 날짜를 기준으로 게시물의 활성/비활성 상태를 전환하는 로직이 반대로 조정되었습니다.

변경 사항

파일 변경 요약
src/main/kotlin/.../ExperimentPostCustomRepositoryImpl.kt updateExperimentPostStatus 메서드의 모집 상태 로직 반전

관련 가능성 있는 PR

제안된 레이블

✅ TEST, ✨ FEATURE

제안된 리뷰어

  • chock-cho

토끼의 시

🐰 모집 상태의 춤,
참과 거짓 사이를 넘나들며
코드는 흐르고
변화는 춤을 추네!
🌈 실험의 물결 속에서 🌊


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1610779 and 49c154a.

📒 Files selected for processing (1)
  • src/main/kotlin/com/dobby/backend/infrastructure/database/repository/ExperimentPostCustomRepositoryImpl.kt (1 hunks)
🧰 Additional context used
📓 Learnings (1)
src/main/kotlin/com/dobby/backend/infrastructure/database/repository/ExperimentPostCustomRepositoryImpl.kt (1)
Learnt from: chock-cho
PR: YAPP-Github/25th-Web-Team-2-BE#51
File: src/main/kotlin/com/dobby/backend/infrastructure/database/repository/ExperimentPostCustomRepositoryImpl.kt:138-182
Timestamp: 2025-01-23T08:12:48.950Z
Learning: In the experiment post system, optimistic locking is unnecessary as posts can only be modified by their original authors, making concurrent modification impossible. Over-engineering should be avoided when existing access controls provide sufficient data integrity.
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (1)
src/main/kotlin/com/dobby/backend/infrastructure/database/repository/ExperimentPostCustomRepositoryImpl.kt (1)

121-124: 모집 상태 변경 로직이 올바르게 수정되었습니다.

스케줄러의 모집 상태 변경 로직이 PR 목적에 맞게 잘 수정되었습니다. 현재 날짜가 종료일보다 큰 경우, 활성 상태(true)인 게시물을 비활성(false)으로 변경하는 것이 확인됩니다.

스케줄러가 새로운 로직으로 정상 동작하는지 확인이 필요합니다. 다음 스크립트로 검증해보시기 바랍니다:

✅ Verification successful

스케줄러 검증이 완료되었습니다.

스케줄러 구현과 테스트 코드를 검토한 결과, 다음 사항들이 확인되었습니다:

  • UseCase에서 Gateway를 통해 Repository까지 올바르게 연결되어 있습니다
  • 테스트 코드가 모집 상태 변경 시나리오를 적절히 검증하고 있습니다
  • 실제 운영 환경에서도 안전하게 동작할 것으로 예상됩니다
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 스케줄러 관련 코드 검색
rg -l "updateExperimentPostStatus" --type kotlin

Length of output: 643


Script:

#!/bin/bash
# Check scheduler implementation and test
echo "=== Scheduler Implementation ==="
rg -A 10 "class UpdateExpiredExperimentPostUseCase" --type kotlin

echo -e "\n=== Test Implementation ==="
rg -A 10 "class UpdateExperimentPostUseCaseTest" --type kotlin

Length of output: 3400


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot changed the title fix: recuritStatus 컬럼명 변경에 따른 스케줄러의 모집 상태 변경 로직을 true->false로 수정 [YS-198] fix: recuritStatus 컬럼명 변경에 따른 스케줄러의 모집 상태 변경 로직을 true->false로 수정 Jan 23, 2025
@Ji-soo708 Ji-soo708 changed the title [YS-198] fix: recuritStatus 컬럼명 변경에 따른 스케줄러의 모집 상태 변경 로직을 true->false로 수정 [YS-198] fix: recruitStatus 컬럼명 변경에 따른 스케줄러의 모집 상태 변경 로직을 true->false로 수정 Jan 23, 2025
Copy link
Member

@chock-cho chock-cho left a comment

Choose a reason for hiding this comment

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

기존에 recruitDone 이었던 칼럼이 recruitStatus로 네이밍이 바뀌며 의미가 달라지면서, recruitDone = true로 바뀌어야 하는 게 recruitStatus = false로 바뀌어야 해서 해당 작업을 수행하신 거군요! 🤔🤔

제가 구현한 부분이라 더블체크했었어야 했는데, 예상되는 버그를 잡아주셔서 감사합니다!

@Ji-soo708 Ji-soo708 merged commit 6a6fb1f into dev Jan 23, 2025
3 checks passed
@Ji-soo708 Ji-soo708 deleted the fix/YS-198 branch January 23, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 BUG 버그
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants