Skip to content

Conversation

tobias-lippert
Copy link
Contributor

@tobias-lippert tobias-lippert commented Sep 11, 2025

Only deploy to TS1!

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I documented the Java code using JavaDoc style.

Changes affecting Programming Exercises

VCS is the same for all setups

Motivation and Context

We store a lot of redundant information in the repository_url column of each participation.
The server url, the /git/prefix and the .git suffix
This wastes space in the database.

Description

  • Adapted the getter and setters of the involved Uris to convert between the short and the full variant.
  • Adapted the tests where necessary

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 TS with LocalVC/LocalCI Setup (e.g. ts1)
  • Make sure that a programming exercise exists before deploying this PR that is started
  • Make sure that a programminge exercise exists before deploying this PR that is not yet started
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. Create a programming exercise with auxiliary repository
  4. Download the template, solution, test and auxiliary repository and check the correct content is contained
  5. As student, start the previously existing programming exercise and participate in it using your git client with both https and ssh, vcs access token and online code editor and make sure this succeeds
  6. Participate in the already existing, started exercise with using your git client with both https and ssh, vcs access token and online code editor and make sure this succeeds
  7. Do the same as in 5. for the newly created exercise

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
RepositoryUriConversionUtil.java 89%

Summary by CodeRabbit

  • Bug Fixes
    • Improved repository detection and access logging by normalizing repository URLs (handles full vs. short forms and /git/ paths), reducing lookup and logging errors.
  • Refactor
    • Repository URIs are now consistently presented as full URLs while stored in a compact form, improving interoperability across services.
  • Tests
    • Expanded and hardened tests and test helpers to validate URL conversions and per-thread server URL handling for more stable parallel/local CI runs.

@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Sep 11, 2025
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. exercise Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module labels Sep 11, 2025
@tobias-lippert tobias-lippert added this to the 8.4.1 milestone Sep 12, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 489ms
TestResultTime ⏱
No test annotations available

@github-actions github-actions bot added athena Pull requests that affect the corresponding module core Pull requests that affect the corresponding module hyperion and removed iris Pull requests that affect the corresponding module labels Sep 14, 2025
}
var participation = participationUtilService.addStudentParticipationForProgrammingExerciseForLocalRepo(programmingExercise, userLogin,
URI.create(LocalRepositoryUriUtil.convertToLocalVcUriString(programmingExerciseTestService.studentRepo.workingCopyGitRepoFile, localVCRepoPath)));
String shortUri = LocalRepositoryUriUtil.convertToLocalVcUriShortUriString(programmingExerciseTestService.studentRepo.workingCopyGitRepoFile, localVCRepoPath);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This pattern is used in different tests. It's needed because our local repositories use file paths as git repository uris which is kind of a hack and incompatible with our conversion mechansim because file paths are never used as repo uris in production. Therefore, we have to make the uris compatible while not breaking the usage of LocalRepository.
We do this by first extracting the short uri (projectName/repo-slug) from the file path and then converting it to a full repository uri because that's the value the production code will use the call the method. Without specifying the full repository uri, mocking won't work.

@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de September 29, 2025 08:48 Inactive
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 29, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran200 passed3 skipped2 failed1h 13m 42s 172ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 6s 287ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 25s 339ms

Copy link
Contributor

@ekayandan ekayandan left a comment

Choose a reason for hiding this comment

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

Tested on TS1. Changes work with new exercises. Existing exercises do not show template and solution repository urls.

coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 29, 2025
bensofficial
bensofficial previously approved these changes Sep 29, 2025
Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

Reapprove DB migration

@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de September 29, 2025 12:51 Inactive
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 19m 32s 916ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 4s 580ms

@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de September 30, 2025 05:39 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de October 1, 2025 09:59 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test1.artemis.cit.tum.de October 1, 2025 10:58 Inactive
Copy link
Contributor

@ekayandan ekayandan left a comment

Choose a reason for hiding this comment

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

Tested on TS1. When I navigate to an existing programming exercise, I can't download/view/participate in existing repositories.

Image

@tobias-lippert tobias-lippert modified the milestones: 8.4.1, 8.4.2 Oct 1, 2025
Copy link

github-actions bot commented Oct 2, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran200 passed3 skipped2 failed1h 19m 13s 755ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 4s 79ms
e2e/exercise/quiz-exercise/QuizExerciseParticipation.spec.ts
ts.Quiz Exercise Participation › DnD Quiz participation › Student can participate in DnD Quiz❌ failure2m 5s 676ms

Copy link

github-actions bot commented Oct 2, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran199 passed3 skipped3 failed1h 17m 18s 245ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 3s 885ms
e2e/exercise/quiz-exercise/QuizExerciseParticipation.spec.ts
ts.Quiz Exercise Participation › DnD Quiz participation › Student can participate in DnD Quiz❌ failure2m 4s 488ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 33s 227ms

Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

Reapprove DB migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
athena Pull requests that affect the corresponding module core Pull requests that affect the corresponding module database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. exercise Pull requests that affect the corresponding module hyperion plagiarism Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

6 participants