-
Notifications
You must be signed in to change notification settings - Fork 297
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
Development
: Remove unused reference in posting models
#10075
base: develop
Are you sure you want to change the base?
Development
: Remove unused reference in posting models
#10075
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 pmd (7.8.0)src/main/java/de/tum/cit/aet/artemis/communication/repository/SavedPostRepository.javaThe following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration. src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.javaThe following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration. src/main/java/de/tum/cit/aet/artemis/communication/service/ConversationMessagingService.javaThe following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.
WalkthroughThis pull request introduces changes to several Java classes in the Artemis communication domain, primarily focusing on the handling of saved posts. The modifications include removing Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (7)
💤 Files with no reviewable changes (3)
🧰 Additional context used📓 Path-based instructions (4)src/main/java/de/tum/cit/aet/artemis/communication/repository/SavedPostRepository.java (1)Pattern src/main/java/de/tum/cit/aet/artemis/communication/service/ConversationMessagingService.java (1)Pattern src/main/java/de/tum/cit/aet/artemis/communication/service/SavedPostScheduleService.java (1)Pattern src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (1)Pattern 🔇 Additional comments (6)src/main/java/de/tum/cit/aet/artemis/communication/service/SavedPostScheduleService.java (1)
src/main/java/de/tum/cit/aet/artemis/communication/repository/SavedPostRepository.java (1)
✅ Verification successfulLet me gather information about the database schema and any existing indexes by searching through the codebase. Let me search for any existing index definitions in the database migration files. Index already exists for the queried columns. 🏁 Scripts executedThe following scripts were executed for the analysis: Error: No shell scripts found Script: #!/bin/bash
# Search for schema definitions or migration files related to SavedPost
fd -e sql -e java saved.*post -i
# Look for SavedPost entity definition to check existing indexes
rg -i "class SavedPost" -A 10
Length of output: 11874 Script: #!/bin/bash
# Search for database migration files that might contain index definitions for SavedPost
fd -e sql changelog
rg -i "saved_post" -A 5 -B 5 $(fd -e sql changelog)
Length of output: 17132 src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (2)
src/main/java/de/tum/cit/aet/artemis/communication/service/ConversationMessagingService.java (2)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
Checklist
General
Server
Motivation and Context
Currently there is a unused relation to SavedPosts declared in the Post and AnswerPost models. This reference also causes multiple warnings when starting the server:
Description
I removed the unused relation in the models. Since the relation was tagged with a cascade, i added some deletion logic to the corresponding services when deleting posts/answer posts. Additionally, I slightly offset the cronjob that deletes orphaned SavedPosts to the one that deletes old completed/archived SavedPosts.
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Test Coverage
Summary by CodeRabbit
New Features
Bug Fixes
Chores