Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/general/monaco-keyboard-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pzdr7 authored Oct 19, 2024
2 parents 68b9909 + fc00f56 commit cafc404
Show file tree
Hide file tree
Showing 175 changed files with 5,068 additions and 784 deletions.
144 changes: 144 additions & 0 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
assessment:
- assessment
- bonus
- complaint
- submission
- grading
- grade
- score
- caseSensitive: false

athena:
- athena
- caseSensitive: false

atlas:
- atlas
- competency
- competencies
- knowledge area
- learning path
- learner profile
- science event
- adaptive learning
- caseSensitive: false

buildagent:
- buildagent
- build agent
- buildjob
- build job
- build result
- caseSensitive: false

communication:
- communication
- conversation
- notification
- agreement
- faq
- post
- reaction
- chat
- message
- caseSensitive: false

core:
- user-management
- authority
- data export
- migration
- user
- group
- caseSensitive: false

exam:
- exam
- exercisegroup
- student exam
- suspicious behavior
- suspicious behaviour
- caseSensitive: false

exercise:
- exercise
- participation
- participant
- difficulty
- lifecycle
- team
- assignment
- caseSensitive: false

fileupload:
- fileupload
- upload
- caseSensitive: false

iris:
- iris
- llm
- chatbot
- ai
- caseSensitive: false

lecture:
- lecture
- attachment
- online
- slide
- video
- text unit
- caseSensitive: false

lti:
- lti
- online course
- caseSensitive: false

modeling:
- modeling
- diagram
- uml
- caseSensitive: false

plagiarism:
- plagiarism
- caseSensitive: false

programming:
- programming
- build
- build plan
- code hint
- git
- testwise coverage
- ide
- submission policy
- aeolus
- penalty
- auxilary
- commit
- project
- static code analysis
- caseSensitive: false

quiz:
- quiz
- drag
- drop
- single choice
- multiple choice
- batch
- short answer
- caseSensitive: false

text:
- text
- block
- caseSensitive: false

tutorialgroup:
- tutorialgroup
- session
- caseSensitive: false
26 changes: 24 additions & 2 deletions .github/workflows/analysis-of-endpoint-connections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,16 @@ jobs:
path: supporting_scripts/analysis-of-endpoint-connections/

- name: Analyze endpoints
run:
run: |
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runEndpointAnalysis
continue-on-error: true
id: endpointAnalysis

- name: Analyze rest calls
run:
run: |
./gradlew :supporting_scripts:analysis-of-endpoint-connections:runRestCallAnalysis
continue-on-error: true
id: restCallAnalysis

- name: Upload analysis results
uses: actions/upload-artifact@v4
Expand All @@ -93,3 +97,21 @@ jobs:
path: |
supporting_scripts/analysis-of-endpoint-connections/endpointAnalysisResult.json
supporting_scripts/analysis-of-endpoint-connections/restCallAnalysisResult.json
- name: Check if any step failed
run: |
if [ "${{ steps.endpointAnalysis.outcome }}" != "success" ] &&
[ "${{ steps.restCallAnalysis.outcome }}" != "success" ]; then
echo "Endpoints and REST calls could not be matched."
exit 1
fi
if [ "${{ steps.endpointAnalysis.outcome }}" == "success" ] &&
[ "${{ steps.restCallAnalysis.outcome }}" != "success" ]; then
echo "REST calls could not be matched."
exit 1
fi
if [ "${{ steps.endpointAnalysis.outcome }}" != "success" ] &&
[ "${{ steps.restCallAnalysis.outcome }}" == "success" ]; then
echo "Endpoints could not be matched."
exit 1
fi
17 changes: 17 additions & 0 deletions .github/workflows/issue-labler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Issue Labeler"
on:
issues:
types: [opened, edited]

