Skip to content

Conversation

@m4rl0ne
Copy link
Contributor

@m4rl0ne m4rl0ne commented Jan 24, 2026

Checklist

General

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 LocalVC and Jenkins.

Motivation and Context

Fixes #11776. The build failure detection does not work for C/C++ code, as it assumes that the static code analysis fails. However, this does not cover all build failure cases.

Is this expected behaviour?

Is there any reason why this was not introduced previously? Did I miss something?

Description

Currently, there is almost no way to trigger the build failed state when grading C/C++ exercises. As a consequence, the build output is almost never shown to the user.

The ProgrammingExerciseGradingService only checks if there are static code analysis errors or no test cases have been run at all. For C/C++ exercises, as soon as CMake is successful, the TestConfigure test case (see Python C build pipeline) is automatically succesfull, therefore not triggering the ProgrammingExerciseGradingService build failed check.

In addition to the static code analysis, a regex checks the result submission feedback list for any build or make failure entries. If it finds any, the build is marked as failed. This works for C and C++ programming exercises and shows the compilation error to the user.

Steps for Testing

Prerequisites:

  • 1 Programming Exercise C/C++
  1. Create empty C/C++ exercise
  2. Break something
  3. See the build output

Summary by CodeRabbit

  • Bug Fixes
    • Improved build failure detection in programming exercise evaluations to more accurately identify compilation and make failures, providing clearer feedback on failed builds and ensuring reliable status reporting for submissions.

✏️ Tip: You can customize this high-level summary in your review settings.

@m4rl0ne m4rl0ne requested review from a team and krusche as code owners January 24, 2026 23:52
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Jan 24, 2026
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) assessment Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module labels Jan 24, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Introduces build failure detection in C/C++ programming exercises by adding a method to identify build/make failure messages in feedback and updating the grading service to incorporate build-failed feedback into build failure determination.

Changes

Cohort / File(s) Summary
Build Failure Detection
src/main/java/de/tum/cit/aet/artemis/assessment/domain/Feedback.java
Added isBuildFailedFeedback() method with case-insensitive regex pattern (make/build.*failed) to detect build failures in AUTOMATIC feedback. Includes @JsonIgnore annotation. Note: Duplicate method declaration present.
Grading Service Logic Update
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseGradingService.java
Updated build failure detection to use logical OR of staticCodeAnalysisFailed and buildFailedFeedback instead of only checking for static code analysis feedback.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning All changes are directly related to fixing C/C++ build failure detection: the new isBuildFailedFeedback() method and its integration into ProgrammingExerciseGradingService are within scope. Remove the duplicate isBuildFailedFeedback() method declaration in Feedback.java, as having identical duplicate method declarations is invalid Java code.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: fixing C/C++ build failure detection in programming exercises, which is the core objective of the PR.
Linked Issues check ✅ Passed The PR addresses issue #11776 by implementing build failure detection via regex-based feedback checks, enabling proper display of C/C++ build output to users.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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 server Pull requests that update Java code. (Added Automatically!)

Projects

Status: Work In Progress

Development

Successfully merging this pull request may close these issues.

C/C++ Build Output not saved and displayed to the user

1 participant