Skip to content

Commit

Permalink
feat: update delete instances request (#2445)
Browse files Browse the repository at this point in the history
## Description
Extend functionality of DeleteInstance request to delete multiple
instances or instances with a certain status. Also, adds auth to it by
requiring the system user api key to be provided.

## Is this change user facing?
NO
  • Loading branch information
tedim52 authored May 13, 2024
1 parent 678dc2f commit ef9b885
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 465 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/rust/src/api_container_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ pub struct GetStarlarkRunResponse {
pub experimental_features: ::prost::alloc::vec::Vec<i32>,
#[prost(enumeration = "RestartPolicy", tag = "8")]
pub restart_policy: i32,
/// The params that were used for the very first run of the script
/// The params that were used on for the very first Starlark run in an APIC
#[prost(string, optional, tag = "9")]
pub initial_serialized_params: ::core::option::Option<
::prost::alloc::string::String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ export declare class GetStarlarkRunResponse extends Message<GetStarlarkRunRespon
restartPolicy: RestartPolicy;

/**
* The params that were used for the very first run of the script
* The params that were used on for the very first Starlark run in an APIC
*
* @generated from field: optional string initial_serialized_params = 9;
*/
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions cloud/api/protobuf/kurtosis_backend_server_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ service KurtosisCloudBackendServer {
rpc CancelPaymentSubscription (CancelPaymentSubscriptionArgs) returns (google.protobuf.Empty) {};
rpc UpdateAddress(UpdateAddressArgs) returns (google.protobuf.Empty) {};
rpc GetInstances(google.protobuf.Empty) returns (GetInstancesResponse) {};
rpc DeleteInstance(DeleteInstanceRequest) returns (DeleteInstanceResponse) {};
rpc DeleteInstances(DeleteInstancesRequest) returns (DeleteInstancesResponse) {};
rpc ChangeActiveStatus(ChangeUserActiveRequest) returns (google.protobuf.Empty) {};
rpc GetUser(GetUserRequest) returns (GetUserResponse) {};
rpc CheckPortAuthorization(CheckPortAuthorizationRequest) returns(google.protobuf.Empty){
Expand Down Expand Up @@ -156,13 +156,18 @@ message UpdateAddressArgs {
string country = 8;
}

message DeleteInstanceRequest {
string instance_id = 1;
string ec2_id = 2;
message DeleteInstancesRequest {
repeated string instance_ids = 1;

// must be system user to delete instances
string api_key = 2;

// can optionally pass a status to only delete instances with a certain status, eg. configuring
optional string status = 3;
}

message DeleteInstanceResponse {
string status = 1;
message DeleteInstancesResponse {
repeated string deleted_instances = 1;
}

message GetInstancesResponse {
Expand Down
Loading

0 comments on commit ef9b885

Please sign in to comment.