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

Programming exercises: Add endpoint to fetch ProgrammingExerciseStudentParticipation by repo #9406

Closed
wants to merge 103 commits into from

Conversation

janthoXO
Copy link
Contributor

@janthoXO janthoXO commented Oct 1, 2024

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 added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).
  • I tested all changes and their related features with all corresponding user types on a test server configured with Gitlab and Jenkins.

Motivation

The VSCode extension should be able to display the problem statement corresponding to an open repository by the user. Therefore it should be able to fetch all the information needed for that by the repository url.

Description

Adds an endpoint to fetch a student programming participation by the repo identifier (<vc.url>/git/<project_key>/<repo_identifier>.git) with the exercise, course, latest submission, last result with feedbacks. If the participation has at least a submission, the all testcases of the exercise are appended to the exercise.
This endpoint will be used to automatically detect an participation from a repository url and display the problem statement to it (therefore course, exercise, testcases, submission, result and feedback are needed).
We could also use multiple endpoints to query each data individually but this would lead to more traffic.

Steps for Testing

Postman testing or code review:

Postman Testing with a student account:

  1. Send a request to POST {{base_url}}/api/public/authenticate?tool=SCORPIO to login
  2. Retrieve a repoUrl of any exercise you have access to and at best also a submission (you can get one from GET {{base_url}}/api/courses/{courseId}/for-dashboard). The repo url should look like <vc.url>/git/<project_key>/<repo_identifier>.git
  3. Take the repo_identifier from that url
  4. Send a request to GET {{base_url}}/api/programming-exercise-participations/repo-identifier/{repo_identifier}
  5. verify that this participation was returned with your latest submissions, results, feedbacks and exercise with test cases and course

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

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
Feedback.getTestCaseId() 100%
ProgrammingExerciseParticipationResource 88%
RepoUrlProgrammingStudentParticipationDTO.RepoUrlProgrammingExerciseDTO 100%

Summary by CodeRabbit

  • New Features
    • Enhanced participation details now include comprehensive data on submissions, results, and feedback.
    • Students can retrieve updated programming exercise participation information using their repository name.
    • Improved repository URL generation and error handling for invalid repository inputs.
  • Tests
    • Expanded integration tests ensure accurate participation retrieval, proper error responses, and robust access control.

@coderabbitai pause

@janthoXO janthoXO self-assigned this Oct 1, 2024
@janthoXO janthoXO requested a review from a team October 1, 2024 19:57
Copy link
Contributor

coderabbitai bot commented Oct 1, 2024

Walkthrough

This pull request implements multiple modifications across the application’s programming exercise functionality. It adds a new field and getter to the Feedback domain class to store test case IDs more efficiently. A comprehensive DTO record for student participation, along with several nested DTOs for submissions, results, feedback, exercise details, course, and test case, is introduced. Furthermore, a new REST endpoint is added to fetch participation details by repository name with associated submissions, results, and feedbacks, along with corresponding integration tests. Additionally, a new constructor for building repository URIs and an extended repository query method for fetching the latest submission are incorporated.

Changes

File(s) Change Summary
src/.../assessment/domain/Feedback.java Added new field testCaseId (with @Column annotation) and its getter to store associated test case IDs.
src/.../programming/dto/RepoUrlProgrammingStudentParticipationDTO.java Introduced a new DTO record for student participation including nested records: RepoUrlSubmissionDTO, RepoUrlResultDTO, RepoUrlFeedbackDTO, RepoUrlProgrammingExerciseDTO, RepoUrlCourseDTO, and RepoUrlTestCaseDTO with static of methods for conversion.
src/.../programming/web/ProgrammingExerciseParticipationResource.java Added a new API method to retrieve student participation by repository name, introduced a new field vcUrl, and updated the constructor with additional dependencies (ProgrammingSubmissionRepository and ProgrammingExerciseTestCaseRepository).
src/.../programming/ProgrammingExerciseParticipationIntegrationTest.java Added several integration test methods covering successful retrieval, submission/result inclusion, not-found, forbidden access, exam context scenarios, and a utility method extractRepoName for repository name extraction.
src/.../programming/domain/VcsRepositoryUri.java Added a new two-parameter constructor to generate a URI from a base URL and repository name (extracting the project key).
src/.../programming/repository/ProgrammingSubmissionRepository.java Added a new repository method to retrieve the latest submission along with its latest result and feedback using a JPQL query.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant ParticipationResource
    participant SubmissionRepository
    participant DTOConverter
    Client->>ParticipationResource: Request participation by repo name
    ParticipationResource->>SubmissionRepository: findLatestWithLatestResultAndFeedbacksByParticipationId(id)
    SubmissionRepository-->>ParticipationResource: Latest submission with result and feedbacks
    ParticipationResource->>DTOConverter: Convert domain objects to DTO
    DTOConverter-->>ParticipationResource: Participation DTO
    ParticipationResource-->>Client: 200 OK with Participation DTO
