-
Notifications
You must be signed in to change notification settings - Fork 301
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
: Fix team students eager loading for several occasions
#7993
Conversation
…gfix/fix-team-lazy-loading
I am not sure if the PR follows the right approach. It seems we load team and students way too often now. I guess it would be better to only load the team with students, when we actually have a team exercise |
I made sure that the hot fix in the release branch |
@krusche Or did I misinterpret your intention here? |
76a56ed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on ts5 and works as expected 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapprove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re approve
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
After issues with #7829 and some hot fixes, I went through the whole code base to find any occurrence where loading team students might be necessary. It took some time, but I was able to go through most branches. There were a few that I had to skip because they were just too complex, but I added an initialisation on these instances, thus they are still covered.
Description
Eagerly loaded team students wherever they are called. In some areas I maintained the relations after saving by overriding them afterwards. Some queries I had to extract as
participation.team.students
won't work on the entity graph because team is on the student participation, not the abstract one. In some sections I load the students if not initialised. Usually because it would be too much effort to go through all call branches and make sure that every one of them loads the students for team exercises. Finally I also modified some sections to reduce database calls and improved some queries.Steps for Testing
Prerequisites:
Exam Mode Testing
Not required, exams don't support team exercises.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
No functional changes really affecting the coverage. If you really need the coverage, let me know and I'll add it.
Summary by CodeRabbit