-
Notifications
You must be signed in to change notification settings - Fork 0
grpc #2
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
base: main
Are you sure you want to change the base?
grpc #2
Conversation
Replaced `UserResource` with gRPC-based DTOs and responses for user-related operations. Introduced gRPC DTOs like `AuthenticateGrpcDTO`, `BaseGrpcDTO`, and others for better structure and maintainability. Enhanced user operations with protocol buffer-generated request and response classes for authentication, user management, and password handling.
Eliminated gRPC and protobuf dependencies, configurations, and related scripts from the Dockerfile. Streamlined PHP extension installation, reduced complexity by removing supervisor and non-essential build steps, and optimized Laravel startup for Swoole.
Reintroduced gRPC and protobuf dependencies in Dockerfile with corresponding installations and configurations. Enhanced the build process
…ervice integration Added `GrpcTransformer` to simplify and standardize transformation of gRPC DTOs to arrays. Updated `UserGrpcService` to utilize `GrpcTransformer` methods for better maintainability. Included metadata handling for gRPC requests with authorization bearer token support. Upgraded dependencies in `composer.lock` for compatibility.
…enhanced gRPC implementation Eliminated Redis-related configurations and extensions across the app, including `.env`, `php.ini`, and Laravel config files (`cache.php`, `queue.php`, `database.php`). Migrated User API operations to leverage `UserGrpcService` with support for gRPC-based DTO transformations. Updated services and controllers accordingly for consistency and maintainability.
Replaced Redis-based configurations and dependencies with gRPC-driven `UserGrpcService` across controllers and services. Updated Docker configurations to streamline environment setup by eliminating Redis references.
…gRPC response handling and update related controllers and services accordingly
… response, and metadata handling
…r handling, and update method calls for `GetUserProfile` and `GetUser` operations
…r consistency with protobuf field definition
…d enhance error handling in `UserGrpcService`
…rProfile` method, clean up commented code, and adjust Dockerfile for pending gRPC setup.
…P classes Added `GatewayService` protobuf definitions in `apigw.proto`. Generated corresponding PHP classes including `FlexibleRequest`, `FlexibleResponse`, `BytesRequest`, `BytesResponse`, and `ErrorInfo`. Implemented `Apigw` initializer for descriptor pool setup.
…ce` in controllers, enhance `GatewayService` for optimized gRPC client handling, and improve error reporting for downstream services.
…up operations, simplify gRPC client creation in `GatewayService`, and enhance error handling and response formatting
…update `GrpcService` error handling for consistency, and streamline `UserApiController` to proxy requests directly through `GrpcService`.
…treamline `UserApiController` to directly proxy requests through `GrpcService`.
…dling, response consistency, and error reporting; streamline `UserApiController` by removing redundant logic.
…` operation, remove HTTP-based logic, and streamline `UserApiController` by eliminating `UserGrpcService` and `UserService` dependencies.
…rpcService` for `index`, `remove`, and `clear` operations, streamlining request handling and improving consistency.
…rvice`, removing redundant logic for improved consistency and simplicity.
…rvice` for request handling, remove redundant HTTP-based logic, streamline Laravel Octane setup with updated Swoole configuration, and adjust Docker and Supervisor integration for improved reliability.
…input by reference; update controllers and services to align with the change for improved consistency and readability.
…streamline Dockerfile by switching to Debian-based image, simplifying package installation layers, optimizing PHP extension installation, and enhancing gRPC configuration for improved maintainability.
…r clearing all wishlist items
…ing, error reporting, and data inclusion; remove unused `Iterator` dependency and deprecate streaming request logic for better maintainability.
…onvention and add `purchaseHistory` method to `OrderApiController` for retrieving purchase history.
…on` and `composer.lock`, and clean up `cache.php` to remove Octane-specific cache driver configuration.
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.
Pull Request Overview
This PR integrates gRPC support into the application by adding generated protocol buffer classes, DTOs for user and service responses, and updates to the Dockerfile and external API services to support gRPC functionality.
- Added generated gRPC classes (e.g. FlexibleResponse, FlexibleRequest, ErrorInfo, BytesResponse, BytesRequest) and DTOs for user-related responses.
- Modified the external API service methods for user ID injection.
- Updated the Dockerfile to install additional dependencies and configure gRPC support.
Reviewed Changes
Copilot reviewed 86 out of 86 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/Grpc/Gateway/Apigw.php | Adds generated gateway class from protocol buffer source |
| app/Grpc/GPBMetadata/User/UserService.php | Adds generated metadata for the user service |
| app/Grpc/FlexibleResponse.php | Adds generated flexible response message |
| app/Grpc/FlexibleRequest.php | Adds generated flexible request message |
| app/Grpc/ErrorInfo.php | Adds generated error information class |
| app/Grpc/DTOs/User/ValidateTokenGrpcDTO.php | Adds DTO for token validation responses |
| app/Grpc/DTOs/User/UserProfileGrpcDTO.php | Adds DTO for user profile responses with optional cart items |
| app/Grpc/DTOs/User/UserListGrpcDTO.php | Adds DTO for user list with pagination details |
| app/Grpc/DTOs/User/UserGrpcDTO.php | Adds DTO for single user responses |
| app/Grpc/DTOs/User/SimpleResponseGrpcDTO.php | Adds generic DTO for simple success/failure responses |
| app/Grpc/DTOs/User/RefreshTokenGrpcDTO.php | Adds DTO for token refresh responses |
| app/Grpc/DTOs/User/AuthenticateGrpcDTO.php | Adds DTO for authentication responses |
| app/Grpc/DTOs/BaseGrpcDTO.php | Introduces a base class for all gRPC DTOs |
| app/Grpc/BytesResponse.php | Adds generated bytes response message |
| app/Grpc/BytesRequest.php | Adds generated bytes request message |
| app/Grpc/BaseResponse.php | Introduces a base response structure for gRPC-related responses |
| app/External_Apis/Services/ProductService.php | Modifies user ID injection call in the product service |
| app/External_Apis/Services/OfferService.php | Modifies user ID injection call in the offer service |
| Dockerfile | Updates dependencies, introduces additional tools, and refines PHP configuration for gRPC support |
| .env.example | Removes Redis-specific configuration |
Comments suppressed due to low confidence (2)
app/External_Apis/Services/ProductService.php:33
- The change from passing the data array by reference with injectUserId($data) to appending the returned user ID may affect how the repository processes the input. Confirm that the new approach correctly meets the expected input structure for getAll().
$data[] = $this->injectUserId();
app/External_Apis/Services/OfferService.php:31
- Changing the method call from injectUserId($data) to appending the injected value may alter the expected data format. Verify that the modified behavior is intentional and is properly handled downstream.
$data[] = $this->injectUserId();
…roller::getRecommendedProducts` for fetching recommended products, update routes and environment variables for AI service integration, and enhance `docker-compose.yml` configuration.
No description provided.