permissions:
issues: write
contents: read

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: MaximilianAnzinger/[email protected]
with:
configuration-path: .github/issue-labeler.yml
repo-token: ${{ github.token }}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ dependencies {
implementation "de.jplag:jplag:${jplag_version}"

implementation "de.jplag:c:${jplag_version}"
implementation "de.jplag:cpp:${jplag_version}"
implementation "de.jplag:java:${jplag_version}"
implementation "de.jplag:javascript:${jplag_version}"
implementation "de.jplag:kotlin:${jplag_version}"
Expand Down
4 changes: 4 additions & 0 deletions docs/user/exercises/programming-exercise-features.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Instructors can still use those templates to generate programming exercises and
+----------------------+----------+---------+
| R | yes | yes |
+----------------------+----------+---------+
| C++ | yes | yes |
+----------------------+----------+---------+

- Not all ``templates`` support the same feature set and supported features can also change depending on the continuous integration system setup.
Depending on the feature set, some options might not be available during the creation of the programming exercise.
Expand Down Expand Up @@ -75,6 +77,8 @@ Instructors can still use those templates to generate programming exercises and
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+
| R | no | no | yes | no | n/a | no | no | L: yes, J: no |
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+
| C++ | no | no | yes | no | n/a | no | no | L: yes, J: no |
+----------------------+----------------------+----------------------+---------------------+--------------+------------------------------------------+------------------------------+----------------------------+------------------------+

- *Sequential Test Runs*: ``Artemis`` can generate a build plan which first executes structural and then behavioral tests. This feature can help students to better concentrate on the immediate challenge at hand.
- *Static Code Analysis*: ``Artemis`` can generate a build plan which additionally executes static code analysis tools.
Expand Down
42 changes: 40 additions & 2 deletions docs/user/exercises/programming-exercise-setup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ Update exercise code in repositories
- In case of a |build_failed| result, some configuration is wrong, please check the build errors on the corresponding build plan.
- **Hints:** Test cases should only reference code, that is available in the template repository. In case this is **not** possible, please try out the option **Sequential Test Runs**

.. _adapt_build_script:

Adapt the build script
^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -360,8 +362,7 @@ You can activate the option `Customize Build Script` in the programming exercise
All changes in the configuration will be considered for all builds (template, solution, student submissions).

There are predefined build scripts in bash for all programming languages, project types and configurations (e.g. with or without static code analysis).
Notice that the checkout paths for the test and the assignment (template, solution or student) repo cannot be customized at the moment and are determined
by the chosen programming language. Most programming languages clone the test repos into the root folder and the assignment repo into the `assignment` folder.
Most programming languages clone the test repos into the root folder and the assignment repo into the `assignment` folder.
This means that build files in the test repo (e.g. Gradle, Maven) typically refer to the `assignment` folder.

You can also use a custom docker image for the build. Make sure to publish the docker image in a publicly available repository (e.g. DockerHub). Ideally build it
Expand All @@ -372,8 +373,45 @@ The default Java Docker image can be found on https://github.com/ls1intum/artemi
Hint: Try out the build of a custom programming exercise locally before you publish a custom docker image and before you upload the code to Artemis, because the
development and debugging experience is much better.

Edit Repositories Checkout Paths
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**This option is only available when using** :ref:`integrated code lifecycle<integrated code lifecycle>`

This section is optional. In most cases, the preconfigured checkout paths do not need to be changed.
The checkout paths depend on the chosen programming language and project type. The paths are shown in the preview:

.. figure:: programming/checkout-paths-preview.png
:align: center

By checkout paths, we mean the paths where the repositories are cloned during the build process. For example, in Java exercises, the assignment repository is cloned into the `assignment` folder, the test repository is cloned into the root folder. All paths are relative to the working directory of the build plan.
If you want to change the checkout paths, you can do so by clicking on the `edit repositories checkout path` button. The following dialog will open:

.. figure:: programming/checkout-paths-edit.png
:align: center

You must then change the paths in the build script if necessary. Please refer to the :ref:`adapt_build_script` section on how to do this.

.. warning::
- Changing the checkout paths can only be done in the exercise creation process. After the exercise has been created, the checkout paths cannot be changed.
- Depending on the programming language and project type, the checkout paths are predefined and cannot be changed. For example, for Java exercises, only the assignment repository path can be changed. For Ocaml exercises, the assignment, test, and solution repository paths can be changed.
- Changing the checkout paths can lead to build errors if the build script is not adapted accordingly.
- For C programming exercises, if used with the default docker image, changing the checkout paths will lead to build errors. The default docker image is configured to work with the default checkout paths.

.. _configure_static_code_analysis_tools:

Edit Maximum Build Duration
^^^^^^^^^^^^^^^^^^^^^^^^^^^

**This option is only available when using** :ref:`integrated code lifecycle<integrated code lifecycle>`
This section is optional. In most cases, the preconfigured build script does not need to be changed.

The maximum build duration is the time limit for the build plan to execute. If the build plan exceeds this time limit, it will be terminated. The default value is 120 seconds.
You can change the maximum build duration by using the slider.

.. figure:: programming/timeout-slider.png
:align: center

Configure static code analysis
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// in the future are migrated or cleared. Changes should be communicated in release notes as potentially breaking changes.
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record BuildAgentInformation(String name, int maxNumberOfConcurrentBuildJobs, int numberOfCurrentBuildJobs, List<BuildJobQueueItem> runningBuildJobs, boolean status,
List<BuildJobQueueItem> recentBuildJobs, String publicSshKey) implements Serializable {
public record BuildAgentInformation(String name, int maxNumberOfConcurrentBuildJobs, int numberOfCurrentBuildJobs, List<BuildJobQueueItem> runningBuildJobs,
BuildAgentStatus status, List<BuildJobQueueItem> recentBuildJobs, String publicSshKey) implements Serializable {

@Serial
private static final long serialVersionUID = 1L;
Expand All @@ -27,4 +27,8 @@ public BuildAgentInformation(BuildAgentInformation agentInformation, List<BuildJ
this(agentInformation.name(), agentInformation.maxNumberOfConcurrentBuildJobs(), agentInformation.numberOfCurrentBuildJobs(), agentInformation.runningBuildJobs,
agentInformation.status(), recentBuildJobs, agentInformation.publicSshKey());
}

public enum BuildAgentStatus {
ACTIVE, IDLE, PAUSED
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public class BuildJobManagementService {
*/
private final Map<String, Future<BuildResult>> runningFutures = new ConcurrentHashMap<>();

private final Map<String, CompletableFuture<BuildResult>> runningFuturesWrapper = new ConcurrentHashMap<>();

/**
* A set that contains all build jobs that were cancelled by the user.
* This set is unique for each node and contains only the build jobs that were cancelled on this node.
Expand Down Expand Up @@ -178,9 +180,20 @@ public CompletableFuture<BuildResult> executeBuildJob(BuildJobQueueItem buildJob
}
}
});
futureResult.whenComplete(((result, throwable) -> runningFutures.remove(buildJobItem.id())));

return futureResult;
runningFuturesWrapper.put(buildJobItem.id(), futureResult);
return futureResult.whenComplete(((result, throwable) -> {
runningFutures.remove(buildJobItem.id());
runningFuturesWrapper.remove(buildJobItem.id());
}));
}

Set<String> getRunningBuildJobIds() {
return Set.copyOf(runningFutures.keySet());
}

CompletableFuture<BuildResult> getRunningBuildJobFutureWrapper(String buildJobId) {
return runningFuturesWrapper.get(buildJobId);
}

/**
Expand Down Expand Up @@ -235,7 +248,7 @@ private void finishBuildJobExceptionally(String buildJobId, String containerName
*
* @param buildJobId The id of the build job that should be cancelled.
*/
private void cancelBuildJob(String buildJobId) {
void cancelBuildJob(String buildJobId) {
Future<BuildResult> future = runningFutures.get(buildJobId);
if (future != null) {
try {
Expand Down
Loading

0 comments on commit cafc404

Please sign in to comment.