Skip to content

Conversation

tobias-lippert
Copy link
Contributor

@tobias-lippert tobias-lippert commented Oct 5, 2025

Only deploy to TS1

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Motivation and Context

We have some database calls that are extremely slow because six tables need to be joined

Description

We resolve this by denormalizing the schema and adding the exercise id to the result table.

  • Added the liquibase changelog including backfill
  • Adapted the code such that the exercise id is set when a new result is created
  • Added the exercise id column to the result table
  • Adapted test setup where necessary

Steps for Testing

Prerequisites:

  • 1 Course with exercises with asssessments and (processed) complaints
  • 1 assessed exam with processed complaints
  1. Make sure the prerequisites are fulfilled, data can be created on any branch
  2. Deploy develop or any other branch that doesn't affect assessment stats to TS4
  3. Go to your desired course in course management
  4. On the overview page, note down all the values written in the doughnut charts
  5. Then go to assessment and note down all the values of assessments/complaints in the assessment dashboard
  6. Then go to the exam assessment dashboard and note down the same as in 5.
  7. Deploy this branch
  8. Repeat steps 4-6 but this time check that the values match with those you've written down

Exam Mode Testing

Covered with the steps above

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Performance Tests

  • Test 1

Test Coverage

unchanged

Summary by CodeRabbit

  • Bug Fixes

    • Complaint/more-feedback counts and assessment counts on dashboards and leaderboards are now accurate by consistently linking results to their exercises.
  • New Features

    • Bulk/counting APIs now support computing complaint and response statistics across sets of exercises.
  • Refactor

    • Aggregations and queries standardized to use explicit exercise identifiers for consistency.
  • Tests

    • Test fixtures and utilities updated to associate results with exercises and adjust timestamps for reliable stats.

krusche and others added 21 commits August 10, 2025 20:50
reduce number of involve data in db queries
statistics-lifetime-overview and management-detail are still rather slow
# Conflicts:
#	src/main/java/de/tum/cit/aet/artemis/assessment/repository/ComplaintRepository.java
#	src/main/java/de/tum/cit/aet/artemis/assessment/repository/ResultRepository.java
#	src/main/java/de/tum/cit/aet/artemis/assessment/service/TutorLeaderboardService.java
#	src/main/java/de/tum/cit/aet/artemis/core/repository/StatisticsRepository.java
#	src/main/java/de/tum/cit/aet/artemis/core/service/StatisticsService.java
#	src/main/java/de/tum/cit/aet/artemis/core/service/course/CourseStatsService.java
#	src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseService.java
#	src/main/webapp/app/core/course/manage/detail/course-detail-line-chart.component.ts
#	src/test/java/de/tum/cit/aet/artemis/core/StatisticsRepositoryTest.java
#	src/test/java/de/tum/cit/aet/artemis/core/util/CourseTestService.java
@tobias-lippert tobias-lippert requested review from a team and krusche as code owners October 5, 2025 16:05
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Oct 5, 2025
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Oct 5, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 10, 2025
Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

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

Code

ahmetsenturk
ahmetsenturk previously approved these changes Oct 10, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 852ms
TestResultTime ⏱
No test annotations available

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 654ms
TestResultTime ⏱
No test annotations available

@krusche krusche modified the milestones: 8.4.2, 8.5.0 Oct 13, 2025
bensofficial
bensofficial previously approved these changes Oct 14, 2025
Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

DB migration

Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

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

Re-approve code

Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

Reapprove DB migration

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 721ms
TestResultTime ⏱
No test annotations available

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran199 passed3 skipped3 failed1h 15m 36s 471ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 4s 892ms
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure4m 38s 563ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 41s 444ms

Copy link
Contributor

@MoritzSpengler MoritzSpengler left a comment

Choose a reason for hiding this comment

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

Tested on TS1. First deployed develop and took screenshots of the values. Then deployed the branch and compared the values, which are correct. For future devs here are the screenshots from develop for my course (Moritz Spengler).
donutcharts
examerweitert
exercise1
exercise2

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 15m 49s 305ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 41s 145ms

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

Labels

assessment Pull requests that affect the corresponding module athena Pull requests that affect the corresponding module atlas Pull requests that affect the corresponding module core Pull requests that affect the corresponding module database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module fileupload Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module modeling Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tests text Pull requests that affect the corresponding module

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

7 participants