From e73a11679a8363d24888a5bd9eec861f60228be3 Mon Sep 17 00:00:00 2001 From: "openslides-automation[bot]" <125256978+openslides-automation[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 16:43:12 +0200 Subject: [PATCH 1/4] Update openslides-go (#96) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 71a89f4..b0f364e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/OpenSlides/openslides-cli go 1.26.0 require ( - github.com/OpenSlides/openslides-go v0.0.0-20260914113122-b8fc5dcb5833 + github.com/OpenSlides/openslides-go v0.0.0-20261019143238-985a3acd9af1 github.com/schollz/progressbar/v3 v3.19.1 github.com/shopspring/decimal v1.4.0 github.com/spf13/cobra v1.10.2 diff --git a/go.sum b/go.sum index 72a89bd..2655841 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/OpenSlides/openslides-go v0.0.0-20260914113122-b8fc5dcb5833 h1:e/jwi8XU9tUyX3hul2YHzydAb2bFqbzxsAGtWrTRd38= -github.com/OpenSlides/openslides-go v0.0.0-20260914113122-b8fc5dcb5833/go.mod h1:ngfwMkOksw2fydfKOfJyFM0wiyilScNIOM092pHwc0c= +github.com/OpenSlides/openslides-go v0.0.0-20261019143238-985a3acd9af1 h1:fKCAsEw5knz82tw6lPcgCDHG7kkwQyZJVJQh06yWzIw= +github.com/OpenSlides/openslides-go v0.0.0-20261019143238-985a3acd9af1/go.mod h1:ngfwMkOksw2fydfKOfJyFM0wiyilScNIOM092pHwc0c= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= From f842a569c910908d598d3b2005c6af0601e0fa0e Mon Sep 17 00:00:00 2001 From: aantoni Date: Mon, 20 Jul 2026 14:30:17 +0200 Subject: [PATCH 2/4] Rm migrations finalize and clearCollectionFieldTables actions --- README.md | 14 +- internal/constants/constants.go | 7 +- internal/grpc/server/migrations.go | 11 +- .../manage/actions/migrations/migrations.go | 54 ++------ .../actions/migrations/migrations_test.go | 21 +++ proto/osmanage.proto | 2 - proto/osmanage/osmanage.pb.go | 68 +++++----- proto/osmanage/osmanage_grpc.pb.go | 123 ++++-------------- 8 files changed, 91 insertions(+), 209 deletions(-) diff --git a/README.md b/README.md index 58aca08..54222d1 100644 --- a/README.md +++ b/README.md @@ -217,8 +217,7 @@ Commands for interacting with the OpenSlides backend API. Manage OpenSlides database migrations. **Subcommands:** -- `migrate`: Run migrations on auxiliary tables -- `finalize`: Apply migrations to live tables +- `migrate`: Run migrations on live tables - `reset`: Reset unapplied migrations - `stats`: Show migration statistics - `progress`: Check running migration progress @@ -235,17 +234,6 @@ osmanage migrations stats \ osmanage migrations migrate \ --address localhost:9002 \ --password-file ./secrets/internal_auth_password - -# Apply migrations -osmanage migrations finalize \ - --address localhost:9002 \ - --password-file ./secrets/internal_auth_password - -# Apply without progress output -osmanage migrations finalize \ - --address localhost:9002 \ - --password-file ./secrets/internal_auth_password \ - --interval 0 ``` **Migration Stats Output:** diff --git a/internal/constants/constants.go b/internal/constants/constants.go index de315d6..b3f32bc 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -223,11 +223,8 @@ const ( // MigrationStatusFailed indicates a migration process has failed MigrationStatusFailed string = "migration_failed" - // FinalizationStatusRunning indicates a migration finalization is currently in progress - FinalizationStatusRunning string = "finalization_running" - - // FinalizationStatusFailed indicates a migration finalization process has failed - FinalizationStatusFailed string = "finalization_failed" + // MigrationStatusFinished indicates a migration process has finished successfully + MigrationStatusFinished string = "migration_finished" // MigrationMaxRetries is the maximum number of retry attempts for failed migration requests MigrationMaxRetries int = 8 diff --git a/internal/grpc/server/migrations.go b/internal/grpc/server/migrations.go index 4cc2550..1dd92c0 100644 --- a/internal/grpc/server/migrations.go +++ b/internal/grpc/server/migrations.go @@ -20,15 +20,6 @@ func (s *OsmanageServiceServer) MigrationsMigrate( ) } -func (s *OsmanageServiceServer) MigrationsFinalize( - req *pb.MigrationsRequest, - stream pb.OsmanageService_MigrationsFinalizeServer, -) error { - return executeMigrationStream(req, stream, "finalize", - func(r *pb.MigrationsResponse) bool { return !migrations.Running(r) && !migrations.Finalizing(r) }, - ) -} - func (s *OsmanageServiceServer) MigrationsReset( ctx context.Context, req *pb.MigrationsRequest, @@ -57,7 +48,7 @@ func (s *OsmanageServiceServer) MigrationsProgress( return executeMigrationUnary(req, "progress") } -// executeMigrationStream handles streaming migration commands (migrate, finalize) +// executeMigrationStream handles streaming migration commands (migrate) func executeMigrationStream( req *pb.MigrationsRequest, stream interface { diff --git a/internal/manage/actions/migrations/migrations.go b/internal/manage/actions/migrations/migrations.go index 10fc707..b41164f 100644 --- a/internal/manage/actions/migrations/migrations.go +++ b/internal/manage/actions/migrations/migrations.go @@ -26,16 +26,11 @@ Examples: --address :9002 \ --password-file my.instance.dir/secrets/internal_auth_password - # Run migrations on auxiliary tables + # Run migrations on live tables osmanage migrations migrate \ --address :9002 \ --password-file my.instance.dir/secrets/internal_auth_password - # Apply migrations to live tables - osmanage migrations finalize \ - --address :9002 \ - --password-file my.instance.dir/secrets/internal_auth_password - # Reset unapplied migrations osmanage migrations reset \ --address :9002 \ @@ -46,15 +41,8 @@ Examples: --address :9002 \ --password-file my.instance.dir/secrets/internal_auth_password - # Custom progress interval - osmanage migrations finalize \ - --address :9002 \ - --password-file my.instance.dir/secrets/internal_auth_password \ - --interval 2s - Available commands: - migrate Run migrations on auxiliary tables - finalize Apply migrations to live tables + migrate Run migrations on live tables reset Reset unapplied migrations stats Show migration statistics progress Check running migration progress` @@ -69,9 +57,7 @@ func Cmd() *cobra.Command { cmd.AddCommand( migrateCmd(), - finalizeCmd(), resetCmd(), - clearCollectionfieldTablesCmd(), statsCmd(), progressCmd(), ) @@ -80,22 +66,13 @@ func Cmd() *cobra.Command { } func migrateCmd() *cobra.Command { - return createMigrationCmd("migrate", "Prepare migrations but do not apply them to the live tables", true) -} - -func finalizeCmd() *cobra.Command { - return createMigrationCmd("finalize", "Prepare migrations and apply them to the live tables", true) + return createMigrationCmd("migrate", "Prepare migrations and apply them to the live tables", true) } func resetCmd() *cobra.Command { return createMigrationCmd("reset", "Reset unapplied migrations", false) } -// TODO: unavailable after 4.3.0, delete when backward compatibility no longer needed -func clearCollectionfieldTablesCmd() *cobra.Command { - return createMigrationCmd("clear-collectionfield-tables", "Clear all data from auxiliary tables (only when OpenSlides is offline)", false) -} - func statsCmd() *cobra.Command { return createMigrationCmd("stats", "Print statistics about the current migration state", false) } @@ -145,13 +122,9 @@ func createMigrationCmd(name, description string, withProgressTracking bool) *co } fmt.Print(output) - if withProgressTracking && progressInterval != nil && *progressInterval > 0 && (Running(response) || Finalizing(response)) { - var stopCondition func(*pb.MigrationsResponse) bool - if name == "finalize" { - stopCondition = func(r *pb.MigrationsResponse) bool { return !Running(r) && !Finalizing(r) } - } else { - stopCondition = func(r *pb.MigrationsResponse) bool { return !Running(r) } - } + if withProgressTracking && progressInterval != nil && *progressInterval > 0 && Running(response) { + // check whether migration has been completed successfully (not running and finished) + stopCondition := func(r *pb.MigrationsResponse) bool { return !Running(r) && Finished(r) } printCallback := func(update *pb.MigrationsProgressResponse) error { fmt.Print(update.Output) @@ -236,8 +209,8 @@ func ExecuteMigrationCommand(cl *client.Client, command string) (*pb.MigrationsR Stats: string(httpResp.Stats), } - logger.Debug("Migration response - Success: %v, Status: %s, Running: %v, Finalizing: %v", - migrationResp.Success, migrationResp.Status, Running(migrationResp), Finalizing(migrationResp)) + logger.Debug("Migration response - Success: %v, Status: %s, Running: %v", + migrationResp.Success, migrationResp.Status, Running(migrationResp)) return migrationResp, nil } @@ -264,7 +237,7 @@ func TrackMigrationProgress( update := &pb.MigrationsProgressResponse{ Output: response.Output, - Running: Running(response) || Finalizing(response), + Running: Running(response), Success: response.Success, Exception: response.Exception, } @@ -328,8 +301,7 @@ func formatAll(mr *pb.MigrationsResponse) (string, error) { // Faulty returns true if the migration failed func Faulty(mr *pb.MigrationsResponse) bool { return !mr.Success || mr.Exception != "" || - mr.Status == constants.MigrationStatusFailed || - mr.Status == constants.FinalizationStatusFailed + mr.Status == constants.MigrationStatusFailed } // Running returns true if the migration is currently in progress @@ -337,9 +309,9 @@ func Running(mr *pb.MigrationsResponse) bool { return mr.Status == constants.MigrationStatusRunning } -// Finalizing returns true if the migration finalization is currently in progress -func Finalizing(mr *pb.MigrationsResponse) bool { - return mr.Status == constants.FinalizationStatusRunning +// Finished returns true if the migration has finished successfully +func Finished(mr *pb.MigrationsResponse) bool { + return mr.Status == constants.MigrationStatusFinished } // isRetryableError determines if an error should trigger a retry diff --git a/internal/manage/actions/migrations/migrations_test.go b/internal/manage/actions/migrations/migrations_test.go index a5405b9..b96f944 100644 --- a/internal/manage/actions/migrations/migrations_test.go +++ b/internal/manage/actions/migrations/migrations_test.go @@ -61,6 +61,27 @@ func TestRunning(t *testing.T) { } } +func TestFinished(t *testing.T) { + tests := []struct { + name string + status string + finished bool + }{ + {"finished", constants.MigrationStatusFinished, true}, + {"completed", "completed", false}, + {"failed", "failed", false}, + {"empty", "", false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + resp := &pb.MigrationsResponse{Status: tt.status} + if got := Finished(resp); got != tt.finished { + t.Errorf("Finished() = %v, want %v", got, tt.finished) + } + }) + } +} + func TestGetOutput(t *testing.T) { t.Run("normal output", func(t *testing.T) { resp := &pb.MigrationsResponse{ diff --git a/proto/osmanage.proto b/proto/osmanage.proto index 68e803a..25026da 100644 --- a/proto/osmanage.proto +++ b/proto/osmanage.proto @@ -30,12 +30,10 @@ service OsmanageService { // server side streaming rpc MigrationsMigrate(MigrationsRequest) returns (stream MigrationsProgressResponse); - rpc MigrationsFinalize(MigrationsRequest) returns (stream MigrationsProgressResponse); rpc StreamLogs(LogStreamRequest) returns (stream LogEntry); // unary gRPC calls rpc MigrationsReset(MigrationsRequest) returns (MigrationsResponse); - rpc MigrationsClearCollectionfieldTables(MigrationsRequest) returns (MigrationsResponse); rpc MigrationsStats(MigrationsRequest) returns (MigrationsResponse); rpc MigrationsProgress(MigrationsRequest) returns (MigrationsResponse); diff --git a/proto/osmanage/osmanage.pb.go b/proto/osmanage/osmanage.pb.go index 4d620ff..7e1d246 100644 --- a/proto/osmanage/osmanage.pb.go +++ b/proto/osmanage/osmanage.pb.go @@ -2886,7 +2886,7 @@ const file_proto_osmanage_proto_rawDesc = "" + "\x18SendManageActionResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12\x12\n" + - "\x04body\x18\x03 \x01(\fR\x04body2\xe1\x0f\n" + + "\x04body\x18\x03 \x01(\fR\x04body2\xa3\x0e\n" + "\x0fOsmanageService\x12R\n" + "\rSetupInstance\x12\x1f.osmanage.InstanceConfigRequest\x1a .osmanage.InstanceConfigResponse\x12S\n" + "\x0eConfigInstance\x12\x1f.osmanage.InstanceConfigRequest\x1a .osmanage.InstanceConfigResponse\x12S\n" + @@ -2903,12 +2903,10 @@ const file_proto_osmanage_proto_rawDesc = "" + "\rStartInstance\x12\x1e.osmanage.StartInstanceRequest\x1a\x1f.osmanage.StartInstanceResponse0\x01\x12O\n" + "\fStopInstance\x12\x1d.osmanage.StopInstanceRequest\x1a\x1e.osmanage.StopInstanceResponse0\x01\x12P\n" + "\rGetCollection\x12\x1e.osmanage.GetCollectionRequest\x1a\x1f.osmanage.GetCollectionResponse\x12X\n" + - "\x11MigrationsMigrate\x12\x1b.osmanage.MigrationsRequest\x1a$.osmanage.MigrationsProgressResponse0\x01\x12Y\n" + - "\x12MigrationsFinalize\x12\x1b.osmanage.MigrationsRequest\x1a$.osmanage.MigrationsProgressResponse0\x01\x12>\n" + + "\x11MigrationsMigrate\x12\x1b.osmanage.MigrationsRequest\x1a$.osmanage.MigrationsProgressResponse0\x01\x12>\n" + "\n" + "StreamLogs\x12\x1a.osmanage.LogStreamRequest\x1a\x12.osmanage.LogEntry0\x01\x12L\n" + - "\x0fMigrationsReset\x12\x1b.osmanage.MigrationsRequest\x1a\x1c.osmanage.MigrationsResponse\x12a\n" + - "$MigrationsClearCollectionfieldTables\x12\x1b.osmanage.MigrationsRequest\x1a\x1c.osmanage.MigrationsResponse\x12L\n" + + "\x0fMigrationsReset\x12\x1b.osmanage.MigrationsRequest\x1a\x1c.osmanage.MigrationsResponse\x12L\n" + "\x0fMigrationsStats\x12\x1b.osmanage.MigrationsRequest\x1a\x1c.osmanage.MigrationsResponse\x12O\n" + "\x12MigrationsProgress\x12\x1b.osmanage.MigrationsRequest\x1a\x1c.osmanage.MigrationsResponse\x12Y\n" + "\x10SendManageAction\x12!.osmanage.SendManageActionRequest\x1a\".osmanage.SendManageActionResponseB5Z3github.com/OpenSlides/openslides-cli/proto/osmanageb\x06proto3" @@ -3000,38 +2998,34 @@ var file_proto_osmanage_proto_depIdxs = []int32{ 29, // 24: osmanage.OsmanageService.StopInstance:input_type -> osmanage.StopInstanceRequest 33, // 25: osmanage.OsmanageService.GetCollection:input_type -> osmanage.GetCollectionRequest 35, // 26: osmanage.OsmanageService.MigrationsMigrate:input_type -> osmanage.MigrationsRequest - 35, // 27: osmanage.OsmanageService.MigrationsFinalize:input_type -> osmanage.MigrationsRequest - 0, // 28: osmanage.OsmanageService.StreamLogs:input_type -> osmanage.LogStreamRequest - 35, // 29: osmanage.OsmanageService.MigrationsReset:input_type -> osmanage.MigrationsRequest - 35, // 30: osmanage.OsmanageService.MigrationsClearCollectionfieldTables:input_type -> osmanage.MigrationsRequest - 35, // 31: osmanage.OsmanageService.MigrationsStats:input_type -> osmanage.MigrationsRequest - 35, // 32: osmanage.OsmanageService.MigrationsProgress:input_type -> osmanage.MigrationsRequest - 38, // 33: osmanage.OsmanageService.SendManageAction:input_type -> osmanage.SendManageActionRequest - 3, // 34: osmanage.OsmanageService.SetupInstance:output_type -> osmanage.InstanceConfigResponse - 3, // 35: osmanage.OsmanageService.ConfigInstance:output_type -> osmanage.InstanceConfigResponse - 5, // 36: osmanage.OsmanageService.CreateInstance:output_type -> osmanage.CreateInstanceResponse - 7, // 37: osmanage.OsmanageService.RemoveInstance:output_type -> osmanage.RemoveInstanceResponse - 9, // 38: osmanage.OsmanageService.GetNamespaceExists:output_type -> osmanage.GetNamespaceExistsResponse - 11, // 39: osmanage.OsmanageService.GetClusterStatus:output_type -> osmanage.GetClusterStatusResponse - 13, // 40: osmanage.OsmanageService.GetServiceAddress:output_type -> osmanage.GetServiceAddressResponse - 15, // 41: osmanage.OsmanageService.GetInstanceHealth:output_type -> osmanage.GetInstanceHealthResponse - 20, // 42: osmanage.OsmanageService.GetInstanceStatus:output_type -> osmanage.GetInstanceStatusResponse - 22, // 43: osmanage.OsmanageService.UpdateBackendmanage:output_type -> osmanage.UpdateBackendmanageResponse - 24, // 44: osmanage.OsmanageService.UpdateInstance:output_type -> osmanage.UpdateInstanceResponse - 26, // 45: osmanage.OsmanageService.ScaleService:output_type -> osmanage.ScaleServiceResponse - 28, // 46: osmanage.OsmanageService.StartInstance:output_type -> osmanage.StartInstanceResponse - 30, // 47: osmanage.OsmanageService.StopInstance:output_type -> osmanage.StopInstanceResponse - 34, // 48: osmanage.OsmanageService.GetCollection:output_type -> osmanage.GetCollectionResponse - 37, // 49: osmanage.OsmanageService.MigrationsMigrate:output_type -> osmanage.MigrationsProgressResponse - 37, // 50: osmanage.OsmanageService.MigrationsFinalize:output_type -> osmanage.MigrationsProgressResponse - 1, // 51: osmanage.OsmanageService.StreamLogs:output_type -> osmanage.LogEntry - 36, // 52: osmanage.OsmanageService.MigrationsReset:output_type -> osmanage.MigrationsResponse - 36, // 53: osmanage.OsmanageService.MigrationsClearCollectionfieldTables:output_type -> osmanage.MigrationsResponse - 36, // 54: osmanage.OsmanageService.MigrationsStats:output_type -> osmanage.MigrationsResponse - 36, // 55: osmanage.OsmanageService.MigrationsProgress:output_type -> osmanage.MigrationsResponse - 39, // 56: osmanage.OsmanageService.SendManageAction:output_type -> osmanage.SendManageActionResponse - 34, // [34:57] is the sub-list for method output_type - 11, // [11:34] is the sub-list for method input_type + 0, // 27: osmanage.OsmanageService.StreamLogs:input_type -> osmanage.LogStreamRequest + 35, // 28: osmanage.OsmanageService.MigrationsReset:input_type -> osmanage.MigrationsRequest + 35, // 29: osmanage.OsmanageService.MigrationsStats:input_type -> osmanage.MigrationsRequest + 35, // 30: osmanage.OsmanageService.MigrationsProgress:input_type -> osmanage.MigrationsRequest + 38, // 31: osmanage.OsmanageService.SendManageAction:input_type -> osmanage.SendManageActionRequest + 3, // 32: osmanage.OsmanageService.SetupInstance:output_type -> osmanage.InstanceConfigResponse + 3, // 33: osmanage.OsmanageService.ConfigInstance:output_type -> osmanage.InstanceConfigResponse + 5, // 34: osmanage.OsmanageService.CreateInstance:output_type -> osmanage.CreateInstanceResponse + 7, // 35: osmanage.OsmanageService.RemoveInstance:output_type -> osmanage.RemoveInstanceResponse + 9, // 36: osmanage.OsmanageService.GetNamespaceExists:output_type -> osmanage.GetNamespaceExistsResponse + 11, // 37: osmanage.OsmanageService.GetClusterStatus:output_type -> osmanage.GetClusterStatusResponse + 13, // 38: osmanage.OsmanageService.GetServiceAddress:output_type -> osmanage.GetServiceAddressResponse + 15, // 39: osmanage.OsmanageService.GetInstanceHealth:output_type -> osmanage.GetInstanceHealthResponse + 20, // 40: osmanage.OsmanageService.GetInstanceStatus:output_type -> osmanage.GetInstanceStatusResponse + 22, // 41: osmanage.OsmanageService.UpdateBackendmanage:output_type -> osmanage.UpdateBackendmanageResponse + 24, // 42: osmanage.OsmanageService.UpdateInstance:output_type -> osmanage.UpdateInstanceResponse + 26, // 43: osmanage.OsmanageService.ScaleService:output_type -> osmanage.ScaleServiceResponse + 28, // 44: osmanage.OsmanageService.StartInstance:output_type -> osmanage.StartInstanceResponse + 30, // 45: osmanage.OsmanageService.StopInstance:output_type -> osmanage.StopInstanceResponse + 34, // 46: osmanage.OsmanageService.GetCollection:output_type -> osmanage.GetCollectionResponse + 37, // 47: osmanage.OsmanageService.MigrationsMigrate:output_type -> osmanage.MigrationsProgressResponse + 1, // 48: osmanage.OsmanageService.StreamLogs:output_type -> osmanage.LogEntry + 36, // 49: osmanage.OsmanageService.MigrationsReset:output_type -> osmanage.MigrationsResponse + 36, // 50: osmanage.OsmanageService.MigrationsStats:output_type -> osmanage.MigrationsResponse + 36, // 51: osmanage.OsmanageService.MigrationsProgress:output_type -> osmanage.MigrationsResponse + 39, // 52: osmanage.OsmanageService.SendManageAction:output_type -> osmanage.SendManageActionResponse + 32, // [32:53] is the sub-list for method output_type + 11, // [11:32] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name diff --git a/proto/osmanage/osmanage_grpc.pb.go b/proto/osmanage/osmanage_grpc.pb.go index 48a1fed..8c063f7 100644 --- a/proto/osmanage/osmanage_grpc.pb.go +++ b/proto/osmanage/osmanage_grpc.pb.go @@ -19,29 +19,27 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - OsmanageService_SetupInstance_FullMethodName = "/osmanage.OsmanageService/SetupInstance" - OsmanageService_ConfigInstance_FullMethodName = "/osmanage.OsmanageService/ConfigInstance" - OsmanageService_CreateInstance_FullMethodName = "/osmanage.OsmanageService/CreateInstance" - OsmanageService_RemoveInstance_FullMethodName = "/osmanage.OsmanageService/RemoveInstance" - OsmanageService_GetNamespaceExists_FullMethodName = "/osmanage.OsmanageService/GetNamespaceExists" - OsmanageService_GetClusterStatus_FullMethodName = "/osmanage.OsmanageService/GetClusterStatus" - OsmanageService_GetServiceAddress_FullMethodName = "/osmanage.OsmanageService/GetServiceAddress" - OsmanageService_GetInstanceHealth_FullMethodName = "/osmanage.OsmanageService/GetInstanceHealth" - OsmanageService_GetInstanceStatus_FullMethodName = "/osmanage.OsmanageService/GetInstanceStatus" - OsmanageService_UpdateBackendmanage_FullMethodName = "/osmanage.OsmanageService/UpdateBackendmanage" - OsmanageService_UpdateInstance_FullMethodName = "/osmanage.OsmanageService/UpdateInstance" - OsmanageService_ScaleService_FullMethodName = "/osmanage.OsmanageService/ScaleService" - OsmanageService_StartInstance_FullMethodName = "/osmanage.OsmanageService/StartInstance" - OsmanageService_StopInstance_FullMethodName = "/osmanage.OsmanageService/StopInstance" - OsmanageService_GetCollection_FullMethodName = "/osmanage.OsmanageService/GetCollection" - OsmanageService_MigrationsMigrate_FullMethodName = "/osmanage.OsmanageService/MigrationsMigrate" - OsmanageService_MigrationsFinalize_FullMethodName = "/osmanage.OsmanageService/MigrationsFinalize" - OsmanageService_StreamLogs_FullMethodName = "/osmanage.OsmanageService/StreamLogs" - OsmanageService_MigrationsReset_FullMethodName = "/osmanage.OsmanageService/MigrationsReset" - OsmanageService_MigrationsClearCollectionfieldTables_FullMethodName = "/osmanage.OsmanageService/MigrationsClearCollectionfieldTables" - OsmanageService_MigrationsStats_FullMethodName = "/osmanage.OsmanageService/MigrationsStats" - OsmanageService_MigrationsProgress_FullMethodName = "/osmanage.OsmanageService/MigrationsProgress" - OsmanageService_SendManageAction_FullMethodName = "/osmanage.OsmanageService/SendManageAction" + OsmanageService_SetupInstance_FullMethodName = "/osmanage.OsmanageService/SetupInstance" + OsmanageService_ConfigInstance_FullMethodName = "/osmanage.OsmanageService/ConfigInstance" + OsmanageService_CreateInstance_FullMethodName = "/osmanage.OsmanageService/CreateInstance" + OsmanageService_RemoveInstance_FullMethodName = "/osmanage.OsmanageService/RemoveInstance" + OsmanageService_GetNamespaceExists_FullMethodName = "/osmanage.OsmanageService/GetNamespaceExists" + OsmanageService_GetClusterStatus_FullMethodName = "/osmanage.OsmanageService/GetClusterStatus" + OsmanageService_GetServiceAddress_FullMethodName = "/osmanage.OsmanageService/GetServiceAddress" + OsmanageService_GetInstanceHealth_FullMethodName = "/osmanage.OsmanageService/GetInstanceHealth" + OsmanageService_GetInstanceStatus_FullMethodName = "/osmanage.OsmanageService/GetInstanceStatus" + OsmanageService_UpdateBackendmanage_FullMethodName = "/osmanage.OsmanageService/UpdateBackendmanage" + OsmanageService_UpdateInstance_FullMethodName = "/osmanage.OsmanageService/UpdateInstance" + OsmanageService_ScaleService_FullMethodName = "/osmanage.OsmanageService/ScaleService" + OsmanageService_StartInstance_FullMethodName = "/osmanage.OsmanageService/StartInstance" + OsmanageService_StopInstance_FullMethodName = "/osmanage.OsmanageService/StopInstance" + OsmanageService_GetCollection_FullMethodName = "/osmanage.OsmanageService/GetCollection" + OsmanageService_MigrationsMigrate_FullMethodName = "/osmanage.OsmanageService/MigrationsMigrate" + OsmanageService_StreamLogs_FullMethodName = "/osmanage.OsmanageService/StreamLogs" + OsmanageService_MigrationsReset_FullMethodName = "/osmanage.OsmanageService/MigrationsReset" + OsmanageService_MigrationsStats_FullMethodName = "/osmanage.OsmanageService/MigrationsStats" + OsmanageService_MigrationsProgress_FullMethodName = "/osmanage.OsmanageService/MigrationsProgress" + OsmanageService_SendManageAction_FullMethodName = "/osmanage.OsmanageService/SendManageAction" ) // OsmanageServiceClient is the client API for OsmanageService service. @@ -68,11 +66,9 @@ type OsmanageServiceClient interface { GetCollection(ctx context.Context, in *GetCollectionRequest, opts ...grpc.CallOption) (*GetCollectionResponse, error) // server side streaming MigrationsMigrate(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MigrationsProgressResponse], error) - MigrationsFinalize(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MigrationsProgressResponse], error) StreamLogs(ctx context.Context, in *LogStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogEntry], error) // unary gRPC calls MigrationsReset(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) - MigrationsClearCollectionfieldTables(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) MigrationsStats(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) MigrationsProgress(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) // generic manage action via backendmanage client @@ -310,28 +306,9 @@ func (c *osmanageServiceClient) MigrationsMigrate(ctx context.Context, in *Migra // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type OsmanageService_MigrationsMigrateClient = grpc.ServerStreamingClient[MigrationsProgressResponse] -func (c *osmanageServiceClient) MigrationsFinalize(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MigrationsProgressResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &OsmanageService_ServiceDesc.Streams[7], OsmanageService_MigrationsFinalize_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[MigrationsRequest, MigrationsProgressResponse]{ClientStream: stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type OsmanageService_MigrationsFinalizeClient = grpc.ServerStreamingClient[MigrationsProgressResponse] - func (c *osmanageServiceClient) StreamLogs(ctx context.Context, in *LogStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogEntry], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &OsmanageService_ServiceDesc.Streams[8], OsmanageService_StreamLogs_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &OsmanageService_ServiceDesc.Streams[7], OsmanageService_StreamLogs_FullMethodName, cOpts...) if err != nil { return nil, err } @@ -358,16 +335,6 @@ func (c *osmanageServiceClient) MigrationsReset(ctx context.Context, in *Migrati return out, nil } -func (c *osmanageServiceClient) MigrationsClearCollectionfieldTables(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MigrationsResponse) - err := c.cc.Invoke(ctx, OsmanageService_MigrationsClearCollectionfieldTables_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *osmanageServiceClient) MigrationsStats(ctx context.Context, in *MigrationsRequest, opts ...grpc.CallOption) (*MigrationsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MigrationsResponse) @@ -422,11 +389,9 @@ type OsmanageServiceServer interface { GetCollection(context.Context, *GetCollectionRequest) (*GetCollectionResponse, error) // server side streaming MigrationsMigrate(*MigrationsRequest, grpc.ServerStreamingServer[MigrationsProgressResponse]) error - MigrationsFinalize(*MigrationsRequest, grpc.ServerStreamingServer[MigrationsProgressResponse]) error StreamLogs(*LogStreamRequest, grpc.ServerStreamingServer[LogEntry]) error // unary gRPC calls MigrationsReset(context.Context, *MigrationsRequest) (*MigrationsResponse, error) - MigrationsClearCollectionfieldTables(context.Context, *MigrationsRequest) (*MigrationsResponse, error) MigrationsStats(context.Context, *MigrationsRequest) (*MigrationsResponse, error) MigrationsProgress(context.Context, *MigrationsRequest) (*MigrationsResponse, error) // generic manage action via backendmanage client @@ -489,18 +454,12 @@ func (UnimplementedOsmanageServiceServer) GetCollection(context.Context, *GetCol func (UnimplementedOsmanageServiceServer) MigrationsMigrate(*MigrationsRequest, grpc.ServerStreamingServer[MigrationsProgressResponse]) error { return status.Error(codes.Unimplemented, "method MigrationsMigrate not implemented") } -func (UnimplementedOsmanageServiceServer) MigrationsFinalize(*MigrationsRequest, grpc.ServerStreamingServer[MigrationsProgressResponse]) error { - return status.Error(codes.Unimplemented, "method MigrationsFinalize not implemented") -} func (UnimplementedOsmanageServiceServer) StreamLogs(*LogStreamRequest, grpc.ServerStreamingServer[LogEntry]) error { return status.Error(codes.Unimplemented, "method StreamLogs not implemented") } func (UnimplementedOsmanageServiceServer) MigrationsReset(context.Context, *MigrationsRequest) (*MigrationsResponse, error) { return nil, status.Error(codes.Unimplemented, "method MigrationsReset not implemented") } -func (UnimplementedOsmanageServiceServer) MigrationsClearCollectionfieldTables(context.Context, *MigrationsRequest) (*MigrationsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method MigrationsClearCollectionfieldTables not implemented") -} func (UnimplementedOsmanageServiceServer) MigrationsStats(context.Context, *MigrationsRequest) (*MigrationsResponse, error) { return nil, status.Error(codes.Unimplemented, "method MigrationsStats not implemented") } @@ -770,17 +729,6 @@ func _OsmanageService_MigrationsMigrate_Handler(srv interface{}, stream grpc.Ser // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type OsmanageService_MigrationsMigrateServer = grpc.ServerStreamingServer[MigrationsProgressResponse] -func _OsmanageService_MigrationsFinalize_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(MigrationsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(OsmanageServiceServer).MigrationsFinalize(m, &grpc.GenericServerStream[MigrationsRequest, MigrationsProgressResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type OsmanageService_MigrationsFinalizeServer = grpc.ServerStreamingServer[MigrationsProgressResponse] - func _OsmanageService_StreamLogs_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(LogStreamRequest) if err := stream.RecvMsg(m); err != nil { @@ -810,24 +758,6 @@ func _OsmanageService_MigrationsReset_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _OsmanageService_MigrationsClearCollectionfieldTables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MigrationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OsmanageServiceServer).MigrationsClearCollectionfieldTables(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OsmanageService_MigrationsClearCollectionfieldTables_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OsmanageServiceServer).MigrationsClearCollectionfieldTables(ctx, req.(*MigrationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _OsmanageService_MigrationsStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MigrationsRequest) if err := dec(in); err != nil { @@ -929,10 +859,6 @@ var OsmanageService_ServiceDesc = grpc.ServiceDesc{ MethodName: "MigrationsReset", Handler: _OsmanageService_MigrationsReset_Handler, }, - { - MethodName: "MigrationsClearCollectionfieldTables", - Handler: _OsmanageService_MigrationsClearCollectionfieldTables_Handler, - }, { MethodName: "MigrationsStats", Handler: _OsmanageService_MigrationsStats_Handler, @@ -982,11 +908,6 @@ var OsmanageService_ServiceDesc = grpc.ServiceDesc{ Handler: _OsmanageService_MigrationsMigrate_Handler, ServerStreams: true, }, - { - StreamName: "MigrationsFinalize", - Handler: _OsmanageService_MigrationsFinalize_Handler, - ServerStreams: true, - }, { StreamName: "StreamLogs", Handler: _OsmanageService_StreamLogs_Handler, From 988f94d1eeeec8a4d100f7dba14f99798087b839 Mon Sep 17 00:00:00 2001 From: aantoni Date: Mon, 20 Jul 2026 15:57:56 +0200 Subject: [PATCH 3/4] Fix stop condition for migrations migrate --- internal/constants/constants.go | 5 ++++- internal/manage/actions/migrations/migrations.go | 8 ++++---- .../manage/actions/migrations/migrations_test.go | 14 +++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index b3f32bc..ae904ac 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -223,9 +223,12 @@ const ( // MigrationStatusFailed indicates a migration process has failed MigrationStatusFailed string = "migration_failed" - // MigrationStatusFinished indicates a migration process has finished successfully + // MigrationStatusFinished indicates a migration modules process has finished successfully MigrationStatusFinished string = "migration_finished" + // MigrationStatusFinalized indicates a migration has successfully finished and tables have been persisted to outside transactions + MigrationStatusFinalized string = "finalized" + // MigrationMaxRetries is the maximum number of retry attempts for failed migration requests MigrationMaxRetries int = 8 diff --git a/internal/manage/actions/migrations/migrations.go b/internal/manage/actions/migrations/migrations.go index b41164f..049dd02 100644 --- a/internal/manage/actions/migrations/migrations.go +++ b/internal/manage/actions/migrations/migrations.go @@ -124,7 +124,7 @@ func createMigrationCmd(name, description string, withProgressTracking bool) *co if withProgressTracking && progressInterval != nil && *progressInterval > 0 && Running(response) { // check whether migration has been completed successfully (not running and finished) - stopCondition := func(r *pb.MigrationsResponse) bool { return !Running(r) && Finished(r) } + stopCondition := func(r *pb.MigrationsResponse) bool { return !Running(r) && Finalized(r) } printCallback := func(update *pb.MigrationsProgressResponse) error { fmt.Print(update.Output) @@ -309,9 +309,9 @@ func Running(mr *pb.MigrationsResponse) bool { return mr.Status == constants.MigrationStatusRunning } -// Finished returns true if the migration has finished successfully -func Finished(mr *pb.MigrationsResponse) bool { - return mr.Status == constants.MigrationStatusFinished +// Finalized returns true if the migration has finalized successfully +func Finalized(mr *pb.MigrationsResponse) bool { + return mr.Status == constants.MigrationStatusFinalized } // isRetryableError determines if an error should trigger a retry diff --git a/internal/manage/actions/migrations/migrations_test.go b/internal/manage/actions/migrations/migrations_test.go index b96f944..bec2f4b 100644 --- a/internal/manage/actions/migrations/migrations_test.go +++ b/internal/manage/actions/migrations/migrations_test.go @@ -61,13 +61,13 @@ func TestRunning(t *testing.T) { } } -func TestFinished(t *testing.T) { +func TestFinalized(t *testing.T) { tests := []struct { - name string - status string - finished bool + name string + status string + finalized bool }{ - {"finished", constants.MigrationStatusFinished, true}, + {"finalized", constants.MigrationStatusFinalized, true}, {"completed", "completed", false}, {"failed", "failed", false}, {"empty", "", false}, @@ -75,8 +75,8 @@ func TestFinished(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { resp := &pb.MigrationsResponse{Status: tt.status} - if got := Finished(resp); got != tt.finished { - t.Errorf("Finished() = %v, want %v", got, tt.finished) + if got := Finalized(resp); got != tt.finalized { + t.Errorf("Finalized() = %v, want %v", got, tt.finalized) } }) } From 26a1b0a1f9d488c719c36018336fa2b67abf8760 Mon Sep 17 00:00:00 2001 From: Magnus Schieder Date: Thu, 22 Oct 2026 16:00:20 +0200 Subject: [PATCH 4/4] Add prune flag for k8s action update --- Makefile | 5 +++++ internal/grpc/server/update_instance.go | 2 +- internal/k8s/actions/update_instance.go | 11 ++++++++--- proto/osmanage.proto | 3 ++- proto/osmanage/osmanage.pb.go | 15 ++++++++++++--- proto/osmanage/osmanage_grpc.pb.go | 2 +- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index bf369c1..d97eddc 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,11 @@ build-prod osmanage: build-dev: go build -o osmanage ./cmd/osmanage +gen-proto: + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + export PATH="$$PATH:$$(go env GOPATH)/bin"; \ + protoc --go_out=. --go_opt=module=github.com/OpenSlides/openslides-cli --go-grpc_out=. --go-grpc_opt=module=github.com/OpenSlides/openslides-cli proto/osmanage.proto # Tests / Linting diff --git a/internal/grpc/server/update_instance.go b/internal/grpc/server/update_instance.go index dd3bd0b..847f962 100644 --- a/internal/grpc/server/update_instance.go +++ b/internal/grpc/server/update_instance.go @@ -44,7 +44,7 @@ func (s *OsmanageServiceServer) UpdateInstance( }) } - err = actions.UpdateInstance(ctx, k8sClient, req.InstanceDir, req.SkipReadyCheck, timeout, streamCallback, inactiveCallback) + err = actions.UpdateInstance(ctx, k8sClient, req.InstanceDir, req.SkipReadyCheck, timeout, streamCallback, inactiveCallback, req.Prune) if err != nil { return stream.Send(&pb.UpdateInstanceResponse{ Complete: true, diff --git a/internal/k8s/actions/update_instance.go b/internal/k8s/actions/update_instance.go index d04e2d0..77763e6 100644 --- a/internal/k8s/actions/update_instance.go +++ b/internal/k8s/actions/update_instance.go @@ -33,6 +33,7 @@ func UpdateInstanceCmd() *cobra.Command { kubeconfig := cmd.Flags().String("kubeconfig", "", "Path to kubeconfig file") skipReadyCheck := cmd.Flags().Bool("skip-ready-check", false, "Skip waiting for instance to become ready") + prune := cmd.Flags().Bool("pruen", false, "Prune Kubernetes instance resources that are no longer in use.") timeout := cmd.Flags().Duration("timeout", constants.DefaultInstanceTimeout, "Timeout for instance health check") cmd.RunE = func(cmd *cobra.Command, args []string) error { @@ -46,7 +47,7 @@ func UpdateInstanceCmd() *cobra.Command { return fmt.Errorf("creating k8s client: %w", err) } - if err := UpdateInstance(context.Background(), k8sClient, instanceDir, *skipReadyCheck, *timeout, nil, nil); err != nil { + if err := UpdateInstance(context.Background(), k8sClient, instanceDir, *skipReadyCheck, *timeout, nil, nil, *prune); err != nil { return err } @@ -67,6 +68,7 @@ func UpdateInstance( timeout time.Duration, callback func(*HealthStatus) error, inactiveCallback func() error, + prune bool, ) error { namespace := utils.ExtractNamespace(instanceDir) logger.Info("Namespace: %s", namespace) @@ -92,12 +94,15 @@ func UpdateInstance( stackDir := filepath.Join(instanceDir, constants.StackDirName) applied, err := applyDirectory(ctx, k8sClient, stackDir, nil) + if err != nil { return fmt.Errorf("applying stack: %w", err) } - if err := pruneOrphans(ctx, k8sClient, namespace, applied); err != nil { - logger.Warn("Failed to prune orphaned resources: %v", err) + if prune { + if err := pruneOrphans(ctx, k8sClient, namespace, applied); err != nil { + logger.Warn("Failed to prune orphaned resources: %v", err) + } } if skipReadyCheck { diff --git a/proto/osmanage.proto b/proto/osmanage.proto index 25026da..22e4e6c 100644 --- a/proto/osmanage.proto +++ b/proto/osmanage.proto @@ -187,6 +187,7 @@ message UpdateInstanceRequest { string kubeconfig = 2; bool skip_ready_check = 3; int32 timeout_seconds = 4; + bool prune = 5; } message UpdateInstanceResponse { @@ -310,4 +311,4 @@ message SendManageActionResponse { bool success = 1; string error = 2; bytes body = 3; -} \ No newline at end of file +} diff --git a/proto/osmanage/osmanage.pb.go b/proto/osmanage/osmanage.pb.go index 7e1d246..3984cbb 100644 --- a/proto/osmanage/osmanage.pb.go +++ b/proto/osmanage/osmanage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 +// protoc-gen-go v1.36.12 // protoc v3.21.12 // source: proto/osmanage.proto @@ -1424,6 +1424,7 @@ type UpdateInstanceRequest struct { Kubeconfig string `protobuf:"bytes,2,opt,name=kubeconfig,proto3" json:"kubeconfig,omitempty"` SkipReadyCheck bool `protobuf:"varint,3,opt,name=skip_ready_check,json=skipReadyCheck,proto3" json:"skip_ready_check,omitempty"` TimeoutSeconds int32 `protobuf:"varint,4,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` + Prune bool `protobuf:"varint,5,opt,name=prune,proto3" json:"prune,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1486,6 +1487,13 @@ func (x *UpdateInstanceRequest) GetTimeoutSeconds() int32 { return 0 } +func (x *UpdateInstanceRequest) GetPrune() bool { + if x != nil { + return x.Prune + } + return false +} + type UpdateInstanceResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Healthy bool `protobuf:"varint,1,opt,name=healthy,proto3" json:"healthy,omitempty"` @@ -2771,14 +2779,15 @@ const file_proto_osmanage_proto_rawDesc = "" + "\bcomplete\x18\x01 \x01(\bR\bcomplete\x12\x14\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12%\n" + "\x0eready_replicas\x18\x03 \x01(\x05R\rreadyReplicas\x12)\n" + - "\x10desired_replicas\x18\x04 \x01(\x05R\x0fdesiredReplicas\"\xad\x01\n" + + "\x10desired_replicas\x18\x04 \x01(\x05R\x0fdesiredReplicas\"\xc3\x01\n" + "\x15UpdateInstanceRequest\x12!\n" + "\finstance_dir\x18\x01 \x01(\tR\vinstanceDir\x12\x1e\n" + "\n" + "kubeconfig\x18\x02 \x01(\tR\n" + "kubeconfig\x12(\n" + "\x10skip_ready_check\x18\x03 \x01(\bR\x0eskipReadyCheck\x12'\n" + - "\x0ftimeout_seconds\x18\x04 \x01(\x05R\x0etimeoutSeconds\"\x88\x02\n" + + "\x0ftimeout_seconds\x18\x04 \x01(\x05R\x0etimeoutSeconds\x12\x14\n" + + "\x05prune\x18\x05 \x01(\bR\x05prune\"\x88\x02\n" + "\x16UpdateInstanceResponse\x12\x18\n" + "\ahealthy\x18\x01 \x01(\bR\ahealthy\x12\x1d\n" + "\n" + diff --git a/proto/osmanage/osmanage_grpc.pb.go b/proto/osmanage/osmanage_grpc.pb.go index 8c063f7..a890d55 100644 --- a/proto/osmanage/osmanage_grpc.pb.go +++ b/proto/osmanage/osmanage_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.1 +// - protoc-gen-go-grpc v1.6.2 // - protoc v3.21.12 // source: proto/osmanage.proto