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

Update protoc and mockery #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update protoc and mockery #107

wants to merge 2 commits into from

Conversation

rodneyosodo
Copy link
Contributor

…pc files, and creating SSL certificates. Also, made version changes for protoc and PostgreSQL, updated code comments, and generated SDK mocks.

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Dependency Update

Related Tickets & Documents

  • Related Issue #
  • Closes #

Added/updated tests?

  • Yes
  • No, and this is why:
  • I need help with writing tests

Added/updated documentation

  • Yes
  • No, and this is why:
  • I need help with writing documentation

Notes

…pc files, and creating SSL certificates. Also, made version changes for protoc and PostgreSQL, updated code comments, and generated SDK mocks.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Copy link

coderabbitai bot commented Feb 17, 2024

Warning

Rate Limit Exceeded

@rodneyosodo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 32 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 9b77b13 and 9339786.

Walkthrough

The recent updates focus on improving testing and code generation across the project. Key changes include updating the mockery tool version for better mock generation, refining test configurations to exclude certain packages from test coverage, and updating the PostgreSQL version for database tests. Additionally, there's a specific enhancement in gRPC proto definitions and an emphasis on code maintainability through the addition of copyright notices.

Changes

File(s) Change Summary
Makefile Updated mockery version to v2.42.0, refined go test command, and adjusted proto target.
pkg/.../database/postgres/database_test.go Updated PostgreSQL container version to "16.1-alpine".
pkg/mpesa/mocks/SDK.go, pkg/mpesa/sdk.go Updated code generation tool version to v2.42.0, added copyright notice, and enhanced mock gen.

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1315834 and 9b77b13.
Files ignored due to path filters (4)
  • grpc/overlay.pb.go is excluded by: !**/*.pb.go
  • grpc/overlay_grpc.pb.go is excluded by: !**/*.pb.go
  • grpc/requests.pb.go is excluded by: !**/*.pb.go
  • grpc/responses.pb.go is excluded by: !**/*.pb.go
Files selected for processing (4)
  • Makefile (2 hunks)
  • pkg/mpesa/middleware/database/postgres/database_test.go (1 hunks)
  • pkg/mpesa/mocks/SDK.go (1 hunks)
  • pkg/mpesa/sdk.go (1 hunks)
Additional comments: 8
Makefile (3)
  • 85-85: The update of mockery to v2.42.0 is correctly implemented with the go install command. This ensures that the specified version of mockery is used for generating mocks, aligning with the PR objectives.
  • 87-87: The modification to the go test command to exclude specific packages (example|cmd|cli|mocks) from test coverage is a good practice. It focuses test coverage on the most relevant parts of the codebase. However, ensure that all necessary packages are included in the tests and that no critical package is inadvertently excluded.
  • 105-105: Adjustments in the proto target for grpc/responses.proto are mentioned, but the specific changes are not visible in the provided code snippet. It's important to ensure that these adjustments are consistent with the project's gRPC schema requirements and do not introduce any breaking changes.
pkg/mpesa/mocks/SDK.go (2)
  • 1-1: The update to the code generation tool version (mockery v2.42.0) in the file header is correctly documented. This aligns with the PR's objective of updating tool versions and ensures consistency in the generated mocks.
  • 3-3: Adding a copyright notice for MpesaOverlay at the top of the file is a good practice for copyright management. It helps clarify the ownership and licensing of the generated code, aligning with legal and copyright considerations.
pkg/mpesa/middleware/database/postgres/database_test.go (1)
  • 46-46: The PostgreSQL container version has been updated from "15.1-alpine" to "16.1-alpine". This is a good practice to keep dependencies up-to-date. However, ensure that this version is compatible with the rest of your project's dependencies and that all tests pass with this new version.
pkg/mpesa/sdk.go (2)
  • 56-56: The updated go:generate mockery directive now includes several new options: specifying an output directory (--output=./mocks), filename customization (--filename SDK.go), and quiet mode operation (--quiet). Additionally, a copyright notice is appended as a comment (--note "Copyright (c) MpesaOverlay. All rights reserved."). These changes enhance the mock generation process by providing more control over the output and reducing noise during generation. However, ensure that the specified output directory (./mocks) exists or is created as part of the build process to avoid any issues with mock generation.
  • 53-59: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

The file starts with a copyright notice, which is a good practice for protecting intellectual property and ensuring compliance with licensing requirements. This aligns with the PR's objectives of adding copyright notices to the codebase.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
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.

None yet

1 participant