-
Notifications
You must be signed in to change notification settings - Fork 304
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
: Fix broken download button for auxiliary repositories
#8826
Programming exercises
: Fix broken download button for auxiliary repositories
#8826
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. 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
...rcises/programming/shared/actions/programming-exercise-instructor-repo-download.component.ts
Outdated
Show resolved
Hide resolved
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? |
I suggest we fix the root cause and allow more options for adding / editing / removing aux repos in LocalVC |
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. |
…ownload-repository-button-broken-for-auxiliary-repository-locally
Programming Exercises
: Download repository button broken for auxiliary repository locallyProgramming exercises
: Fix broken download button broken for auxiliary repositories
Ideally, we provide more options in a follow-up and fix the root cause / bug first quickly, this PR is already open too long |
...in/java/de/tum/in/www1/artemis/service/programming/ProgrammingExerciseRepositoryService.java
Show resolved
Hide resolved
...main/webapp/app/exercises/programming/manage/update/programming-exercise-update.component.ts
Outdated
Show resolved
Hide resolved
...main/webapp/app/exercises/programming/manage/update/programming-exercise-update.component.ts
Outdated
Show resolved
Hide resolved
...main/webapp/app/exercises/programming/manage/update/programming-exercise-update.component.ts
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.
Code
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
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 TS1. works as described.
Should the warning be displayed when changing the checkoutPath?
@BBesrour I think for more complicated Build Jobs this could make sense. Regardless of this, it was initially implemented like this - I only removed the alert for creation and deletion 👍 |
Programming exercises
: Fix broken download button broken for auxiliary repositoriesProgramming exercises
: Fix broken download button for auxiliary repositories
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, no directory is created in LocalVC, but the DB is kept in sync and represents the changes. 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
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.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.
To solve the underlying problem, I added the functionality in the server to keep the filesystem in sync with the database when deleting and creating auxiliary repositories. The instructor can add and remove auxiliary repositories during both exercise creation and modification. Editing existing auxiliary repositories (e.g., changing the repo's name) is not supported and will still throw the error.
Discussion for further improvement
Currently, the
VersionControlService
-Interface does not offer the functionality to modify existing repositories. Systems like GitLab that were used in the past do not offer such functionality with Artemis as well. It could make sense to extend the LocalVC with editing functionality for auxiliary repos - currently, I'll prioritize more pressing issues and leave this for future work.Steps for Testing
Prerequisites:
Verify successful download on creation
Verify successful download on modification
Verify error alert when misconfiguring repositories
Verify error handling on misconfigured repositories
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