-
Notifications
You must be signed in to change notification settings - Fork 275
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
: Download repository button broken for auxiliary repository locally
#8826
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe recent changes in the project focus on enhancing the user interface, improving error handling in exporting repositories, and adding new user feedback messages for repository export errors. Specifically, the styling of list items in a component was updated, error handling in repository export was fortified with RxJS, and new multilingual error messages were added for better user communication in case of export failures. Changes
Sequence Diagram(s)No sequence diagrams needed as the changes primarily involve stylistic adjustments and error handling improvements without significantly altering control flows. Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (4)
Additional context usedPath-based instructions (3)
Additional comments not posted (7)
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: 1
...rcises/programming/shared/actions/programming-exercise-instructor-repo-download.component.ts
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.
Regarding the root cause:
With external VCS like Bitbucket or Gitlab it was hard to track what users do without the knowledge of Artemis (creating additional repositories, changing build plans, ...). So it was hard for Artemis to track these changes accurately. Additionally it was hard to adapt the potentially custom build plans to correctly checkout newly added auxiliary repositories later on.
With LocalVC these problems should no longer occur, so we can provide instructors with the option to manage auxiliary repositories right in Artemis and then make sure that no additional repositories exist that are not accounted for or that auxiliary repositories exist in the Artemis database but not the LocalVC
@@ -6,6 +6,9 @@ import { downloadZipFileFromResponse } from 'app/shared/util/download.util'; | |||
import { AlertService } from 'app/core/util/alert.service'; | |||
import { faDownload } from '@fortawesome/free-solid-svg-icons'; | |||
|
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.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
Don´t close it. @krusche is this a relevant feature to implement as @JohannesStoehr suggested? |
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Changes affecting Programming Exercises
Motivation and Context
Issue #8605 describes the current state in which the download of non-existent auxiliary repositories fail silently. This is not a problem for building or testing programming exercises, but heavily limit the usability for novice users.
When auxiliary repos are created during exercise creation, the auxiliary repos are created and linked correctly. In this case, the current implementation successfully provided a download.
However, when aux. repos are added to existing exercises, the repositories are not created properly and no directory is created in LocalVC. The instructor performing the action is informed about this situation but no fix is suggested nor is a permanent error message raised. When trying to clone or download the non-existent repository, an internal server error (500) arises but no information is shown in the UI. This leaves teams of multiple instructors with the situation that they might not understand why an aux. repo does not work.
Description
As a first step, I implemented an error handler for failing repository downloads. Users are not informed about the situation and know that their repository does not exist. This fights the symptoms but not the root-cause.
I propose a more sophisticated solution changing the way how auxiliary repositories are added to already existing exercises.
Adding new aux repos to existing exercises (and a set of already existing aux repos), poses the challenge of not overwriting those aux repos that are already referenced in tests etc.
This code contains the logic for detecting "illegal" auxiliary repo changes. As soon as a
name
orcheckoutDirectory
are changed, it is considered illegal.Discussion for further improvement
The main problem which reasons such restrictive behavior is, that already existing aux repos are identified by their name and would loose a "HEAD" pointing to them when an instructor changes the name.
We could use the following approaches that allow adding aux repos after the fact:
Append-Only Auxiliary Repositories
By making all existing auxiliary repository's
name
read-only, pointers/access to those repos is secured. I see no reason why we shouldn`t add new repositories to the collection then. Add an explicit "delete" logic could allow the instructor to correct any spelling mistake by recreating a correct repo.Trust Instructors
We can also trust the instructors to know what they change and where they referenced to the
checkout directory
. Assuming the builds and tests work, this approach has the disadvantage of possibly having repositories around that are not linked by anything anymore.I´m sure there are other ways to solve it as well - let´s discuss it 👍
As it´s quite relevant for instructors, please share your opinion @krusche @rabeatwork
Steps for Testing
Prerequisites:
Verify successful download
Verify error handling
Download Repository
button and verify that you see an error bannerExam Mode Testing
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
Performance Review
Code Review
Manual Tests
Exam Mode Test
Test Coverage
Screenshots
Summary by CodeRabbit
Style
Bug Fixes
Documentation