Loading

Suggested labels

client, ready to merge

Suggested reviewers

  • az108
  • EneaGore
  • krusche
  • BBesrour
  • SimonEntholzer
  • coolchock

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/programming/repository/ProgrammingSubmissionRepository.java

[ERROR] Error at ruleset.xml:58:5
56|
57|
58|
^^^^^ Unable to find referenced rule BooleanInstantiation; perhaps the rule name is misspelled?

59|
60|
[WARN] Warning at ruleset.xml:66:5
64|
65|
66|
^^^^^ Use Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitch instead of the deprecated Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt. PMD 8.0.0 will remove support for this deprecated Rule name usage.

67|
68|
[ERROR] Error at ruleset.xml:71:5
69|
70|
71|
^^^^^ Unable to find referenced rule DontImportJavaLang; perhaps the rule name is misspelled?

72|
73|
[ERROR] Error at ruleset.xml:75:5
73|
74|
75|
^^^^^ Unable to find referenced rule DuplicateImports; perhaps the rule name is misspelled?

76|
77|
[ERROR] Error at ruleset.xml:78:5
76|
77|
78|
^^^^^ Unable to find referenced rule EmptyFinallyBlock; perhaps the rule name is misspelled?

79|
80|
[ERROR] Error at ruleset.xml:79:5
77|
78|
79|
^^^^^ Unable to find referenced rule EmptyIfStmt; perhaps the rule name is misspelled?

80|
81|
[ERROR] Error at ruleset.xml:81:5
79|
80|
81|
^^^^^ Unable to find referenced rule EmptyInitializer; perhaps the rule name is misspelled?

82|
83|
[ERROR] Error at ruleset.xml:82:5
80|
81|
82|
^^^^^ Unable to find referenced rule EmptyStatementBlock; perhaps the rule name is misspelled?

83|
84|
[ERROR] Error at ruleset.xml:83:5
81|
82|
83|
^^^^^ Unable to find referenced rule EmptyStatementNotInLoop; perhaps the rule name is misspelled?

84|
85|
[ERROR] Error at ruleset.xml:84:5
82|
83|
84|
^^^^^ Unable to find referenced rule EmptySwitchStatements; perhaps the rule name is misspelled?

85|
86|
[ERROR] Error at ruleset.xml:85:5
83|
84|
85|
^^^^^ Unable to find referenced rule EmptySynchronizedBlock; perhaps the rule name is misspelled?

86|
87|
[ERROR] Error at ruleset.xml:86:5
84|
85|
86|
^^^^^ Unable to find referenced rule EmptyTryBlock; perhaps the rule name is misspelled?

87|
88|
[ERROR] Error at ruleset.xml:87:5
85|
86|
87|
^^^^^ Unable to find referenced rule EmptyWhileStmt; perhaps the rule name is misspelled?

88|
89|
[ERROR] Error at ruleset.xml:90:5
88|
89|
90|
^^^^^ Unable to find referenced rule ExcessiveClassLength; perhaps the rule name is misspelled?

91|
92|
[ERROR] Error at ruleset.xml:91:5
89|
90|
91|
^^^^^ Unable to find referenced rule ExcessiveMethodLength; perhaps the rule name is misspelled?

92|
93|
[ERROR] Error at ruleset.xml:106:5
104|
105|
106|
^^^^^ Unable to find referenced rule ImportFromSamePackage; perhaps the rule name is misspelled?

107|
108|
[ERROR] Error at ruleset.xml:119:5
117|
118|
119|
^^^^^ Unable to find referenced rule MissingBreakInSwitch; perhaps the rule name is misspelled?

120|
121|
[WARN] Warning at ruleset.xml:124:5
122|
123|
124|
^^^^^ Use Rule name category/java/errorprone.xml/NonCaseLabelInSwitch instead of the deprecated Rule name category/java/errorprone.xml/NonCaseLabelInSwitchStatement. PMD 8.0.0 will remove support for this deprecated Rule name usage.

125|
126|
[ERROR] Error at ruleset.xml:134:9
132|
133| // It's okay to use short variable names in DTOs, e.g. "id" or "name"
134| ./de/tum/in/www1/artemis/web/rest/dto/.
^^^^^^^^^^^^^^^^ Unexpected element 'exclude-pattern' in rule ShortVariable

