forked from restatedev/sdk-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests to provision 3 nodes cluster tests with a replicated log…
…let with replication property 2 This commit adds the NodeCtl grpc svc to the repo to generate a grpc client to manually provision a replicated loglet with a replciation property 2. W/o manually provisioning the cluster, the replication property defaults to 1. Note: Whenever the *.proto files change in the restate repo, they need to be updated in this repository as well if there is an incompatible change. This fixes restatedev#26.
- Loading branch information
1 parent
05346b1
commit 033cf50
Showing
9 changed files
with
554 additions
and
10 deletions.
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH | ||
// | ||
// This file is part of the Restate service protocol, which is | ||
// released under the MIT license. | ||
// | ||
// You can find a copy of the license in file LICENSE in the root | ||
// directory of this repository or package, or at | ||
// https://github.com/restatedev/proto/blob/main/LICENSE | ||
|
||
syntax = "proto3"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "restate/cluster.proto"; | ||
import "restate/common.proto"; | ||
import "restate/node.proto"; | ||
|
||
package restate.node_ctl_svc; | ||
|
||
service NodeCtlSvc { | ||
// Get identity information from this node. | ||
rpc GetIdent(google.protobuf.Empty) returns (IdentResponse); | ||
|
||
rpc GetMetadata(GetMetadataRequest) returns (GetMetadataResponse); | ||
|
||
// Provision the Restate cluster on this node. | ||
rpc ProvisionCluster(ProvisionClusterRequest) returns (ProvisionClusterResponse); | ||
} | ||
|
||
message ProvisionClusterRequest { | ||
bool dry_run = 1; | ||
optional uint32 num_partitions = 2; | ||
optional restate.cluster.ReplicationStrategy placement_strategy = 3; | ||
optional restate.cluster.DefaultProvider log_provider = 4; | ||
} | ||
|
||
enum ProvisionClusterResponseKind { | ||
ProvisionClusterResponseType_UNKNOWN = 0; | ||
DRY_RUN = 1; | ||
NEWLY_PROVISIONED = 2; | ||
ALREADY_PROVISIONED = 3; | ||
} | ||
|
||
message ProvisionClusterResponse { | ||
ProvisionClusterResponseKind kind = 1; | ||
// This field will be empty if the cluster is already provisioned | ||
optional restate.cluster.ClusterConfiguration cluster_configuration = 3; | ||
} | ||
|
||
message IdentResponse { | ||
restate.common.NodeStatus status = 1; | ||
restate.common.NodeId node_id = 2; | ||
string cluster_name = 3; | ||
// indicates which roles are enabled on this node | ||
repeated string roles = 4; | ||
// Age of the running node in seconds (how many seconds since the daemon | ||
// started) | ||
uint64 age_s = 5; | ||
restate.common.AdminStatus admin_status = 6; | ||
restate.common.WorkerStatus worker_status = 7; | ||
restate.common.LogServerStatus log_server_status = 8; | ||
restate.common.MetadataServerStatus metadata_server_status = 9; | ||
uint32 nodes_config_version = 10; | ||
uint32 logs_version = 11; | ||
uint32 schema_version = 12; | ||
uint32 partition_table_version = 13; | ||
} | ||
|
||
message GetMetadataRequest { | ||
// If set, we'll first sync with metadata store to esnure we are returning the latest value. | ||
// Otherwise, we'll return the local value on this node. | ||
bool sync = 1; | ||
restate.node.MetadataKind kind = 2; | ||
} | ||
|
||
message GetMetadataResponse { | ||
// polymorphic. The value depends on the MetadataKind requested | ||
bytes encoded = 1; | ||
} |
Oops, something went wrong.