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

Fix all remaining logs in dpu, along with some other minor fixes #173

Merged
merged 1 commit into from
May 16, 2024

Conversation

tapishr
Copy link
Member

@tapishr tapishr commented May 15, 2024

Please check the action items covered in the PR -

  • Build is running
  • Eventing is functional and tested
  • Unit or integration tests added and running
  • Manual QA

@tapishr tapishr requested a review from MuskanPaliwal May 15, 2024 15:09
@tapishr tapishr self-assigned this May 15, 2024
Copy link

vibinex-dpu bot commented May 15, 2024

Relevant users for this PR:

Contributor Name/Alias Relevance
tapishr 76.92%
MuskanPaliwal 23.08%

Auto assigning to relevant reviewers.

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at contact@vibinex.com.

To change comment and auto-assign settings, go to your Vibinex settings page.

Copy link
Contributor

coderabbitai bot commented May 15, 2024

Walkthrough

The recent updates to the vibi-dpu project primarily focus on enhancing logging practices and refining function parameters for better clarity and debugging. Key changes include the addition and modification of log messages, adjustments to log levels, and updates to function signatures to improve the maintainability and traceability of the codebase. These changes ensure more detailed and consistent logging across various modules, aiding in easier debugging and monitoring.

Changes

File(s) Change Summary
vibi-dpu/src/bitbucket/auth.rs Added a log message for updating expired authentication information in update_access_token function.
vibi-dpu/src/core/approval.rs Updated log message in process_approval function to include more information about comment settings.
vibi-dpu/src/core/bitbucket/setup.rs Changed log levels from info to debug for open pull requests processing and updated log messages for webhook additions.
vibi-dpu/src/core/github/comment.rs Replaced a println! statement with a log::debug! statement in the add_comment function for better logging.
vibi-dpu/src/core/relevance.rs Added and modified logging statements for processing relevance and inserting comments, and adjusted log levels.
vibi-dpu/src/core/review.rs Updated log messages for clarity and added a log message for processing code changes.
vibi-dpu/src/core/trigger.rs Updated imports and function parameters to use pr_info_opt instead of access_token in process_trigger and get_review_obj.
vibi-dpu/src/db/hunk.rs Changed log levels from info to debug for messages related to storing hunkmap data in the database.
vibi-dpu/src/db/prs.rs Added logging statements for processing approved PR events and for unrecognized PR events in github_process_and_update_pr_if_different function.
vibi-dpu/src/github/auth.rs Updated log levels from debug to error for messages related to environment variable lengths in pat_access_token function.
vibi-dpu/src/github/prs.rs Added import for ProviderEnum and modified argument passed to update_pr_info_in_db to use a method call on ProviderEnum.
vibi-dpu/src/pubsub/listener.rs Added logging messages before and after processing the trigger in process_message function.
vibi-dpu/src/utils/coverage.rs Changed log level from info to debug for a log message related to provider_id.
vibi-dpu/src/utils/pr_info.rs Added the Clone trait to the PrInfo struct.

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.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@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: 6

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 5891af5 and 46ba3cb.
Files selected for processing (14)
  • vibi-dpu/src/bitbucket/auth.rs (1 hunks)
  • vibi-dpu/src/core/approval.rs (1 hunks)
  • vibi-dpu/src/core/bitbucket/setup.rs (5 hunks)
  • vibi-dpu/src/core/github/comment.rs (1 hunks)
  • vibi-dpu/src/core/relevance.rs (4 hunks)
  • vibi-dpu/src/core/review.rs (4 hunks)
  • vibi-dpu/src/core/trigger.rs (4 hunks)
  • vibi-dpu/src/db/hunk.rs (1 hunks)
  • vibi-dpu/src/db/prs.rs (3 hunks)
  • vibi-dpu/src/github/auth.rs (2 hunks)
  • vibi-dpu/src/github/prs.rs (2 hunks)
  • vibi-dpu/src/pubsub/listener.rs (1 hunks)
  • vibi-dpu/src/utils/coverage.rs (1 hunks)
  • vibi-dpu/src/utils/pr_info.rs (1 hunks)
Files skipped from review due to trivial changes (6)
  • vibi-dpu/src/bitbucket/auth.rs
  • vibi-dpu/src/core/approval.rs
  • vibi-dpu/src/core/bitbucket/setup.rs
  • vibi-dpu/src/core/github/comment.rs
  • vibi-dpu/src/core/review.rs
  • vibi-dpu/src/utils/coverage.rs
Additional comments not posted (19)
vibi-dpu/src/utils/pr_info.rs (1)

3-3: Adding the Clone trait to PrInfo is a good enhancement for usability.

vibi-dpu/src/db/hunk.rs (2)

34-34: Changing the log level to debug for detailed logging is appropriate.


37-37: Changing the log level to debug for detailed logging is appropriate.

vibi-dpu/src/core/trigger.rs (4)

22-22: The log message provides useful information about the PR being processed.


42-42: The parameter change to use pr_info_opt instead of access_token improves clarity and functionality.


99-99: The parameter change to use pr_info_opt instead of access_token improves clarity and functionality.


104-104: The parameter change to use pr_info_opt instead of access_token improves clarity and functionality.

vibi-dpu/src/github/prs.rs (3)

128-129: Using a method call on ProviderEnum instead of a hardcoded string improves code maintainability and readability.


Line range hint 139-139: The log message provides useful information about the PR event being processed.


Line range hint 149-149: The log message provides useful information about unrecognized PR events.

vibi-dpu/src/db/prs.rs (3)

127-128: Using a method call on ProviderEnum instead of a hardcoded string improves code maintainability and readability.


139-139: The log message provides useful information about the PR event being processed.


149-149: The log message provides useful information about unrecognized PR events.

vibi-dpu/src/pubsub/listener.rs (2)

54-54: The log message provides useful information about the processing of triggers.


56-56: The log message provides useful information about the processing of triggers.

vibi-dpu/src/core/relevance.rs (4)

10-11: The log level change from info to debug for the message "Process relevance for PR" is appropriate for reducing log verbosity.


55-55: The log level change from info to debug for the message "No review record found in db, inserting comment" is appropriate for reducing log verbosity.


61-61: The log level change from info to debug for the message "No relevance found in db, inserting comment" is appropriate for reducing log verbosity.


200-200: The log level change from info to debug for the message "provider_id" is appropriate for reducing log verbosity.

vibi-dpu/src/github/auth.rs Show resolved Hide resolved
vibi-dpu/src/github/auth.rs Show resolved Hide resolved
vibi-dpu/src/core/relevance.rs Show resolved Hide resolved
vibi-dpu/src/core/relevance.rs Show resolved Hide resolved
vibi-dpu/src/core/relevance.rs Show resolved Hide resolved
vibi-dpu/src/core/relevance.rs Show resolved Hide resolved
Copy link

vibinex-dpu bot commented May 16, 2024

Relevant users for this PR:

Contributor Name/Alias Relevance Approval
tapishr 76.92%
MuskanPaliwal 23.08%

Total Coverage for PR: 23.08%

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at contact@vibinex.com.

To change comment and auto-assign settings, go to your Vibinex repository settings page.

@tapishr tapishr merged commit 048c2b0 into main May 16, 2024
2 checks passed
@tapishr tapishr deleted the tr/fix/ghLogs branch May 16, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants