-
Notifications
You must be signed in to change notification settings - Fork 11
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 missing methods for partitions management #198
Draft
aneojgurhem
wants to merge
3
commits into
main
Choose a base branch
from
jg/partitions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ syntax = "proto3"; | |
|
||
package armonik.api.grpc.v1.partitions; | ||
|
||
import "objects.proto"; | ||
import "sort_direction.proto"; | ||
|
||
option csharp_namespace = "Armonik.Api.Grpc.V1.Partitions"; | ||
|
@@ -114,3 +115,82 @@ message GetPartitionRequest { | |
message GetPartitionResponse { | ||
PartitionRaw partition = 1; /** The raw partition. */ | ||
} | ||
|
||
/** | ||
* Request to update multiple partitions. | ||
* | ||
* Cannot update more than 30 partitions | ||
*/ | ||
message UpdatePartitionsRequest { | ||
/** | ||
* Represents the data of the partitions that will be updated. | ||
* | ||
* ID is mandatory. | ||
* -1 means that value will not be updated | ||
* value >= 0 means that it will be the new value | ||
*/ | ||
message PartitionUpdate { | ||
string id = 1; /** The ID of the partition that will be updated. */ | ||
int64 pod_reserved = 2; /** Whether the partition is reserved for pods. */ | ||
int64 pod_max = 3; /** The maximum number of pods that can be used by sessions using the partition. */ | ||
int64 preemption_percentage = 4; /** The percentage of the partition that can be preempted. */ | ||
int64 priority = 5; /** The priority of the partition. */ | ||
} | ||
|
||
repeated PartitionUpdate partitions = 1; /** The list of partitions to update. */ | ||
} | ||
|
||
/** | ||
* Response to update a partition. | ||
* | ||
* Return a list of raw partitions with the new values. | ||
*/ | ||
message UpdatePartitionsResponse { | ||
repeated PartitionRaw partitions = 1; /** The list of raw partitions. */ | ||
} | ||
|
||
/** | ||
* Request to delete partitions. | ||
* | ||
* If the ID is not found, it is ignored | ||
*/ | ||
message DeletePartitionsRequest { | ||
repeated string id = 1; /** The IDs of the partitions to delete. */ | ||
} | ||
|
||
/** | ||
* Response to delete partitions. | ||
*/ | ||
message DeletePartitionsResponse { | ||
Empty ok = 1; | ||
} | ||
|
||
/** | ||
* Request to create multiple partitions. | ||
* | ||
* Cannot create more than 30 partitions | ||
*/ | ||
message CreatePartitionsRequest { | ||
/** | ||
* Represents the data of the partitions that will be created. | ||
*/ | ||
message PartitionCreate { | ||
repeated string parent_partition_ids = 2; /** The parent partition IDs. */ | ||
int64 pod_reserved = 3; /** Whether the partition is reserved for pods. */ | ||
int64 pod_max = 4; /** The maximum number of pods that can be used by sessions using the partition. */ | ||
map<string, string> pod_configuration = 7; /** The pod configuration. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I remember, |
||
int64 preemption_percentage = 5; /** The percentage of the partition that can be preempted. */ | ||
int64 priority = 6; /** The priority of the partition. */ | ||
} | ||
|
||
repeated PartitionCreate partitions = 1; /** The list of partitions to create. */ | ||
} | ||
|
||
/** | ||
* Response to create a partitions. | ||
* | ||
* Return a list of raw partitions with the given values. | ||
*/ | ||
message CreatePartitionsResponse { | ||
repeated PartitionRaw partitions = 1; /** The list of raw partitions. */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
I would just say negative instead of specifically -1.
The problem is that in protobuf, if a value is missing, it is set to 0...
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.
Ok.
But 0 is a valid number for our use case...