-
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
: Enable different base URLs for interacting with git repositories
#10319
Programming exercises
: Enable different base URLs for interacting with git repositories
#10319
Conversation
WalkthroughThis change modifies the implementation of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 PMD (7.8.0)src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCServletService.java[ERROR] Error at ruleset.xml:58:5 59| 67| 72| 76| 79| 80| 82| 83| 84| 85| 86| 87| 88| 91| 92| 107| 120| 125| 135| 138| 185| ✨ Finishing Touches
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 0
🧹 Nitpick comments (1)
src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCServletService.java (1)
427-430
: LGTM! Consider using URL manipulation methods.The changes look good and align with modern Java practices. The use of
var
improves readability, and usingPath
is appropriate for file system operations.Consider using URL manipulation methods instead of string replacement for better URL handling:
- var urlString = request.getRequestURL().toString().replace("/info/refs", ""); + var requestUrl = request.getRequestURL(); + var urlString = requestUrl.substring(0, requestUrl.length() - "/info/refs".length());
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCServletService.java
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/java/**/*.java`: naming:CamelCase; principles:{sin...
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCServletService.java
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Call Build Workflow / Build and Push Docker Image
- GitHub Check: Call Build Workflow / Build .war artifact
- GitHub Check: server-tests
- GitHub Check: server-style
- GitHub Check: client-style
- GitHub Check: client-tests
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Analyse
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
Programming exercises
: Allow deprecated base URLs for interacting with LocalVCProgramming exercises
: Enable different base URLs for interacting with git repositories
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
Some students tried to interact with LocalVC via the deprecated
cit.tum.de
URL. This does not work, as the server can't find the participation as it is looked up by this URL.Description
Adds a quick fix which makes the interaction with LocalVC independent of the baseURL, and simply uses the servers baseURL.
At a future point this should be extended, and the participation lookup should be independent of the used base URL. See #10318.
Steps for Testing
/etc/hosts
file for alternatives to localhost.localhost:8080
, and try to clone via e.g.localhost4:8080
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
Manual Tests
Screenshots
Usual clone:
![image](https://private-user-images.githubusercontent.com/33342534/412815246-3a0cfce0-5854-4acc-afde-01a370e64504.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzA5MzYsIm5iZiI6MTczOTYzMDYzNiwicGF0aCI6Ii8zMzM0MjUzNC80MTI4MTUyNDYtM2EwY2ZjZTAtNTg1NC00YWNjLWFmZGUtMDFhMzcwZTY0NTA0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0NDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3ZTEwZWQzZjE2MTQ5YTU5ZWZlNTBkZGQ2YTM2YzQzNjA0Y2RjNTk3NTIzYmM1ZTBhMzQ2ZjkzNWVkYzNlNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7ViMVHp2iew1RNL7hLOrQJ9DnQ5bzs7v0XhuuDd1UIA)
![image](https://private-user-images.githubusercontent.com/33342534/412815107-9ac9fb33-42a6-4406-8be2-3dc2e47f69a2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzA5MzYsIm5iZiI6MTczOTYzMDYzNiwicGF0aCI6Ii8zMzM0MjUzNC80MTI4MTUxMDctOWFjOWZiMzMtNDJhNi00NDA2LThiZTItM2RjMmU0N2Y2OWEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE0NDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJlODAwZWE5NjkzY2QzZjg0ZjgzN2Y0N2FjY2MyODMwNGM1ZDA5ZTQwOGIyZjY5Y2JmNTMyMDMwMmM3NGFhMDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.O9K6sljQe-Yhpg8t0Q6rlfdHcPaguczjHQ4WNNAAAuc)
Manually changed localhost to localhost4: (this does not work on develop)