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

feat: add ReschedulePeerFailedRequest and ReschedulePersistentCachePeerFailedRequest #448

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

gaius-qi
Copy link
Member

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 and ReschedulePersistentCachePeerFailedRequest message types to the protobuf definitions for both AnnouncePeerRequest and AnnouncePersistentCachePeerRequest. These new message types include a description field with a minimum length validation rule. [1] [2] [3] [4] [5] [6] [7] [8]

  • Implemented validation methods Validate and ValidateAll for the new message types ReschedulePeerFailedRequest and ReschedulePersistentCachePeerFailedRequest in the scheduler.pb.validate.go file. These methods ensure that the description field meets the specified constraints. [1] [2]

  • Updated the validation logic for AnnouncePeerRequest and AnnouncePersistentCachePeerRequest to include the new message types, ensuring that the validation methods are called appropriately. [1] [2]

Rust Structures:

  • Added new Rust structures ReschedulePeerFailedRequest and ReschedulePersistentCachePeerFailedRequest to represent the new message types in the scheduler API. These structures include a description field. [1] [2]

  • Updated the Rust structures AnnouncePeerRequest and AnnouncePersistentCachePeerRequest to include the new message types in their Request enums. [1] [2] [3] [4]

Version Update:

  • Incremented the version of the dragonfly-api package from 2.1.10 to 2.1.11 in the Cargo.toml file.

Related Issue

Motivation and Context

@gaius-qi gaius-qi added the enhancement New feature or request label Jan 21, 2025
@gaius-qi gaius-qi self-assigned this Jan 21, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner January 21, 2025 04:35
@gaius-qi gaius-qi merged commit 214460f into main Jan 21, 2025
6 checks passed
@gaius-qi gaius-qi deleted the feature/reschedule branch January 21, 2025 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant