From 6be7480c59bc3522ba7f0afbcd3d83c45e08b5d4 Mon Sep 17 00:00:00 2001 From: Matteo Ferrando Date: Tue, 12 Dec 2023 16:25:24 -0400 Subject: [PATCH] feat: make max_concurrency part of applications instead of aliases --- .../src/isolate_proto/controller.proto | 19 +-- .../src/isolate_proto/controller_pb2.py | 72 ++++++------ .../src/isolate_proto/controller_pb2.pyi | 108 +++++++++--------- .../src/isolate_proto/controller_pb2_grpc.py | 45 -------- 4 files changed, 95 insertions(+), 149 deletions(-) diff --git a/projects/isolate_proto/src/isolate_proto/controller.proto b/projects/isolate_proto/src/isolate_proto/controller.proto index b7e7300b..e7332b72 100644 --- a/projects/isolate_proto/src/isolate_proto/controller.proto +++ b/projects/isolate_proto/src/isolate_proto/controller.proto @@ -22,8 +22,6 @@ service IsolateController { rpc RevokeUserKey (RevokeUserKeyRequest) returns (RevokeUserKeyResponse) {} // Register a funtion rpc RegisterApplication (RegisterApplicationRequest) returns (stream RegisterApplicationResult) {}; - // Horizontal scaling options an application - rpc ScaleApplication (ScaleApplicationRequest) returns (ScaleApplicationResult) {}; // Update configuration of an existing application. rpc UpdateApplication (UpdateApplicationRequest) returns (UpdateApplicationResult) {}; // List aliased registered functions @@ -143,6 +141,7 @@ message MachineRequirements { optional string scheduler = 5; optional google.protobuf.Struct scheduler_options = 8; optional int32 max_multiplexing = 6; + optional int32 max_concurrency = 9; } enum ApplicationAuthMode { @@ -165,7 +164,7 @@ message RegisterApplicationRequest { // If application has alias: auth mode to use optional ApplicationAuthMode auth_mode = 6; // Max concurrency in gateway - optional int32 max_concurrency = 7; + optional int32 max_concurrency = 7 [deprecated = true]; // metadata to store with the application optional google.protobuf.Struct metadata = 8; } @@ -179,23 +178,15 @@ message RegisterApplicationResult { optional RegisterApplicationResultType result = 2; } -message ScaleApplicationRequest { - string application_name = 1; - optional int32 max_concurrency = 2; -} - -message ScaleApplicationResult { - // Empty. For future use. -} - message UpdateApplicationRequest { string application_name = 1; optional int32 keep_alive = 2; optional int32 max_multiplexing = 3; + optional int32 max_concurrency = 4; } message UpdateApplicationResult { - // Empty. For future use. + AliasInfo alias_info = 1; } message ListAliasesRequest { @@ -211,6 +202,8 @@ message AliasInfo { string revision = 2; ApplicationAuthMode auth_mode = 3; int32 max_concurrency = 4; + int32 max_multiplexing = 5; + int32 keep_alive = 6; } message SetSecretRequest { diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2.py b/projects/isolate_proto/src/isolate_proto/controller_pb2.py index 74f9b205..48d5e63c 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2.py +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2.py @@ -20,7 +20,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x10\x63ontroller.proto\x12\ncontroller\x1a\x0c\x63ommon.proto\x1a\x0cserver.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto"\xde\x01\n\tHostedMap\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12!\n\x06inputs\x18\x04 \x03(\x0b\x32\x11.SerializedObjectB\x17\n\x15_machine_requirements"\xf6\x01\n\tHostedRun\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_func"\x88\x01\n\x14\x43reateUserKeyRequest\x12\x35\n\x05scope\x18\x01 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\x12\n\x05\x61lias\x18\x02 \x01(\tH\x00\x88\x01\x01"\x1b\n\x05Scope\x12\t\n\x05\x41\x44MIN\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x42\x08\n\x06_alias";\n\x15\x43reateUserKeyResponse\x12\x12\n\nkey_secret\x18\x01 \x01(\t\x12\x0e\n\x06key_id\x18\x02 \x01(\t"\x15\n\x13ListUserKeysRequest"B\n\x14ListUserKeysResponse\x12*\n\tuser_keys\x18\x01 \x03(\x0b\x32\x17.controller.UserKeyInfo"&\n\x14RevokeUserKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"\x17\n\x15RevokeUserKeyResponse"\x93\x01\n\x0bUserKeyInfo\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x05scope\x18\x03 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\r\n\x05\x61lias\x18\x04 \x01(\t"\xb1\x01\n\x0fHostedRunResult\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x30\n\x06status\x18\x02 \x01(\x0b\x32\x1b.controller.HostedRunStatusH\x00\x88\x01\x01\x12\x12\n\x04logs\x18\x03 \x03(\x0b\x32\x04.Log\x12,\n\x0creturn_value\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\t\n\x07_statusB\x0f\n\r_return_value"\x80\x01\n\x0fHostedRunStatus\x12\x30\n\x05state\x18\x01 \x01(\x0e\x32!.controller.HostedRunStatus.State";\n\x05State\x12\x0f\n\x0bIN_PROGRESS\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x14\n\x10INTERNAL_FAILURE\x10\x02"\xd0\x02\n\x13MachineRequirements\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nbase_image\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x65xposed_port\x18\x04 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tscheduler\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x11scheduler_options\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x06 \x01(\x05H\x05\x88\x01\x01\x42\r\n\x0b_keep_aliveB\r\n\x0b_base_imageB\x0f\n\r_exposed_portB\x0c\n\n_schedulerB\x14\n\x12_scheduler_optionsB\x13\n\x11_max_multiplexing"\xf1\x03\n\x1aRegisterApplicationRequest\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x37\n\tauth_mode\x18\x06 \x01(\x0e\x32\x1f.controller.ApplicationAuthModeH\x03\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x07 \x01(\x05H\x04\x88\x01\x01\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x05\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_funcB\x13\n\x11_application_nameB\x0c\n\n_auth_modeB\x12\n\x10_max_concurrencyB\x0b\n\t_metadata"7\n\x1dRegisterApplicationResultType\x12\x16\n\x0e\x61pplication_id\x18\x01 \x01(\t"z\n\x19RegisterApplicationResult\x12\x12\n\x04logs\x18\x01 \x03(\x0b\x32\x04.Log\x12>\n\x06result\x18\x02 \x01(\x0b\x32).controller.RegisterApplicationResultTypeH\x00\x88\x01\x01\x42\t\n\x07_result"e\n\x17ScaleApplicationRequest\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x1c\n\x0fmax_concurrency\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\x12\n\x10_max_concurrency"\x18\n\x16ScaleApplicationResult"\x90\x01\n\x18UpdateApplicationRequest\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x03 \x01(\x05H\x01\x88\x01\x01\x42\r\n\x0b_keep_aliveB\x13\n\x11_max_multiplexing"\x19\n\x17UpdateApplicationResult"\x14\n\x12ListAliasesRequest";\n\x11ListAliasesResult\x12&\n\x07\x61liases\x18\x01 \x03(\x0b\x32\x15.controller.AliasInfo"y\n\tAliasInfo\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x32\n\tauth_mode\x18\x03 \x01(\x0e\x32\x1f.controller.ApplicationAuthMode\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\x05">\n\x10SetSecretRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value"\x13\n\x11SetSecretResponse"\x14\n\x12ListSecretsRequest"^\n\x06Secret\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0f\n\r_created_time":\n\x13ListSecretsResponse\x12#\n\x07secrets\x18\x01 \x03(\x0b\x32\x12.controller.Secret*:\n\x13\x41pplicationAuthMode\x12\x0b\n\x07PRIVATE\x10\x00\x12\n\n\x06PUBLIC\x10\x01\x12\n\n\x06SHARED\x10\x02\x32\xaf\x07\n\x11IsolateController\x12=\n\x03Run\x12\x15.controller.HostedRun\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12=\n\x03Map\x12\x15.controller.HostedMap\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12V\n\rCreateUserKey\x12 .controller.CreateUserKeyRequest\x1a!.controller.CreateUserKeyResponse"\x00\x12S\n\x0cListUserKeys\x12\x1f.controller.ListUserKeysRequest\x1a .controller.ListUserKeysResponse"\x00\x12V\n\rRevokeUserKey\x12 .controller.RevokeUserKeyRequest\x1a!.controller.RevokeUserKeyResponse"\x00\x12h\n\x13RegisterApplication\x12&.controller.RegisterApplicationRequest\x1a%.controller.RegisterApplicationResult"\x00\x30\x01\x12]\n\x10ScaleApplication\x12#.controller.ScaleApplicationRequest\x1a".controller.ScaleApplicationResult"\x00\x12`\n\x11UpdateApplication\x12$.controller.UpdateApplicationRequest\x1a#.controller.UpdateApplicationResult"\x00\x12N\n\x0bListAliases\x12\x1e.controller.ListAliasesRequest\x1a\x1d.controller.ListAliasesResult"\x00\x12J\n\tSetSecret\x12\x1c.controller.SetSecretRequest\x1a\x1d.controller.SetSecretResponse"\x00\x12P\n\x0bListSecrets\x12\x1e.controller.ListSecretsRequest\x1a\x1f.controller.ListSecretsResponse"\x00\x62\x06proto3' + b'\n\x10\x63ontroller.proto\x12\ncontroller\x1a\x0c\x63ommon.proto\x1a\x0cserver.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto"\xde\x01\n\tHostedMap\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12!\n\x06inputs\x18\x04 \x03(\x0b\x32\x11.SerializedObjectB\x17\n\x15_machine_requirements"\xf6\x01\n\tHostedRun\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_func"\x88\x01\n\x14\x43reateUserKeyRequest\x12\x35\n\x05scope\x18\x01 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\x12\n\x05\x61lias\x18\x02 \x01(\tH\x00\x88\x01\x01"\x1b\n\x05Scope\x12\t\n\x05\x41\x44MIN\x10\x00\x12\x07\n\x03\x41PI\x10\x01\x42\x08\n\x06_alias";\n\x15\x43reateUserKeyResponse\x12\x12\n\nkey_secret\x18\x01 \x01(\t\x12\x0e\n\x06key_id\x18\x02 \x01(\t"\x15\n\x13ListUserKeysRequest"B\n\x14ListUserKeysResponse\x12*\n\tuser_keys\x18\x01 \x03(\x0b\x32\x17.controller.UserKeyInfo"&\n\x14RevokeUserKeyRequest\x12\x0e\n\x06key_id\x18\x01 \x01(\t"\x17\n\x15RevokeUserKeyResponse"\x93\x01\n\x0bUserKeyInfo\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x05scope\x18\x03 \x01(\x0e\x32&.controller.CreateUserKeyRequest.Scope\x12\r\n\x05\x61lias\x18\x04 \x01(\t"\xb1\x01\n\x0fHostedRunResult\x12\x0e\n\x06run_id\x18\x01 \x01(\t\x12\x30\n\x06status\x18\x02 \x01(\x0b\x32\x1b.controller.HostedRunStatusH\x00\x88\x01\x01\x12\x12\n\x04logs\x18\x03 \x03(\x0b\x32\x04.Log\x12,\n\x0creturn_value\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x42\t\n\x07_statusB\x0f\n\r_return_value"\x80\x01\n\x0fHostedRunStatus\x12\x30\n\x05state\x18\x01 \x01(\x0e\x32!.controller.HostedRunStatus.State";\n\x05State\x12\x0f\n\x0bIN_PROGRESS\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x14\n\x10INTERNAL_FAILURE\x10\x02"\x82\x03\n\x13MachineRequirements\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nbase_image\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x65xposed_port\x18\x04 \x01(\x05H\x02\x88\x01\x01\x12\x16\n\tscheduler\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x37\n\x11scheduler_options\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x06 \x01(\x05H\x05\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\t \x01(\x05H\x06\x88\x01\x01\x42\r\n\x0b_keep_aliveB\r\n\x0b_base_imageB\x0f\n\r_exposed_portB\x0c\n\n_schedulerB\x14\n\x12_scheduler_optionsB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"\xf5\x03\n\x1aRegisterApplicationRequest\x12,\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\x16.EnvironmentDefinition\x12\x42\n\x14machine_requirements\x18\x02 \x01(\x0b\x32\x1f.controller.MachineRequirementsH\x00\x88\x01\x01\x12#\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.SerializedObject\x12*\n\nsetup_func\x18\x04 \x01(\x0b\x32\x11.SerializedObjectH\x01\x88\x01\x01\x12\x1d\n\x10\x61pplication_name\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x37\n\tauth_mode\x18\x06 \x01(\x0e\x32\x1f.controller.ApplicationAuthModeH\x03\x88\x01\x01\x12 \n\x0fmax_concurrency\x18\x07 \x01(\x05\x42\x02\x18\x01H\x04\x88\x01\x01\x12.\n\x08metadata\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructH\x05\x88\x01\x01\x42\x17\n\x15_machine_requirementsB\r\n\x0b_setup_funcB\x13\n\x11_application_nameB\x0c\n\n_auth_modeB\x12\n\x10_max_concurrencyB\x0b\n\t_metadata"7\n\x1dRegisterApplicationResultType\x12\x16\n\x0e\x61pplication_id\x18\x01 \x01(\t"z\n\x19RegisterApplicationResult\x12\x12\n\x04logs\x18\x01 \x03(\x0b\x32\x04.Log\x12>\n\x06result\x18\x02 \x01(\x0b\x32).controller.RegisterApplicationResultTypeH\x00\x88\x01\x01\x42\t\n\x07_result"\xc2\x01\n\x18UpdateApplicationRequest\x12\x18\n\x10\x61pplication_name\x18\x01 \x01(\t\x12\x17\n\nkeep_alive\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_multiplexing\x18\x03 \x01(\x05H\x01\x88\x01\x01\x12\x1c\n\x0fmax_concurrency\x18\x04 \x01(\x05H\x02\x88\x01\x01\x42\r\n\x0b_keep_aliveB\x13\n\x11_max_multiplexingB\x12\n\x10_max_concurrency"D\n\x17UpdateApplicationResult\x12)\n\nalias_info\x18\x01 \x01(\x0b\x32\x15.controller.AliasInfo"\x14\n\x12ListAliasesRequest";\n\x11ListAliasesResult\x12&\n\x07\x61liases\x18\x01 \x03(\x0b\x32\x15.controller.AliasInfo"\xa7\x01\n\tAliasInfo\x12\r\n\x05\x61lias\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x32\n\tauth_mode\x18\x03 \x01(\x0e\x32\x1f.controller.ApplicationAuthMode\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\x05\x12\x18\n\x10max_multiplexing\x18\x05 \x01(\x05\x12\x12\n\nkeep_alive\x18\x06 \x01(\x05">\n\x10SetSecretRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value"\x13\n\x11SetSecretResponse"\x14\n\x12ListSecretsRequest"^\n\x06Secret\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0c\x63reated_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x42\x0f\n\r_created_time":\n\x13ListSecretsResponse\x12#\n\x07secrets\x18\x01 \x03(\x0b\x32\x12.controller.Secret*:\n\x13\x41pplicationAuthMode\x12\x0b\n\x07PRIVATE\x10\x00\x12\n\n\x06PUBLIC\x10\x01\x12\n\n\x06SHARED\x10\x02\x32\xd0\x06\n\x11IsolateController\x12=\n\x03Run\x12\x15.controller.HostedRun\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12=\n\x03Map\x12\x15.controller.HostedMap\x1a\x1b.controller.HostedRunResult"\x00\x30\x01\x12V\n\rCreateUserKey\x12 .controller.CreateUserKeyRequest\x1a!.controller.CreateUserKeyResponse"\x00\x12S\n\x0cListUserKeys\x12\x1f.controller.ListUserKeysRequest\x1a .controller.ListUserKeysResponse"\x00\x12V\n\rRevokeUserKey\x12 .controller.RevokeUserKeyRequest\x1a!.controller.RevokeUserKeyResponse"\x00\x12h\n\x13RegisterApplication\x12&.controller.RegisterApplicationRequest\x1a%.controller.RegisterApplicationResult"\x00\x30\x01\x12`\n\x11UpdateApplication\x12$.controller.UpdateApplicationRequest\x1a#.controller.UpdateApplicationResult"\x00\x12N\n\x0bListAliases\x12\x1e.controller.ListAliasesRequest\x1a\x1d.controller.ListAliasesResult"\x00\x12J\n\tSetSecret\x12\x1c.controller.SetSecretRequest\x1a\x1d.controller.SetSecretResponse"\x00\x12P\n\x0bListSecrets\x12\x1e.controller.ListSecretsRequest\x1a\x1f.controller.ListSecretsResponse"\x00\x62\x06proto3' ) _globals = globals() @@ -29,8 +29,12 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _globals["_APPLICATIONAUTHMODE"]._serialized_start = 3238 - _globals["_APPLICATIONAUTHMODE"]._serialized_end = 3296 + _REGISTERAPPLICATIONREQUEST.fields_by_name["max_concurrency"]._options = None + _REGISTERAPPLICATIONREQUEST.fields_by_name[ + "max_concurrency" + ]._serialized_options = b"\030\001" + _globals["_APPLICATIONAUTHMODE"]._serialized_start = 3303 + _globals["_APPLICATIONAUTHMODE"]._serialized_end = 3361 _globals["_HOSTEDMAP"]._serialized_start = 156 _globals["_HOSTEDMAP"]._serialized_end = 378 _globals["_HOSTEDRUN"]._serialized_start = 381 @@ -58,37 +62,33 @@ _globals["_HOSTEDRUNSTATUS_STATE"]._serialized_start = 1385 _globals["_HOSTEDRUNSTATUS_STATE"]._serialized_end = 1444 _globals["_MACHINEREQUIREMENTS"]._serialized_start = 1447 - _globals["_MACHINEREQUIREMENTS"]._serialized_end = 1783 - _globals["_REGISTERAPPLICATIONREQUEST"]._serialized_start = 1786 - _globals["_REGISTERAPPLICATIONREQUEST"]._serialized_end = 2283 - _globals["_REGISTERAPPLICATIONRESULTTYPE"]._serialized_start = 2285 - _globals["_REGISTERAPPLICATIONRESULTTYPE"]._serialized_end = 2340 - _globals["_REGISTERAPPLICATIONRESULT"]._serialized_start = 2342 - _globals["_REGISTERAPPLICATIONRESULT"]._serialized_end = 2464 - _globals["_SCALEAPPLICATIONREQUEST"]._serialized_start = 2466 - _globals["_SCALEAPPLICATIONREQUEST"]._serialized_end = 2567 - _globals["_SCALEAPPLICATIONRESULT"]._serialized_start = 2569 - _globals["_SCALEAPPLICATIONRESULT"]._serialized_end = 2593 - _globals["_UPDATEAPPLICATIONREQUEST"]._serialized_start = 2596 - _globals["_UPDATEAPPLICATIONREQUEST"]._serialized_end = 2740 - _globals["_UPDATEAPPLICATIONRESULT"]._serialized_start = 2742 - _globals["_UPDATEAPPLICATIONRESULT"]._serialized_end = 2767 - _globals["_LISTALIASESREQUEST"]._serialized_start = 2769 - _globals["_LISTALIASESREQUEST"]._serialized_end = 2789 - _globals["_LISTALIASESRESULT"]._serialized_start = 2791 - _globals["_LISTALIASESRESULT"]._serialized_end = 2850 - _globals["_ALIASINFO"]._serialized_start = 2852 - _globals["_ALIASINFO"]._serialized_end = 2973 - _globals["_SETSECRETREQUEST"]._serialized_start = 2975 - _globals["_SETSECRETREQUEST"]._serialized_end = 3037 - _globals["_SETSECRETRESPONSE"]._serialized_start = 3039 - _globals["_SETSECRETRESPONSE"]._serialized_end = 3058 - _globals["_LISTSECRETSREQUEST"]._serialized_start = 3060 - _globals["_LISTSECRETSREQUEST"]._serialized_end = 3080 - _globals["_SECRET"]._serialized_start = 3082 - _globals["_SECRET"]._serialized_end = 3176 - _globals["_LISTSECRETSRESPONSE"]._serialized_start = 3178 - _globals["_LISTSECRETSRESPONSE"]._serialized_end = 3236 - _globals["_ISOLATECONTROLLER"]._serialized_start = 3299 - _globals["_ISOLATECONTROLLER"]._serialized_end = 4242 + _globals["_MACHINEREQUIREMENTS"]._serialized_end = 1833 + _globals["_REGISTERAPPLICATIONREQUEST"]._serialized_start = 1836 + _globals["_REGISTERAPPLICATIONREQUEST"]._serialized_end = 2337 + _globals["_REGISTERAPPLICATIONRESULTTYPE"]._serialized_start = 2339 + _globals["_REGISTERAPPLICATIONRESULTTYPE"]._serialized_end = 2394 + _globals["_REGISTERAPPLICATIONRESULT"]._serialized_start = 2396 + _globals["_REGISTERAPPLICATIONRESULT"]._serialized_end = 2518 + _globals["_UPDATEAPPLICATIONREQUEST"]._serialized_start = 2521 + _globals["_UPDATEAPPLICATIONREQUEST"]._serialized_end = 2715 + _globals["_UPDATEAPPLICATIONRESULT"]._serialized_start = 2717 + _globals["_UPDATEAPPLICATIONRESULT"]._serialized_end = 2785 + _globals["_LISTALIASESREQUEST"]._serialized_start = 2787 + _globals["_LISTALIASESREQUEST"]._serialized_end = 2807 + _globals["_LISTALIASESRESULT"]._serialized_start = 2809 + _globals["_LISTALIASESRESULT"]._serialized_end = 2868 + _globals["_ALIASINFO"]._serialized_start = 2871 + _globals["_ALIASINFO"]._serialized_end = 3038 + _globals["_SETSECRETREQUEST"]._serialized_start = 3040 + _globals["_SETSECRETREQUEST"]._serialized_end = 3102 + _globals["_SETSECRETRESPONSE"]._serialized_start = 3104 + _globals["_SETSECRETRESPONSE"]._serialized_end = 3123 + _globals["_LISTSECRETSREQUEST"]._serialized_start = 3125 + _globals["_LISTSECRETSREQUEST"]._serialized_end = 3145 + _globals["_SECRET"]._serialized_start = 3147 + _globals["_SECRET"]._serialized_end = 3241 + _globals["_LISTSECRETSRESPONSE"]._serialized_start = 3243 + _globals["_LISTSECRETSRESPONSE"]._serialized_end = 3301 + _globals["_ISOLATECONTROLLER"]._serialized_start = 3364 + _globals["_ISOLATECONTROLLER"]._serialized_end = 4212 # @@protoc_insertion_point(module_scope) diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi b/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi index 3601f731..bd43317c 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2.pyi @@ -508,6 +508,7 @@ class MachineRequirements(google.protobuf.message.Message): SCHEDULER_FIELD_NUMBER: builtins.int SCHEDULER_OPTIONS_FIELD_NUMBER: builtins.int MAX_MULTIPLEXING_FIELD_NUMBER: builtins.int + MAX_CONCURRENCY_FIELD_NUMBER: builtins.int machine_type: builtins.str """Machine type. It is not an enum because we want to be able to dynamically add new machine types without regenerating @@ -521,6 +522,7 @@ class MachineRequirements(google.protobuf.message.Message): @property def scheduler_options(self) -> google.protobuf.struct_pb2.Struct: ... max_multiplexing: builtins.int + max_concurrency: builtins.int def __init__( self, *, @@ -531,6 +533,7 @@ class MachineRequirements(google.protobuf.message.Message): scheduler: builtins.str | None = ..., scheduler_options: google.protobuf.struct_pb2.Struct | None = ..., max_multiplexing: builtins.int | None = ..., + max_concurrency: builtins.int | None = ..., ) -> None: ... def HasField( self, @@ -541,6 +544,8 @@ class MachineRequirements(google.protobuf.message.Message): b"_exposed_port", "_keep_alive", b"_keep_alive", + "_max_concurrency", + b"_max_concurrency", "_max_multiplexing", b"_max_multiplexing", "_scheduler", @@ -553,6 +558,8 @@ class MachineRequirements(google.protobuf.message.Message): b"exposed_port", "keep_alive", b"keep_alive", + "max_concurrency", + b"max_concurrency", "max_multiplexing", b"max_multiplexing", "scheduler", @@ -570,6 +577,8 @@ class MachineRequirements(google.protobuf.message.Message): b"_exposed_port", "_keep_alive", b"_keep_alive", + "_max_concurrency", + b"_max_concurrency", "_max_multiplexing", b"_max_multiplexing", "_scheduler", @@ -584,6 +593,8 @@ class MachineRequirements(google.protobuf.message.Message): b"keep_alive", "machine_type", b"machine_type", + "max_concurrency", + b"max_concurrency", "max_multiplexing", b"max_multiplexing", "scheduler", @@ -605,6 +616,11 @@ class MachineRequirements(google.protobuf.message.Message): self, oneof_group: typing_extensions.Literal["_keep_alive", b"_keep_alive"] ) -> typing_extensions.Literal["keep_alive"] | None: ... @typing.overload + def WhichOneof( + self, + oneof_group: typing_extensions.Literal["_max_concurrency", b"_max_concurrency"], + ) -> typing_extensions.Literal["max_concurrency"] | None: ... + @typing.overload def WhichOneof( self, oneof_group: typing_extensions.Literal[ @@ -828,59 +844,6 @@ class RegisterApplicationResult(google.protobuf.message.Message): global___RegisterApplicationResult = RegisterApplicationResult -@typing_extensions.final -class ScaleApplicationRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - APPLICATION_NAME_FIELD_NUMBER: builtins.int - MAX_CONCURRENCY_FIELD_NUMBER: builtins.int - application_name: builtins.str - max_concurrency: builtins.int - def __init__( - self, - *, - application_name: builtins.str = ..., - max_concurrency: builtins.int | None = ..., - ) -> None: ... - def HasField( - self, - field_name: typing_extensions.Literal[ - "_max_concurrency", - b"_max_concurrency", - "max_concurrency", - b"max_concurrency", - ], - ) -> builtins.bool: ... - def ClearField( - self, - field_name: typing_extensions.Literal[ - "_max_concurrency", - b"_max_concurrency", - "application_name", - b"application_name", - "max_concurrency", - b"max_concurrency", - ], - ) -> None: ... - def WhichOneof( - self, - oneof_group: typing_extensions.Literal["_max_concurrency", b"_max_concurrency"], - ) -> typing_extensions.Literal["max_concurrency"] | None: ... - -global___ScaleApplicationRequest = ScaleApplicationRequest - -@typing_extensions.final -class ScaleApplicationResult(google.protobuf.message.Message): - """Empty. For future use.""" - - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - def __init__( - self, - ) -> None: ... - -global___ScaleApplicationResult = ScaleApplicationResult - @typing_extensions.final class UpdateApplicationRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -888,25 +851,32 @@ class UpdateApplicationRequest(google.protobuf.message.Message): APPLICATION_NAME_FIELD_NUMBER: builtins.int KEEP_ALIVE_FIELD_NUMBER: builtins.int MAX_MULTIPLEXING_FIELD_NUMBER: builtins.int + MAX_CONCURRENCY_FIELD_NUMBER: builtins.int application_name: builtins.str keep_alive: builtins.int max_multiplexing: builtins.int + max_concurrency: builtins.int def __init__( self, *, application_name: builtins.str = ..., keep_alive: builtins.int | None = ..., max_multiplexing: builtins.int | None = ..., + max_concurrency: builtins.int | None = ..., ) -> None: ... def HasField( self, field_name: typing_extensions.Literal[ "_keep_alive", b"_keep_alive", + "_max_concurrency", + b"_max_concurrency", "_max_multiplexing", b"_max_multiplexing", "keep_alive", b"keep_alive", + "max_concurrency", + b"max_concurrency", "max_multiplexing", b"max_multiplexing", ], @@ -916,12 +886,16 @@ class UpdateApplicationRequest(google.protobuf.message.Message): field_name: typing_extensions.Literal[ "_keep_alive", b"_keep_alive", + "_max_concurrency", + b"_max_concurrency", "_max_multiplexing", b"_max_multiplexing", "application_name", b"application_name", "keep_alive", b"keep_alive", + "max_concurrency", + b"max_concurrency", "max_multiplexing", b"max_multiplexing", ], @@ -931,6 +905,11 @@ class UpdateApplicationRequest(google.protobuf.message.Message): self, oneof_group: typing_extensions.Literal["_keep_alive", b"_keep_alive"] ) -> typing_extensions.Literal["keep_alive"] | None: ... @typing.overload + def WhichOneof( + self, + oneof_group: typing_extensions.Literal["_max_concurrency", b"_max_concurrency"], + ) -> typing_extensions.Literal["max_concurrency"] | None: ... + @typing.overload def WhichOneof( self, oneof_group: typing_extensions.Literal[ @@ -942,12 +921,21 @@ global___UpdateApplicationRequest = UpdateApplicationRequest @typing_extensions.final class UpdateApplicationResult(google.protobuf.message.Message): - """Empty. For future use.""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor + ALIAS_INFO_FIELD_NUMBER: builtins.int + @property + def alias_info(self) -> global___AliasInfo: ... def __init__( self, + *, + alias_info: global___AliasInfo | None = ..., + ) -> None: ... + def HasField( + self, field_name: typing_extensions.Literal["alias_info", b"alias_info"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing_extensions.Literal["alias_info", b"alias_info"] ) -> None: ... global___UpdateApplicationResult = UpdateApplicationResult @@ -994,10 +982,14 @@ class AliasInfo(google.protobuf.message.Message): REVISION_FIELD_NUMBER: builtins.int AUTH_MODE_FIELD_NUMBER: builtins.int MAX_CONCURRENCY_FIELD_NUMBER: builtins.int + MAX_MULTIPLEXING_FIELD_NUMBER: builtins.int + KEEP_ALIVE_FIELD_NUMBER: builtins.int alias: builtins.str revision: builtins.str auth_mode: global___ApplicationAuthMode.ValueType max_concurrency: builtins.int + max_multiplexing: builtins.int + keep_alive: builtins.int def __init__( self, *, @@ -1005,6 +997,8 @@ class AliasInfo(google.protobuf.message.Message): revision: builtins.str = ..., auth_mode: global___ApplicationAuthMode.ValueType = ..., max_concurrency: builtins.int = ..., + max_multiplexing: builtins.int = ..., + keep_alive: builtins.int = ..., ) -> None: ... def ClearField( self, @@ -1013,8 +1007,12 @@ class AliasInfo(google.protobuf.message.Message): b"alias", "auth_mode", b"auth_mode", + "keep_alive", + b"keep_alive", "max_concurrency", b"max_concurrency", + "max_multiplexing", + b"max_multiplexing", "revision", b"revision", ], diff --git a/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py b/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py index 16c226b1..1d8a575b 100644 --- a/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py +++ b/projects/isolate_proto/src/isolate_proto/controller_pb2_grpc.py @@ -44,11 +44,6 @@ def __init__(self, channel): request_serializer=controller__pb2.RegisterApplicationRequest.SerializeToString, response_deserializer=controller__pb2.RegisterApplicationResult.FromString, ) - self.ScaleApplication = channel.unary_unary( - "/controller.IsolateController/ScaleApplication", - request_serializer=controller__pb2.ScaleApplicationRequest.SerializeToString, - response_deserializer=controller__pb2.ScaleApplicationResult.FromString, - ) self.UpdateApplication = channel.unary_unary( "/controller.IsolateController/UpdateApplication", request_serializer=controller__pb2.UpdateApplicationRequest.SerializeToString, @@ -112,12 +107,6 @@ def RegisterApplication(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") - def ScaleApplication(self, request, context): - """Horizontal scaling options an application""" - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details("Method not implemented!") - raise NotImplementedError("Method not implemented!") - def UpdateApplication(self, request, context): """Update configuration of an existing application.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -175,11 +164,6 @@ def add_IsolateControllerServicer_to_server(servicer, server): request_deserializer=controller__pb2.RegisterApplicationRequest.FromString, response_serializer=controller__pb2.RegisterApplicationResult.SerializeToString, ), - "ScaleApplication": grpc.unary_unary_rpc_method_handler( - servicer.ScaleApplication, - request_deserializer=controller__pb2.ScaleApplicationRequest.FromString, - response_serializer=controller__pb2.ScaleApplicationResult.SerializeToString, - ), "UpdateApplication": grpc.unary_unary_rpc_method_handler( servicer.UpdateApplication, request_deserializer=controller__pb2.UpdateApplicationRequest.FromString, @@ -385,35 +369,6 @@ def RegisterApplication( metadata, ) - @staticmethod - def ScaleApplication( - request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None, - ): - return grpc.experimental.unary_unary( - request, - target, - "/controller.IsolateController/ScaleApplication", - controller__pb2.ScaleApplicationRequest.SerializeToString, - controller__pb2.ScaleApplicationResult.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - ) - @staticmethod def UpdateApplication( request,