135|
136|
[ERROR] Error at ruleset.xml:137:5
135|
136|
137|
^^^^^ Unable to find referenced rule SimplifyBooleanAssertion; perhaps the rule name is misspelled?

138|
139|
[WARN] Warning at ruleset.xml:184:5
182|
183|
184|
^^^^^ Use Rule name category/ecmascript/errorprone.xml/InaccurateNumericLiteral instead of the deprecated Rule name category/ecmascript/errorprone.xml/InnaccurateNumericLiteral. PMD 8.0.0 will remove support for this deprecated Rule name usage.

185|
186|
[ERROR] Cannot load ruleset category/vm/bestpractices.xml: Cannot resolve rule/ruleset reference 'category/vm/bestpractices.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath.
[WARN] Progressbar rendering conflicts with reporting to STDOUT. No progressbar will be shown. Try running with argument -r to output the report to a file instead.

src/main/java/de/tum/cit/aet/artemis/programming/domain/VcsRepositoryUri.java

[ERROR] Error at ruleset.xml:58:5
56|
57|
58|
^^^^^ Unable to find referenced rule BooleanInstantiation; perhaps the rule name is misspelled?

59|
60|
[WARN] Warning at ruleset.xml:66:5
64|
65|
66|
^^^^^ Use Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitch instead of the deprecated Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt. PMD 8.0.0 will remove support for this deprecated Rule name usage.

67|
68|
[ERROR] Error at ruleset.xml:71:5
69|
70|
71|
^^^^^ Unable to find referenced rule DontImportJavaLang; perhaps the rule name is misspelled?

72|
73|
[ERROR] Error at ruleset.xml:75:5
73|
74|
75|
^^^^^ Unable to find referenced rule DuplicateImports; perhaps the rule name is misspelled?

76|
77|
[ERROR] Error at ruleset.xml:78:5
76|
77|
78|
^^^^^ Unable to find referenced rule EmptyFinallyBlock; perhaps the rule name is misspelled?

79|
80|
[ERROR] Error at ruleset.xml:79:5
77|
78|
79|
^^^^^ Unable to find referenced rule EmptyIfStmt; perhaps the rule name is misspelled?

80|
81|
[ERROR] Error at ruleset.xml:81:5
79|
80|
81|
^^^^^ Unable to find referenced rule EmptyInitializer; perhaps the rule name is misspelled?

82|
83|
[ERROR] Error at ruleset.xml:82:5
80|
81|
82|
^^^^^ Unable to find referenced rule EmptyStatementBlock; perhaps the rule name is misspelled?

83|
84|
[ERROR] Error at ruleset.xml:83:5
81|
82|
83|
^^^^^ Unable to find referenced rule EmptyStatementNotInLoop; perhaps the rule name is misspelled?

84|
85|
[ERROR] Error at ruleset.xml:84:5
82|
83|
84|
^^^^^ Unable to find referenced rule EmptySwitchStatements; perhaps the rule name is misspelled?

85|
86|
[ERROR] Error at ruleset.xml:85:5
83|
84|
85|
^^^^^ Unable to find referenced rule EmptySynchronizedBlock; perhaps the rule name is misspelled?

86|
87|
[ERROR] Error at ruleset.xml:86:5
84|
85|
86|
^^^^^ Unable to find referenced rule EmptyTryBlock; perhaps the rule name is misspelled?

87|
88|
[ERROR] Error at ruleset.xml:87:5
85|
86|
87|
^^^^^ Unable to find referenced rule EmptyWhileStmt; perhaps the rule name is misspelled?

88|
89|
[ERROR] Error at ruleset.xml:90:5
88|
89|
90|
^^^^^ Unable to find referenced rule ExcessiveClassLength; perhaps the rule name is misspelled?

91|
92|
[ERROR] Error at ruleset.xml:91:5
89|
90|
91|
^^^^^ Unable to find referenced rule ExcessiveMethodLength; perhaps the rule name is misspelled?

92|
93|
[ERROR] Error at ruleset.xml:106:5
104|
105|
106|
^^^^^ Unable to find referenced rule ImportFromSamePackage; perhaps the rule name is misspelled?

107|
108|
[ERROR] Error at ruleset.xml:119:5
117|
118|
119|
^^^^^ Unable to find referenced rule MissingBreakInSwitch; perhaps the rule name is misspelled?

120|
121|
[WARN] Warning at ruleset.xml:124:5
122|
123|
124|
^^^^^ Use Rule name category/java/errorprone.xml/NonCaseLabelInSwitch instead of the deprecated Rule name category/java/errorprone.xml/NonCaseLabelInSwitchStatement. PMD 8.0.0 will remove support for this deprecated Rule name usage.

