-
Notifications
You must be signed in to change notification settings - Fork 303
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
Development
: Add client sided endpoints parser
#8580
Conversation
…ing-endpoint-connections' into development/github-action-analyzing-endpoint-connections
Co-authored-by: Lucas Welscher <[email protected]>
…of the head and base of a PR
Co-authored-by: Timor Morrien <[email protected]>
Co-authored-by: Timor Morrien <[email protected]>
Also, change a file containing endpoints and one not containing endpoints for testing.
…s' into development/parsing-of-server-sided-endpoints
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.
LGTM after Feedback changes :)
03725c8
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: 9
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.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.
Reapprove
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.
Reapprove
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 Looks good. Thanks for the changes
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.
reapprove
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.
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts
Show resolved
Hide resolved
supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.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.
Reapprove, changes look good!
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.
LGTM. Please add the requested follow-up changes asap
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/10125390211. On that page, the result can be downloaded in a .json file.
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
Summary by CodeRabbit
New Features
Chores
package.json
for better dependency management.