Skip to content

refactor(proto): replace google.protobuf.Empty#6

Merged
faizanazim11 merged 1 commit intomasterfrom
fix/proto-imports
Oct 16, 2025
Merged

refactor(proto): replace google.protobuf.Empty#6
faizanazim11 merged 1 commit intomasterfrom
fix/proto-imports

Conversation

@faizanazim11
Copy link
Copy Markdown
Contributor

This pull request updates the gRPC RefreshService API to remove its dependency on google.protobuf.Empty and instead use a custom RefreshResponse message. This change simplifies the codebase, eliminates reliance on external proto files, and ensures all Python code uses absolute imports for generated protobuf modules. The update also bumps the package version to 0.1.4.

API and Protobuf Changes

  • Removed the use of google.protobuf.Empty by deleting protos/google/protobuf/empty.proto and updating protos/refresh.proto to define and use a custom RefreshResponse message for the RefreshToken RPC. [1] [2]
  • Regenerated refresh_pb2.py and refresh_pb2_grpc.py to reflect the new response type, updating all serialization/deserialization logic and ensuring absolute imports for generated modules. [1] [2] [3] [4] [5]

Python Implementation Updates

  • Updated refresh_handler.py to return RefreshResponse() instead of empty_pb2.Empty() and removed the import of empty_pb2. [1] [2] [3]

Documentation

  • Updated .github/copilot-instructions.md to clarify environment setup, gRPC code generation steps, the need for absolute imports, and the removal of external proto dependencies. [1] [2]

Package Version

  • Bumped the package version in pyproject.toml from 0.1.3 to 0.1.4 to reflect these API and implementation changes.

Copilot AI review requested due to automatic review settings October 16, 2025 18:37
Copy link
Copy Markdown
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 pull request refactors the gRPC RefreshService API to remove dependency on google.protobuf.Empty and instead use a custom RefreshResponse message. This simplifies the codebase by eliminating external proto dependencies and ensures all Python code uses absolute imports for generated protobuf modules.

  • Replaced google.protobuf.Empty with custom RefreshResponse message in protobuf definitions
  • Updated all generated gRPC code to use the new response type and absolute imports
  • Removed external protobuf dependency file and updated implementation code accordingly

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
protos/refresh.proto Added custom RefreshResponse message and removed google.protobuf.Empty import
protos/google/protobuf/empty.proto Removed external protobuf dependency file
src/tp_auth_serverside/pb/refresh_pb2.py Regenerated protobuf classes with new RefreshResponse message
src/tp_auth_serverside/pb/refresh_pb2_grpc.py Updated gRPC service stubs to use RefreshResponse and absolute imports
src/tp_auth_serverside/core/handler/refresh_handler.py Updated to return RefreshResponse instead of Empty and fixed imports
pyproject.toml Bumped version to 0.1.4
.github/copilot-instructions.md Updated documentation with environment setup and gRPC generation notes

@faizanazim11 faizanazim11 merged commit a5a6218 into master Oct 16, 2025
1 check passed
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