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: Enable empty template for LocalCI #9280

Merged

Conversation

magaupp
Copy link
Contributor

@magaupp magaupp commented Sep 4, 2024

Checklist

General

Server

Client

  • I strictly followed the client coding and design guidelines.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

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).

Motivation and Context

The Empty template was created to provide a starting point for advanced users. It requires a customized build script to be useful. Currently, this template is disabled for LocalCI.

Description

This PR enables the Empty template for LocalCI and adds hints to the exercise creation dialog which are displayed when the Empty template is selected. The custom build script is auto-selected. It provides TODO items where the actual behavior is to be placed.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Course
  1. Log in to Artemis
  2. Navigate to the programming exercise creation dialog
  3. Select the Empty language
  4. Verify that the exercise creation hints are displayed as in the screenshot
  5. Verify that Customize Build Script is checked automatically

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

grafik

Summary by CodeRabbit

  • New Features

    • Added support for the EMPTY programming language in the Local CI service, enhancing its robustness.
    • Introduced a new Bash script for automating setup and testing processes in the Aeolus project.
    • Conditional rendering for programming exercises when the programming language is set to EMPTY, improving user guidance.
    • New hints for using alternative programming languages added to the application in both English and German.
  • Improvements

    • Updated the icon in the programming exercise language component for better user experience.
    • Added new constants for easier access to Docker registry and documentation links.
  • Bug Fixes

    • Simplified the Jenkins pipeline build command for clarity.

@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. template labels Sep 4, 2024
@magaupp magaupp marked this pull request as ready for review September 4, 2024 16:17
@magaupp magaupp requested a review from a team as a code owner September 4, 2024 16:17
Copy link

coderabbitai bot commented Sep 4, 2024

Walkthrough

The changes involve the integration of the EMPTY programming language into the LocalCIProgrammingLanguageFeatureService, the addition of a Bash script for task management in the Aeolus project, modifications to a Jenkins pipeline script, and enhancements to Angular components related to programming exercises. Additionally, new sections were added to the internationalization JSON files to provide guidance for users on utilizing different programming languages.

Changes

File Change Summary
src/main/java/de/tum/in/www1/artemis/service/connectors/localci/... Added handling for EMPTY programming language in LocalCIProgrammingLanguageFeatureService.
src/main/resources/templates/aeolus/empty/default.sh Introduced a new Bash script with functions for dependency installation, testing, and result processing.
src/main/resources/templates/jenkins/empty/regularRuns/pipeline.groovy Modified the test method to output "Hello World" instead of checking Maven installation.
src/main/webapp/app/exercises/programming/manage/update/... Added boolean assignment for customizeBuildPlanWithAeolus in ProgrammingExerciseUpdateComponent.
src/main/webapp/app/exercises/programming/manage/update/update-components/... Changed icon and added new constants in ProgrammingExerciseLanguageComponent.
src/main/webapp/i18n/de/programmingExercise.json Added "otherLanguageHints" section with guidance for using different programming languages.
src/main/webapp/i18n/en/programmingExercise.json Added "otherLanguageHints" section with instructions for utilizing non-default programming languages.

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 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.

Copy link

@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

Copy link

@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: 5

@magaupp magaupp temporarily deployed to artemis-test2.artemis.cit.tum.de September 4, 2024 19:40 — with GitHub Actions Inactive
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 4, 2024
Copy link
Contributor

@sarpsahinalp sarpsahinalp left a comment

Choose a reason for hiding this comment

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

Very small grammatical changes

src/main/webapp/i18n/en/programmingExercise.json Outdated Show resolved Hide resolved
src/main/webapp/i18n/en/programmingExercise.json Outdated Show resolved Hide resolved
Co-authored-by: Sarp Sahinalp <92453703+sarpsahinalp@users.noreply.github.com>
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 13, 2024
Co-authored-by: Sarp Sahinalp <92453703+sarpsahinalp@users.noreply.github.com>
@magaupp magaupp closed this Sep 15, 2024
@magaupp magaupp deleted the feature/programming-exercises/empty-template-localci-and-ui branch September 15, 2024 13:30
@magaupp magaupp restored the feature/programming-exercises/empty-template-localci-and-ui branch September 15, 2024 13:39
@magaupp magaupp reopened this Sep 15, 2024
@magaupp
Copy link
Contributor Author

magaupp commented Sep 15, 2024

I don't remember closing this. Strange.

Copy link
Member

@BBesrour BBesrour left a comment

Choose a reason for hiding this comment

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

code

Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

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

Still works on Ts2.
One thing I noticed: You can freely set the image (something else instead of ubuntu:24.04). Am I missing something, or does an admin e.g. need to add different images manually to make it work? For example using ubuntu:22.04 didn't work, as it was not found.

@magaupp
Copy link
Contributor Author

magaupp commented Sep 19, 2024

You should be able to set any image in an online docker registry. I tried ubuntu:22.04 on TS2 and it was working for me. What kind of error message was shown?

@krusche krusche added this to the 7.5.4 milestone Sep 20, 2024
@krusche krusche changed the title Programming exercises: Enable Empty Template for LocalCI Programming exercises: Enable empty template for LocalCI Sep 20, 2024
@krusche krusche merged commit 0354197 into develop Sep 20, 2024
46 of 54 checks passed
@krusche krusche deleted the feature/programming-exercises/empty-template-localci-and-ui branch September 20, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. ready for review server Pull requests that update Java code. (Added Automatically!) template
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

8 participants