-
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
Integrated code lifecycle
: Always create submission results for failed build jobs
#8534
Integrated code lifecycle
: Always create submission results for failed build jobs
#8534
Conversation
…ailed-builds' into feature/icl/create-results-for-failed-builds
WalkthroughThe modifications primarily involve the integration and enhancement of the local CI and VC subsystems in the Artemis platform. Changes include the addition of new fields in Changes
Possibly related issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 6
...n/java/de/tum/in/www1/artemis/service/connectors/localci/LocalCIResultProcessingService.java
Show resolved
Hide resolved
...n/java/de/tum/in/www1/artemis/service/connectors/localci/LocalCIResultProcessingService.java
Show resolved
Hide resolved
...n/java/de/tum/in/www1/artemis/service/connectors/localci/LocalCIResultProcessingService.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/connectors/localci/LocalCITriggerService.java
Show resolved
Hide resolved
.../tum/in/www1/artemis/service/connectors/localci/buildagent/SharedQueueProcessingService.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/connectors/localci/dto/BuildConfig.java
Show resolved
Hide resolved
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 locally for 2 cases:
- Docker not running (error message should be improved in a follow-up)
- Docker image does not exist
In both cases, a result was shown, the loading animation did not take forever, and I could get the build logs in the submission page.
So this PR greatly improves error discovery for instructors and error handling 👍
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 ts1 works as expected. Code also LGTM 👍
# Conflicts: # src/main/java/de/tum/in/www1/artemis/service/connectors/localci/dto/BuildConfig.java
fef26b3
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.
Actionable comments posted: 3
Out of diff range and nitpick comments (4)
src/test/java/de/tum/in/www1/artemis/staticcodeanalysis/StaticCodeAnalysisParserUnitTest.java (4)
Line range hint
36-36
: Consider adding a detailed Javadoc comment to explain the parameters and the expected behavior of the method.
Line range hint
48-48
: Add a Javadoc comment to explain the purpose of this test method and the expected outcome when null is passed.
Line range hint
56-56
: Add a Javadoc comment to clarify the parameters and expected behavior of this method.
Line range hint
64-64
: Consider usingassertThrows
for a more idiomatic way of expecting exceptions in JUnit tests.- try { - testParserWithFile("checkstyle-result.xml", "checkstyle.txt"); - } - catch (ParserException e) { - fail("Checkstyle parser failed with exception: " + e.getMessage()); - } + assertThrows(ParserException.class, () -> testParserWithFile("checkstyle-result.xml", "checkstyle.txt"), "Checkstyle parser should throw an exception");
src/test/java/de/tum/in/www1/artemis/staticcodeanalysis/StaticCodeAnalysisParserUnitTest.java
Show resolved
Hide resolved
...ava/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseExportImportResource.java
Outdated
Show resolved
Hide resolved
...ava/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseExportImportResource.java
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 5
...tum/in/www1/artemis/exercise/programmingexercise/ProgrammingExerciseTestCaseServiceTest.java
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/localvcci/LocalCIIntegrationTest.java
Show resolved
Hide resolved
...a/de/tum/in/www1/artemis/exercise/programmingexercise/StaticCodeAnalysisIntegrationTest.java
Show resolved
Hide resolved
...a/de/tum/in/www1/artemis/exercise/programmingexercise/StaticCodeAnalysisIntegrationTest.java
Show resolved
Hide resolved
...a/de/tum/in/www1/artemis/exercise/programmingexercise/StaticCodeAnalysisIntegrationTest.java
Show resolved
Hide resolved
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.
Actionable comments posted: 3
Checklist
General
Server
Client
Changes affecting Programming Exercises
Motivation and Context
Previously, when a build error occurred, a build was cancelled or just timed out, LocalCI would not create a (failed) build result and would just send a notification, that there was no corresponding result.
In some cases, the client would just show an endless building animation, so the user would not know the state of the build job. If we create a failed build result for these cases, it would be much easier to comprehend the state of the build job and view logs.
Description
This PR adapts the CI functionality a bit so that build jobs that had an error, got cancelled etc. still create a Build Result und thus a submission result. In order for a build result to be converted into a submission result, it needs the correct assignment and test commit hash. Thus, we adapted the
LocalCIBuildJobQueueItem
to store these and retrieve them via the GitService before adding the job to the queue. In case of an error, we create a failed result (LocalCIBuildResult
), which always be converted into a submission result. Additionally, we do not notify the user about no result being available so the client shows the correct information. Essentially the build jobs (error, cancelled, time out etc. ) will look like "build failed" result, e.g. if there was a syntax error in the code.Steps for Testing
Prerequisites:
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