125|
126|
[ERROR] Error at ruleset.xml:134:9
132|
133| // It's okay to use short variable names in DTOs, e.g. "id" or "name"
134| ./de/tum/in/www1/artemis/web/rest/dto/.
^^^^^^^^^^^^^^^^ Unexpected element 'exclude-pattern' in rule ShortVariable

135|
136|
[ERROR] Error at ruleset.xml:137:5
135|
136|
137|
^^^^^ Unable to find referenced rule SimplifyBooleanAssertion; perhaps the rule name is misspelled?

138|
139|
[WARN] Warning at ruleset.xml:184:5
182|
183|
184|
^^^^^ Use Rule name category/ecmascript/errorprone.xml/InaccurateNumericLiteral instead of the deprecated Rule name category/ecmascript/errorprone.xml/InnaccurateNumericLiteral. PMD 8.0.0 will remove support for this deprecated Rule name usage.

185|
186|
[ERROR] Cannot load ruleset category/vm/bestpractices.xml: Cannot resolve rule/ruleset reference 'category/vm/bestpractices.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath.
[WARN] Progressbar rendering conflicts with reporting to STDOUT. No progressbar will be shown. Try running with argument -r to output the report to a file instead.

src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java

[ERROR] Error at ruleset.xml:58:5
56|
57|
58|
^^^^^ Unable to find referenced rule BooleanInstantiation; perhaps the rule name is misspelled?

59|
60|
[WARN] Warning at ruleset.xml:66:5
64|
65|
66|
^^^^^ Use Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitch instead of the deprecated Rule name category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt. PMD 8.0.0 will remove support for this deprecated Rule name usage.

67|
68|
[ERROR] Error at ruleset.xml:71:5
69|
70|
71|
^^^^^ Unable to find referenced rule DontImportJavaLang; perhaps the rule name is misspelled?

72|
73|
[ERROR] Error at ruleset.xml:75:5
73|
74|
75|
^^^^^ Unable to find referenced rule DuplicateImports; perhaps the rule name is misspelled?

76|
77|
[ERROR] Error at ruleset.xml:78:5
76|
77|
78|
^^^^^ Unable to find referenced rule EmptyFinallyBlock; perhaps the rule name is misspelled?

79|
80|
[ERROR] Error at ruleset.xml:79:5
77|
78|
79|
^^^^^ Unable to find referenced rule EmptyIfStmt; perhaps the rule name is misspelled?

80|
81|
[ERROR] Error at ruleset.xml:81:5
79|
80|
81|
^^^^^ Unable to find referenced rule EmptyInitializer; perhaps the rule name is misspelled?

82|
83|
[ERROR] Error at ruleset.xml:82:5
80|
81|
82|
^^^^^ Unable to find referenced rule EmptyStatementBlock; perhaps the rule name is misspelled?

83|
84|
[ERROR] Error at ruleset.xml:83:5
81|
82|
83|
^^^^^ Unable to find referenced rule EmptyStatementNotInLoop; perhaps the rule name is misspelled?

84|
85|
[ERROR] Error at ruleset.xml:84:5
82|
83|
84|
^^^^^ Unable to find referenced rule EmptySwitchStatements; perhaps the rule name is misspelled?

85|
86|
[ERROR] Error at ruleset.xml:85:5
83|
84|
85|
^^^^^ Unable to find referenced rule EmptySynchronizedBlock; perhaps the rule name is misspelled?

86|
87|
[ERROR] Error at ruleset.xml:86:5
84|
85|
86|
^^^^^ Unable to find referenced rule EmptyTryBlock; perhaps the rule name is misspelled?

87|
88|
[ERROR] Error at ruleset.xml:87:5
85|
86|
87|
^^^^^ Unable to find referenced rule EmptyWhileStmt; perhaps the rule name is misspelled?

88|
89|
[ERROR] Error at ruleset.xml:90:5
88|
89|
90|
^^^^^ Unable to find referenced rule ExcessiveClassLength; perhaps the rule name is misspelled?

91|
92|
[ERROR] Error at ruleset.xml:91:5
89|
90|
91|
^^^^^ Unable to find referenced rule ExcessiveMethodLength; perhaps the rule name is misspelled?

92|
93|
[ERROR] Error at ruleset.xml:106:5
104|
105|
106|
^^^^^ Unable to find referenced rule ImportFromSamePackage; perhaps the rule name is misspelled?

107|
108|
[ERROR] Error at ruleset.xml:119:5
117|
118|
119|
^^^^^ Unable to find referenced rule MissingBreakInSwitch; perhaps the rule name is misspelled?

