feat: add ReschedulePeerFailedRequest and ReschedulePersistentCachePeerFailedRequest #448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request includes several changes focused on adding validation for new message types related to peer rescheduling in the scheduler API. The changes span multiple files and include updates to the protobuf definitions, validation logic, and corresponding Rust structures.
Protobuf Definitions and Validation Logic:
Added
ReschedulePeerFailedRequest
andReschedulePersistentCachePeerFailedRequest
message types to the protobuf definitions for bothAnnouncePeerRequest
andAnnouncePersistentCachePeerRequest
. These new message types include adescription
field with a minimum length validation rule. [1] [2] [3] [4] [5] [6] [7] [8]Implemented validation methods
Validate
andValidateAll
for the new message typesReschedulePeerFailedRequest
andReschedulePersistentCachePeerFailedRequest
in thescheduler.pb.validate.go
file. These methods ensure that thedescription
field meets the specified constraints. [1] [2]Updated the validation logic for
AnnouncePeerRequest
andAnnouncePersistentCachePeerRequest
to include the new message types, ensuring that the validation methods are called appropriately. [1] [2]Rust Structures:
Added new Rust structures
ReschedulePeerFailedRequest
andReschedulePersistentCachePeerFailedRequest
to represent the new message types in the scheduler API. These structures include adescription
field. [1] [2]Updated the Rust structures
AnnouncePeerRequest
andAnnouncePersistentCachePeerRequest
to include the new message types in theirRequest
enums. [1] [2] [3] [4]Version Update:
dragonfly-api
package from2.1.10
to2.1.11
in theCargo.toml
file.Related Issue
Motivation and Context