-
Notifications
You must be signed in to change notification settings - Fork 276
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
Development
: Add client sided endpoints parser
#8580
base: develop
Are you sure you want to change the base?
Development
: Add client sided endpoints parser
#8580
Conversation
changed another file to test action
…ing-endpoint-connections' into development/github-action-analyzing-endpoint-connections
Co-authored-by: Lucas Welscher <ga53foy@mytum.de>
…of the head and base of a PR
Co-authored-by: Timor Morrien <timor.morrien@tum.de>
Co-authored-by: Timor Morrien <timor.morrien@tum.de>
Also, change a file containing endpoints and one not containing endpoints for testing.
…s' into development/parsing-of-server-sided-endpoints
…nt-sided-REST-api' into feature/development/parsing-client-sided-REST-api
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 LGTM and verified the testing steps
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 is a failing server test but I don't think it is related to your PR
testQuizSubmitNoDatabaseRequests(QuizMode) [1] quizMode=SYNCHRONIZED
There are no components on the server modified with this PR. |
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 LGTM
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.
Feedback in the code.
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Outdated
Show resolved
Hide resolved
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Outdated
Show resolved
Hide resolved
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Outdated
Show resolved
Hide resolved
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Outdated
Show resolved
Hide resolved
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Show resolved
Hide resolved
…nt-sided-REST-api' into feature/development/parsing-client-sided-REST-api
…nt-sided-REST-api' into feature/development/parsing-client-sided-REST-api
bca05fb
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: 2
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts
Show resolved
Hide resolved
.../analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.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.
Actionable comments posted: 0
Outside diff range comments (1)
src/main/webapp/app/course/tutorial-groups/services/tutorial-group-free-period.service.ts (1)
Line range hint
84-86
: Remove the redundant else clause to simplify the code.- } else { - return tutorialGroupFreePeriodDTO; - }
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: 2
Checklist
General
Pull Requests
Pull Requests related to the requested feature:
#8407
#8455
Context
The Proposed feature extends the GitHub Action originally created in this PR . The original PR focused on parsing information related to changed server endpoints, a crucial step in ensuring the accuracy of server-side interactions within the Artemis codebase. The proposed extension further enhances this functionality by introducing the parsing of client-sided REST calls. Currently, the focus is on extracting essential information such as the HTTP methods and URLs used in these calls. While the current scope is limited to parsing HTTP methods and URLs, this extension lays the groundwork for future enhancements aimed at improving code quality and development efficiency within the Artemis project.
Problem
Errors, like a mismatch in the URLs of REST calls and endpoints, slipping through the code review and testing process could break features and reduce a system's usability. The problem tackled in this issue is that reviewing client-sided REST calls manually is a time-consuming and error-prone task, potentially leading to:
Motivation
The motivation behind this feature is to simplify reviewing newly created or modified REST calls. The tedious task of manually parsing out relevant Information regarding a system's REST calls should be automated to increase the efficiency in the reviewing process
Requirements Engineering
Proposed System
The proposed solution is a GitHub action analyzing the client-sided REST calls on every commit. It should use the Library TypeScript Compiler API to build an abstract syntax tree (AST) representing the changed typescript files within each PR. The AST will be traversed and analyzed to identify instances of client-sided REST calls. When a REST call is detected, the system will extract relevant information such as the file path containing the REST call, the kind of REST call and the used URL.
Requirements
Functional requirements:
Non-functional requirements:
Analysis
Dynamic Behavior
The following model illustrates the currently flawed code review process. Developers develop a feature, open a PR, and get it reviewed by other developers. If a reviewer discovers one or more flaws in the code, they request changes. Those requested changes are then implemented by the developer, and the PR is re-reviewed. Once every reviewer has approved the PR, maintainers review the PR. If they discover flaws, they also request changes. If not, the PR gets merged. If errors remain undiscovered during the review process, they will now get merged into the codebase and reduce the system's usability.
Steps for Testing:
The check result of an up-to-date test commit can be found here: https://github.com/ls1intum/Artemis/actions/runs/9390475871/job/25860430538
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Code Review
Summary by CodeRabbit
New Features
Improvements
Chores