120|
121|
[WARN] Warning at ruleset.xml:124:5
122|
123|
124|
^^^^^ Use Rule name category/java/errorprone.xml/NonCaseLabelInSwitch instead of the deprecated Rule name category/java/errorprone.xml/NonCaseLabelInSwitchStatement. PMD 8.0.0 will remove support for this deprecated Rule name usage.

125|
126|
[ERROR] Error at ruleset.xml:134:9
132|
133| // It's okay to use short variable names in DTOs, e.g. "id" or "name"
134| ./de/tum/in/www1/artemis/web/rest/dto/.
^^^^^^^^^^^^^^^^ Unexpected element 'exclude-pattern' in rule ShortVariable

135|
136|
[ERROR] Error at ruleset.xml:137:5
135|
136|
137|
^^^^^ Unable to find referenced rule SimplifyBooleanAssertion; perhaps the rule name is misspelled?

138|
139|
[WARN] Warning at ruleset.xml:184:5
182|
183|
184|
^^^^^ Use Rule name category/ecmascript/errorprone.xml/InaccurateNumericLiteral instead of the deprecated Rule name category/ecmascript/errorprone.xml/InnaccurateNumericLiteral. PMD 8.0.0 will remove support for this deprecated Rule name usage.

185|
186|
[ERROR] Cannot load ruleset category/vm/bestpractices.xml: Cannot resolve rule/ruleset reference 'category/vm/bestpractices.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath.
[WARN] Progressbar rendering conflicts with reporting to STDOUT. No progressbar will be shown. Try running with argument -r to output the report to a file instead.

  • 2 others
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

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 added server Pull requests that update Java code. (Added Automatically!) programming Pull requests that affect the corresponding module labels Oct 1, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between b7a816e and fc69fca.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1)

Pattern src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

@janthoXO
Copy link
Contributor Author

janthoXO commented Oct 1, 2024

@EnforceAtLeastStudent

should be replaced by AtLeastStudentInExercise but this has to be implemented without the macro, because no exerciseID is passed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between fc69fca and 83ef1a5.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseResource.java (1)

Pattern src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

@janthoXO janthoXO changed the title Add ProgrammingExercise by ProjectKey endpoint ProgrammingExercise: Add ProgrammingExercise by ProjectKey endpoint Oct 2, 2024
@janthoXO janthoXO changed the title ProgrammingExercise: Add ProgrammingExercise by ProjectKey endpoint Programming Exercise: Add ProgrammingExercise by ProjectKey endpoint Oct 2, 2024
@janthoXO janthoXO changed the title Programming Exercise: Add ProgrammingExercise by ProjectKey endpoint Programming exercises: Add ProgrammingExercise by ProjectKey endpoint Oct 2, 2024
Copy link
Contributor

@Strohgelaender Strohgelaender left a comment

Choose a reason for hiding this comment

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

Looks good, but you also should add some simple server tests.

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 3, 2024
@janthoXO
Copy link
Contributor Author

janthoXO commented Oct 3, 2024

Looks good, but you also should add some simple server tests.

good point thanks

Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 11, 2024
@janthoXO janthoXO removed the stale label Oct 16, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 10, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java (3)

30-49: Add field-level documentation.

While the of method is well-documented, consider adding field-level documentation to describe the purpose of each field in the record, especially for fields like buildPlanId and branch whose meanings might not be immediately clear.

Add Javadoc for fields:

 @JsonInclude(JsonInclude.Include.NON_EMPTY)
