Skip to content
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: Improve endpoint analysis #9236

Merged
merged 11 commits into from
Aug 31, 2024

Conversation

Jan-Thurner
Copy link
Contributor

@Jan-Thurner Jan-Thurner commented Aug 20, 2024

Checklist

General

Motivation and Context

The current implementation of the analysis of REST calls and Endpoints was inconsistent in a few places

Description

This PR implements the follow-up changes requested in the previous PR. It also enables REST calls that start with a redundant / to be assigned to the correct Endpoints.

Steps for Testing

Prerequisites:

  • review the code
  • review the action's output. An up-to-date run of the action can be found here. If you want to run the action again, it can be triggered manually right here.

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

Code Review

  • Code Review 1
  • Code Review 2
  • Code Review 3
  • Code Review 4

Summary by CodeRabbit

  • New Features

    • Enhanced clarity in file handling by updating terminology from fileName to filePath across various components.
    • Improved endpoint analysis accuracy with refined matching logic for REST calls.
  • Bug Fixes

    • Ensured consistent URI formatting in REST call comparisons.
  • Refactor

    • Renamed variables and constants for better semantic meaning and maintainability.
    • Streamlined logging mechanism for improved readability.
  • Chores

    • Optimized workflow execution conditions by refining triggers for GitHub Actions.

@Jan-Thurner Jan-Thurner changed the title Feature/development/improve endpoint analysis development: improve endpoint analysis Aug 20, 2024
@Jan-Thurner Jan-Thurner changed the title development: improve endpoint analysis development: Improve endpoint analysis Aug 20, 2024
@Jan-Thurner Jan-Thurner changed the title development: Improve endpoint analysis Development: Improve endpoint analysis Aug 20, 2024
@Jan-Thurner Jan-Thurner marked this pull request as ready for review August 20, 2024 16:34
@Jan-Thurner Jan-Thurner requested a review from a team as a code owner August 20, 2024 16:34
Copy link

coderabbitai bot commented Aug 20, 2024

Walkthrough

The recent changes enhance the GitHub Actions workflow for analyzing endpoint connections by refining its triggering conditions and restricting execution to relevant code paths. In addition, code clarity is improved across various Java and TypeScript files through standardized variable names and updated data structures, particularly in relation to handling REST call information. These modifications aim to optimize both functionality and maintainability of the codebase.

Changes

File Path Change Summary
.github/workflows/.../analysis-of-endpoint-connections.yml Modified triggering conditions to pull_request with specific types. Limited execution to relevant paths (src/main/java/**, src/main/webapp/**). Renamed JDK setup steps.
.../EndpointAnalyzer.java, .../EndpointParser.java, .../RestCallAnalyzer.java Renamed logging variable from logger to log for consistency across classes.
.../EndpointInformation.java, .../RestCallInformation.java Renamed field URI to uri and parameter fileName to filePath for naming convention consistency; updated method references accordingly.
.../RestCallFileInformation.java Changed parameters from String fileName to String filePath and from RestCallInformation[] to List<RestCallInformation>, improving flexibility.
.../Postprocessor.ts Replaced fileName with filePath in multiple locations for clarity and consistency in handling file paths.

Possibly related issues

  • Implement Parsing out REST Calls on the Client #8515: This PR addresses the requirement to automate the review of client-sided REST calls, which aligns with the proposed GitHub Action for analyzing these calls, thus enhancing the review process and reducing manual errors.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

Copy link
Contributor

@pzdr7 pzdr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments on the code

Copy link

@coderabbitai coderabbitai bot left a 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

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 21, 2024
Copy link

@coderabbitai coderabbitai bot left a 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

Copy link
Contributor

@pzdr7 pzdr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link
Contributor

@az108 az108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM after the changes. I also tested it manually in the workflow on the develop branch.

Copy link
Contributor

@JohannesStoehr JohannesStoehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link
Contributor

@JohannesWt JohannesWt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code 👍

Copy link
Contributor

@dmytropolityka dmytropolityka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link
Contributor

@MarkusPaulsen MarkusPaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some incorrectly labeled endpoints (e.g. GET https://artemis.ase.in.tum.de/api/public/imprint, which is labeled as unusedEndpoint, although it is used on https://artemis.ase.cit.tum.de/imprint). Nevertheless for this PR, the code looks good and the analysis files are generated.

@Jan-Thurner Jan-Thurner added the maintainer-approved The feature maintainer has approved the PR label Aug 27, 2024
@bassner bassner added this to the 7.5.1 milestone Aug 31, 2024
@bassner bassner merged commit b19db0b into develop Aug 31, 2024
18 of 23 checks passed
@bassner bassner deleted the feature/development/improveEndpointAnalysis branch August 31, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-approved The feature maintainer has approved the PR ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants