-
Notifications
You must be signed in to change notification settings - Fork 276
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
: Trim docker image name to avoid white space issues
#8518
Conversation
...main/webapp/app/exercises/programming/manage/update/programming-exercise-update.component.ts
Outdated
Show resolved
Hide resolved
...ild-plans/programming-exercise-docker-image/programming-exercise-docker-image.component.html
Outdated
Show resolved
Hide resolved
WalkthroughThis update primarily involves transitioning JSON serialization from Gson to Jackson's Changes
Possibly related issues
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: 3
Out of diff range and nitpick comments (1)
src/main/java/de/tum/in/www1/artemis/service/programming/ProgrammingExerciseService.java (1)
Line range hint
433-455
: Ensure Docker image names are trimmed before use in build scripts.- String script = buildScriptGenerationService.get().getScript(programmingExercise); + // Ensure Docker image names are trimmed to avoid build issues + String script = buildScriptGenerationService.get().getScript(programmingExercise.trimDockerImageName());This change ensures that Docker image names are trimmed of any leading or trailing whitespace before they are used to generate build scripts, aligning with the PR's objectives to avoid build errors related to Docker image name formatting.
src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/connectors/aeolus/AeolusBuildPlanService.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: 1
src/main/java/de/tum/in/www1/artemis/web/rest/dto/pageablesearch/UserPageableSearchDTO.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.
Code still looks good. Just found two possible nitpicks.
...ava/de/tum/in/www1/artemis/service/connectors/aeolus/AeolusBuildScriptGenerationService.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/util/PageableSearchUtilService.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.
tested on ts4, works as expected. Trailing and leading whitespaces were removed.
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 ts4 with a variety of whitespace characters, as well as for leading and trailing whitespaces. Works as expected (no whitespace is displayed after submitting and build runs through). Of course, I could not check the database on the test server.
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.
Code looks good; I think the title might be in need of an update, though, as the scope is way more extensive than the PR title suggests
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 it on t4, with leading trails and whitespaces, also tried it in edit mode for the exercise after creating it and it still worked. And tried the steps again after deleting the exercise.
Code looks good to me
The title reflects the user facing changes. All others are internal and do not really affect end users. I agree that a separation into multiple PRs would have been better, but doing this now would be too much work. However, I add some details into the PR description |
Checklist
General
Server
Client
Changes affecting Programming Exercises
Motivation and Context
It can happen that the docker image has a leading or trailing whitespace which will lead to build errors that are currently hard to detect for instructors
Description
We make sure to trim the docker image name in several places to avoid issues with existing database entries and to prevent new database entries with unnecessary whitespace
Additionally, this PR improves a couple of code quality issues:
Strings.isNullOrEmpty(string)
overstring.isBlank()
to avoid null pointer exceptionsSteps 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