+/**
+ * DTO for programming exercise student participation accessed via repository URL.
+ *
+ * @param id The unique identifier of the participation
+ * @param individualDueDate Individual due date for this participation
+ * @param submissions Set of submissions for this participation
+ * @param participantName Name of the participant
+ * @param participantIdentifier Unique identifier of the participant
+ * @param repositoryUri URI of the student's repository
+ * @param buildPlanId Identifier for the CI/CD build plan
+ * @param branch The Git branch name for this participation
+ * @param exercise Associated programming exercise details
+ */
 public record RepoUrlProgrammingStudentParticipationDTO(

51-70: Maintain consistency in boolean field types.

The record uses a mix of primitive boolean and wrapper Boolean types. Consider using wrapper types consistently for all boolean fields to maintain uniformity in null handling.

Apply this diff:

 public record RepoUrlSubmissionDTO(long id, Boolean submitted, ZonedDateTime submissionDate,
     SubmissionType type, Boolean exampleSubmission, Long durationInMinutes,
-    List<RepoUrlResultDTO> results, String commitHash, boolean buildFailed) {
+    List<RepoUrlResultDTO> results, String commitHash, Boolean buildFailed) {

150-165: Maintain consistency in numeric field types.

The record uses a mix of primitive double and wrapper Double types. Consider using wrapper types consistently for all numeric fields to maintain uniformity in null handling.

Apply this diff:

 public record RepoUrlTestCaseDTO(long id, String testName, Double weight,
-    double bonusMultiplier, double bonusPoints, Boolean active,
+    Double bonusMultiplier, Double bonusPoints, Boolean active,
     Visibility visibility, ProgrammingExerciseTestCaseType type) {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37b4bfb and 249414f.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/java/**/*.java`: naming:CamelCase; principles:{sin...

src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

  • src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: server-tests
  • GitHub Check: client-tests
  • GitHub Check: server-style
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: Analyse
🔇 Additional comments (1)
src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java (1)

1-29: LGTM! Clean imports organization.

The imports are well-organized and specific, avoiding wildcard imports as per coding guidelines.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 10, 2025
Copy link
Member

@Hialus Hialus left a comment

Choose a reason for hiding this comment

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

General feedback:

  • Please re-add the motivation part in your PR description to explain the motivation behind this PR (e.g. why it is needed)
  • Your test case table has 2 test cases outside of it. Maybe a formatting issue?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (2)

195-198: 🛠️ Refactor suggestion

Add @transactional annotation for database operations.

The method performs multiple database operations but lacks transaction management.

Add the @transactional annotation:

    @GetMapping("programming-exercise-participations/repo-identifier/{repoIdentifier}")
    @EnforceAtLeastStudent
    @AllowedTools(ToolTokenType.SCORPIO)
+   @Transactional(readOnly = true)
    public ResponseEntity<RepoUrlProgrammingStudentParticipationDTO> getStudentParticipationWithLatestSubmissionLatestResultFeedbacksByRepoIdentifier(

202-203: ⚠️ Potential issue

Improve input validation and error handling for repository identifier.

The current implementation has potential issues:

  1. No validation of repoIdentifier format
  2. Potential NPE when splitting project key
  3. No error handling for malformed URLs

Apply this diff to add proper validation and error handling:

-        var projectKey = repoIdentifier.split("-")[0];
-        String repoUrl = vcUrl + "/git/" + projectKey.toUpperCase() + "/" + repoIdentifier + ".git";
+        if (repoIdentifier == null || repoIdentifier.isBlank()) {
+            throw new BadRequestAlertException("Repository identifier cannot be empty", ENTITY_NAME, "emptyIdentifier");
+        }
+        
+        String[] parts = repoIdentifier.split("-");
+        if (parts.length < 2) {
+            throw new BadRequestAlertException("Invalid repository identifier format. Expected format: projectKey-identifier", ENTITY_NAME, "invalidFormat");
+        }
+        
+        var projectKey = parts[0].toUpperCase();
+        try {
+            String repoUrl = vcUrl + "/git/" + projectKey + "/" + repoIdentifier + ".git";
+            new URI(repoUrl); // Validate URL format
+            return repoUrl;
+        } catch (URISyntaxException e) {
+            throw new BadRequestAlertException("Invalid repository URL format: " + e.getMessage(), ENTITY_NAME, "invalidUrl");
+        }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 249414f and 67f6b22.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (8 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/java/**/*.java`: naming:CamelCase; principles:{sin...

src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java
🧠 Learnings (1)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (2)
Learnt from: julian-christl
PR: ls1intum/Artemis#9322
File: src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseStudentParticipationRepository.java:0-0
Timestamp: 2024-11-12T12:51:51.201Z
Learning: In Artemis, an `ExerciseGroup` always has an associated `Exam`, so `exerciseGroup.exam` is never null.
Learnt from: julian-christl
PR: ls1intum/Artemis#9322
File: src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseStudentParticipationRepository.java:170-172
Timestamp: 2024-11-12T12:51:46.554Z
Learning: In Artemis, `exercise.exerciseGroup` may be null, as not all exercises belong to an `ExerciseGroup`.
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: client-tests
  • GitHub Check: client-style
  • GitHub Check: server-tests
  • GitHub Check: server-style
  • GitHub Check: Analyse
🔇 Additional comments (1)
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (1)

9-9: LGTM! Constructor injection and field declarations follow best practices.

The changes adhere to the coding guidelines:

  • Constructor injection is used for dependencies
  • Fields have appropriate access levels
  • Imports follow Java conventions

Also applies to: 35-36, 79-82, 112-112, 119-120, 135-136

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 11, 2025
Copy link
Contributor

@ole-ve ole-ve left a comment

Choose a reason for hiding this comment

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

reviewed the code, see my inline comments.

I am somewhat concerned with the addition of a new column from Feedback->TestCase:

  • coupling on DB-entities between assessment to programming => are there alternatives?
  • how do we handle exercise that already exist in our (PROD-)DB? seems uncritical with insertable/updatable = false but would still need to be tested.
  • Nevertheless, I could not find a migration adding the column.

If you have questions regarding my feedback, feel free to reach out.

@github-actions github-actions bot removed the exercise Pull requests that affect the corresponding module label Feb 11, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseParticipationIntegrationTest.java (1)

718-726: 🛠️ Refactor suggestion

Add safety check for infinite loop scenario.

The do-while loop could theoretically run indefinitely if unique repository URLs cannot be generated.

+        int maxRetries = 10;
+        int retryCount = 0;
         do {
+            if (retryCount++ >= maxRetries) {
+                throw new IllegalStateException("Failed to generate unique repository URL after " + maxRetries + " attempts");
+            }
             repoUrl = new URI(participation.getRepositoryUri());
             repoUrl = new URI(repoUrl.getScheme(), repoUrl.getUserInfo(), repoUrl.getHost(), repoUrl.getPort(), "/" + UUID.randomUUID().toString(), repoUrl.getQuery(),
                     repoUrl.getFragment());
             foundParticipation = programmingExerciseStudentParticipationRepository.findByRepositoryUri(repoUrl.toString());
         }
         while (foundParticipation.isPresent());
🧹 Nitpick comments (7)
src/main/java/de/tum/cit/aet/artemis/programming/domain/VcsRepositoryUri.java (1)

47-50: Improve constructor documentation.

The Javadoc should:

  1. Explain the expected format of repositoryName
  2. Document the thrown exceptions
  3. Provide example values
 /**
  * Initializes a new instance of the {@link VcsRepositoryUri} class from a repository name
  * builds an url to format <server.url>/git/<project_key>/<repo-name>.git
  *
+ * Example:
+ * vcBaseUrl: "https://example.com"
+ * repositoryName: "PROJ-user123"
+ * Result: "https://example.com/git/PROJ/PROJ-user123.git"
  *
  * @param vcBaseUrl      The base URL of the version control system
  * @param repositoryName containing the project key at the beginning
+ * @throws URISyntaxException if the constructed URI is invalid
+ * @throws IllegalArgumentException if the input parameters are invalid
  */
src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingSubmissionRepository.java (2)

146-155: Optimize JPQL query performance.

The current query uses subqueries which could impact performance with large datasets. Consider:

  1. Using ORDER BY and LIMIT instead of subqueries
  2. Adding appropriate indexes for the join columns
-    @Query("""
-            SELECT DISTINCT s
-            FROM ProgrammingSubmission s
-                LEFT JOIN FETCH s.results r
-                LEFT JOIN FETCH r.feedbacks f
-            WHERE s.participation.id = :participationId
-                AND (s.id IS NULL OR s.id = (SELECT MAX(s2.id) FROM ProgrammingSubmission s2 WHERE s2.participation.id = :participationId))
-                AND (r.id IS NULL OR r.id = (SELECT MAX(re2.id) FROM s.results re2))
-            """)
+    @Query(value = """
+            WITH LatestSubmission AS (
+                SELECT MAX(s.id) as sid
+                FROM ProgrammingSubmission s
+                WHERE s.participation.id = :participationId
+            ),
+            LatestResult AS (
+                SELECT MAX(r.id) as rid
+                FROM ProgrammingSubmission s
+                JOIN s.results r
+                WHERE s.id = (SELECT sid FROM LatestSubmission)
+            )
+            SELECT DISTINCT s
+            FROM ProgrammingSubmission s
+                LEFT JOIN FETCH s.results r
+                LEFT JOIN FETCH r.feedbacks f
+            WHERE s.participation.id = :participationId
+                AND s.id = (SELECT sid FROM LatestSubmission)
+                AND (r.id IS NULL OR r.id = (SELECT rid FROM LatestResult))
+            """)

146-155: Add documentation for the query method.

The method lacks documentation explaining its purpose and behavior.

+    /**
+     * Finds the latest submission for a participation along with its latest result and feedbacks.
+     * The method uses a complex query to:
+     * 1. Find the latest submission for the participation
+     * 2. Find the latest result for that submission
+     * 3. Eagerly fetch associated feedbacks
+     *
+     * @param participationId ID of the participation
+     * @return Optional containing the latest submission with its latest result and feedbacks,
+     *         or empty if no submission exists
+     */
     @Query("""
src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (2)

203-208: Improve error handling for repository URL construction.

The error handling for URI construction could be more descriptive.

-        try {
-            repoUrl = new VcsRepositoryUri(vcUrl, repoName).toString();
-        }
-        catch (URISyntaxException e) {
-            throw new BadRequestAlertException("Invalid repository URL", ENTITY_NAME, "invalidRepositoryUrl");
-        }
+        try {
+            repoUrl = new VcsRepositoryUri(vcUrl, repoName).toString();
+        }
+        catch (URISyntaxException e) {
+            throw new BadRequestAlertException("Failed to construct repository URL: " + e.getMessage(), ENTITY_NAME, "invalidRepositoryUrl");
+        }
+        catch (IllegalArgumentException e) {
+            throw new BadRequestAlertException("Invalid repository name format: " + e.getMessage(), ENTITY_NAME, "invalidRepositoryName");
+        }

186-195: Enhance method documentation.

The Javadoc should include:

  1. Response status codes
  2. Security considerations
  3. Example repository name format
     /**
      * Get the given student participation with its latest submission, latest result and feedbacks by its repository identifier.
      * The repository name is the last part of the repository URL.
      * The repository URL is built as follows: {server.url}/git/{project_key}/{repo-name}.git
      *
+     * Example repository name: "PROJ-user123"
+     *
+     * Security:
+     * - Requires STUDENT role or higher
+     * - Checks if user has access to the participation
+     * - Filters sensitive information based on user role and exam status
+     *
      * @param repoName the URL repository identifier
      * @return the ResponseEntity with status 200 (OK) and the participation DTO {@link de.tum.cit.aet.artemis.programming.dto.RepoUrlProgrammingStudentParticipationDTO} in body,
      *         or with status 404 (Not Found) if the participation is not found,
      *         or with status 403 (Forbidden) if the user doesn't have access to the participation
+     *         or with status 400 (Bad Request) if the repository name format is invalid
      */
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseParticipationIntegrationTest.java (2)

755-758: Add input validation to extractRepoName.

The method assumes a specific URL format but doesn't validate the input.

     String extractRepoName(String repoUrl) {
+        if (repoUrl == null || !repoUrl.endsWith(".git")) {
+            throw new IllegalArgumentException("Invalid repository URL format");
+        }
         // <server.url>/git/<project_key>/<repo-name>.git
         return repoUrl.substring(repoUrl.lastIndexOf("/") + 1, repoUrl.length() - 4);
     }

656-754: Group related test methods using @nested.

The test methods for repository name functionality should be grouped using @nested for better organization.

+    @Nested
+    class GetProgrammingExerciseStudentParticipationByRepoNameTests {
         @Test
         @WithMockUser(username = TEST_PREFIX + "student1", roles = "USER")
         void testGetProgrammingExerciseStudentParticipationByRepoName() throws Exception {
             // ... existing test
         }
         
         // ... other repo name related tests
     }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67f6b22 and 5685a92.

📒 Files selected for processing (5)
  • src/main/java/de/tum/cit/aet/artemis/programming/domain/VcsRepositoryUri.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingSubmissionRepository.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java (7 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseParticipationIntegrationTest.java (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/de/tum/cit/aet/artemis/programming/dto/RepoUrlProgrammingStudentParticipationDTO.java
🧰 Additional context used
📓 Path-based instructions (2)
`src/main/java/**/*.java`: naming:CamelCase; principles:{sin...

src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

  • src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingSubmissionRepository.java
  • src/main/java/de/tum/cit/aet/artemis/programming/domain/VcsRepositoryUri.java
  • src/main/java/de/tum/cit/aet/artemis/programming/web/ProgrammingExerciseParticipationResource.java
`src/test/java/**/*.java`: test_naming: descriptive; test_si...

src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

  • src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseParticipationIntegrationTest.java
🧠 Learnings (1)
src/test/java/de/tum/cit/aet/artemis/programming/ProgrammingExerciseParticipationIntegrationTest.java (1)
Learnt from: julian-christl
PR: ls1intum/Artemis#9322
File: src/main/java/de/tum/cit/aet/artemis/programming/repository/ProgrammingExerciseStudentParticipationRepository.java:0-0
Timestamp: 2024-11-12T12:51:51.201Z
Learning: In Artemis, an `ExerciseGroup` always has an associated `Exam`, so `exerciseGroup.exam` is never null.
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: client-style
  • GitHub Check: server-style
  • GitHub Check: client-tests
  • GitHub Check: server-tests
  • GitHub Check: Analyse

@janthoXO janthoXO requested a review from ole-ve February 11, 2025 16:11
Copy link
Contributor

@ole-ve ole-ve left a comment

Choose a reason for hiding this comment

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

thanks for answering questions and integrating my suggestions, code looks good to me 👍

@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de February 12, 2025 20:50 Inactive
Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Tested with TS6. Reapprove

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 programming Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.