Skip to content

feat: optimize install grpc#1210

Merged
hwbrzzl merged 2 commits intomasterfrom
bowen/optimize-install-grpc
Sep 28, 2025
Merged

feat: optimize install grpc#1210
hwbrzzl merged 2 commits intomasterfrom
bowen/optimize-install-grpc

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Sep 28, 2025

📑 Description

Relate goravel/goravel#612

This pull request enhances the GRPC setup process by introducing a new Kernel stub for GRPC interceptors, improving how imports and registrations are managed, and ensuring consistency with the Schedule setup. The changes make it easier to customize GRPC middleware and streamline the code for adding and removing GRPC-related functionality.

GRPC Setup Improvements:

  • Added a new Kernel stub in grpc/setup/stubs.go that defines methods for global GRPC server and client interceptors, making it easier to customize middleware stacks.
  • Updated grpc/setup/setup.go to generate and manage the new kernel.go file, and improved handling of imports and registration/unregistration of GRPC service providers and interceptors in app_service_provider.go.
  • Included dynamic import path generation for GRPC and facades to ensure correct module references during setup and teardown.
  • Added fmt import to grpc/setup/setup.go to support dynamic string formatting for import paths.

Schedule Setup Consistency:

  • Fixed a minor issue in schedule/setup/setup.go by ensuring the correct usage of the Stubs struct when overwriting the schedule facade.
  • Removed unnecessary instantiation of the Stubs struct in schedule/setup/setup.go for consistency.
image

✅ Checks

  • Added test cases for my code

@hwbrzzl hwbrzzl requested a review from a team as a code owner September 28, 2025 10:19
Copilot AI review requested due to automatic review settings September 28, 2025 10:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the GRPC setup process by adding a new Kernel stub for managing interceptors and improving the consistency of setup/teardown operations. It also includes a minor fix to the Schedule setup for better code consistency.

  • Added new GRPC Kernel stub with methods for server and client interceptors
  • Enhanced GRPC setup to generate kernel.go file and manage interceptor registration
  • Fixed Schedule setup to use inline struct instantiation for consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
schedule/setup/setup.go Removes unnecessary variable declaration, uses inline struct instantiation
grpc/setup/stubs.go Adds new Kernel stub with interceptor methods for GRPC middleware
grpc/setup/setup.go Enhances setup to generate kernel.go and manage interceptor registration/unregistration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 28, 2025

Codecov Report

❌ Patch coverage is 2.73973% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.75%. Comparing base (1e241cd) to head (47366bc).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
grpc/setup/setup.go 0.00% 42 Missing ⚠️
grpc/setup/stubs.go 0.00% 28 Missing ⚠️
schedule/setup/setup.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1210      +/-   ##
==========================================
- Coverage   68.01%   67.75%   -0.26%     
==========================================
  Files         236      236              
  Lines       15424    15486      +62     
==========================================
+ Hits        10491    10493       +2     
- Misses       4568     4628      +60     
  Partials      365      365              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl merged commit e98cc2d into master Sep 28, 2025
12 of 14 checks passed
@hwbrzzl hwbrzzl deleted the bowen/optimize-install-grpc branch September 28, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants