From 084550481fbf89eb74025ed926de663a5db5310a Mon Sep 17 00:00:00 2001 From: Brice Amen Date: Thu, 15 Oct 2026 16:31:31 +0200 Subject: [PATCH] chore(deps): bump go-scalingo to v11.8.0 for generic continuous backup events [STORY-4495] --- CHANGELOG.md | 1 + go.mod | 2 +- go.sum | 4 +- .../Scalingo/go-scalingo/v11/CHANGELOG.md | 6 ++ .../Scalingo/go-scalingo/v11/Dockerfile | 3 +- .../Scalingo/go-scalingo/v11/README.md | 4 +- .../Scalingo/go-scalingo/v11/events_addon.go | 59 +++++++++---------- .../go-scalingo/v11/events_boilerplate.go | 4 ++ .../go-scalingo/v11/events_specialize.go | 2 + .../go-scalingo/v11/events_structs.go | 16 +++++ .../Scalingo/go-scalingo/v11/version.go | 2 +- vendor/modules.txt | 4 +- 12 files changed, 68 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dd217942..dc2a2ed1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## To Be Released +* chore(deps): update go-scalingo to v11.8.0 to display a generic status and error in continuous backup events and support the `redis_to_valkey_migration_completed` event * feat(dbdr): add `database-config` command to set maintenance window ** fix(README): missing version bump to 1.50 in the tweet command * fix(backups-create): returns an error when the backup fails diff --git a/go.mod b/go.mod index fa3de0e0a..a55bf0ef4 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.26.8 require ( charm.land/huh/v2 v2.0.3 - github.com/Scalingo/go-scalingo/v11 v11.7.0 + github.com/Scalingo/go-scalingo/v11 v11.8.0 github.com/Scalingo/go-utils/errors/v3 v3.2.1 github.com/Scalingo/go-utils/logger v1.13.0 github.com/Scalingo/go-utils/pagination v1.2.0 diff --git a/go.sum b/go.sum index c8ac01f34..bcfe16b0f 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.5.2 h1:cucYnvqcY7UOXVD//mSyjeaPY0SSN3v5cDkYPxumINk= github.com/ProtonMail/go-crypto v1.5.2/go.mod h1:/RaSu30DaKO4RY+XdV/ACcCcZkGr7AhUIduq5sjzzCo= -github.com/Scalingo/go-scalingo/v11 v11.7.0 h1:Xo0vEZV0QTaLq/FUm0BPd6tfcJ+x1UA6tnL4WRbCoWA= -github.com/Scalingo/go-scalingo/v11 v11.7.0/go.mod h1:HqA3+BPLXmXQoqyX0cPB5TIIl83O1RV/THniq2k1Q4k= +github.com/Scalingo/go-scalingo/v11 v11.8.0 h1:dzekN/F5izfoUx1kfB/4+IYF76tu9ULXNXQFw+3bAak= +github.com/Scalingo/go-scalingo/v11 v11.8.0/go.mod h1:CFTjdLuGJyCg0b1WShTbKC1cjbczj5kpGT55pUXZj0k= github.com/Scalingo/go-utils/errors/v3 v3.2.1 h1:2w3qUz6MxJa3aqx/biz2G3JquSKsFnfz/E7wrNf/LPc= github.com/Scalingo/go-utils/errors/v3 v3.2.1/go.mod h1:jVVNoOdYFjuNkR/BeEZWNWJVvu4jmyLY4udlsQQyBss= github.com/Scalingo/go-utils/logger v1.13.0 h1:3dW2hDo50Oqvdoi1iEFXX0GRRKLvjJLeV68ooObHLmY= diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/CHANGELOG.md b/vendor/github.com/Scalingo/go-scalingo/v11/CHANGELOG.md index 69ccfb99f..fafa5d309 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/CHANGELOG.md +++ b/vendor/github.com/Scalingo/go-scalingo/v11/CHANGELOG.md @@ -2,6 +2,12 @@ ## To Be Released +## 11.8.0 + +* fix(events): stop formatting backup tool statuses in continuous backup events, display the status and error returned by the API +* feat: add `CompleteRedisToValkeyMigrationEvent` event +* feat: add `RedisToValkeyMigrationCompletedEvent` + ## 11.7.0 * feat(tokens): add `TokenDelete` method diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/Dockerfile b/vendor/github.com/Scalingo/go-scalingo/v11/Dockerfile index d7a757cd2..b2d736ecc 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/Dockerfile +++ b/vendor/github.com/Scalingo/go-scalingo/v11/Dockerfile @@ -1,4 +1,5 @@ -FROM golang:1.25 +FROM golang:1.26.8 + MAINTAINER Étienne Michon "etienne@scalingo.com" RUN go install github.com/cespare/reflex@latest diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/README.md b/vendor/github.com/Scalingo/go-scalingo/v11/README.md index 947646a75..602a77445 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/README.md +++ b/vendor/github.com/Scalingo/go-scalingo/v11/README.md @@ -1,4 +1,4 @@ -# Go client for Scalingo API v11.7.0 +# Go client for Scalingo API v11.8.0 This repository is the Go client for the [Scalingo APIs](https://developers.scalingo.com/). @@ -81,7 +81,7 @@ Bump new version number in: Commit, tag and create a new release: ```sh -version="11.7.0" +version="11.8.0" git switch --create release/${version} git add CHANGELOG.md README.md version.go diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/events_addon.go b/vendor/github.com/Scalingo/go-scalingo/v11/events_addon.go index 7e559fa0a..78b3a0f53 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/events_addon.go +++ b/vendor/github.com/Scalingo/go-scalingo/v11/events_addon.go @@ -259,17 +259,25 @@ type EventDatabaseBackupFailedTypeData struct { EventSecurityTypeData } +// ContinuousBackupStatus is the public status of a database continuous backup +type ContinuousBackupStatus string + +const ( + ContinuousBackupStatusHealthy ContinuousBackupStatus = "healthy" + ContinuousBackupStatusUnhealthy ContinuousBackupStatus = "unhealthy" +) + type EventDatabaseContinuousBackupTypeData struct { EventSecurityTypeData - AddonName string `json:"addon_name"` - ResourceID string `json:"resource_id"` - AddonUUID string `json:"addon_uuid"` - Status string `json:"status"` - Error string `json:"error"` - Recoverable bool `json:"recoverable"` - CheckedAt time.Time `json:"checked_at"` - UnrecoverableDurationSeconds int64 `json:"unrecoverable_duration_seconds"` + AddonName string `json:"addon_name"` + ResourceID string `json:"resource_id"` + AddonUUID string `json:"addon_uuid"` + Status ContinuousBackupStatus `json:"status"` + Error string `json:"error"` + Recoverable bool `json:"recoverable"` + CheckedAt time.Time `json:"checked_at"` + UnrecoverableDurationSeconds int64 `json:"unrecoverable_duration_seconds"` } type EventDatabaseContinuousBackupHealthyType struct { @@ -335,34 +343,25 @@ type EventDatabaseContinuousBackupStaleTypeData struct { EventDatabaseContinuousBackupTypeData } -func formatDatabaseContinuousBackupString(data EventDatabaseContinuousBackupTypeData, status string) string { +// formatDatabaseContinuousBackupString builds the text shown for a continuous +// backup event. The API only returns a generic status and error, so we display +// them as they are. +func formatDatabaseContinuousBackupString(data EventDatabaseContinuousBackupTypeData, eventStatus string) string { message := fmt.Sprintf( "Point-in-time recovery for database '%s' is %s", - data.ResourceID, status, + data.ResourceID, eventStatus, ) + details := []string{} - if data.Status != "" && data.Status != "healthy" { - details = append(details, "status: "+formatContinuousBackupStatus(data.Status)) + if data.Status != "" && data.Status != ContinuousBackupStatusHealthy { + details = append(details, "status: "+string(data.Status)) } - if data.Error == "" { - if len(details) == 0 { - return message - } - - return fmt.Sprintf("%s (%s)", message, strings.Join(details, ", ")) + if data.Error != "" { + details = append(details, "error: "+data.Error) + } + if len(details) == 0 { + return message } - details = append(details, "error: "+data.Error) return fmt.Sprintf("%s (%s)", message, strings.Join(details, ", ")) } - -func formatContinuousBackupStatus(status string) string { - switch status { - case "pgbackrest_error": - return "pgBackRest error" - case "wal_error": - return "WAL error" - default: - return status - } -} diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/events_boilerplate.go b/vendor/github.com/Scalingo/go-scalingo/v11/events_boilerplate.go index 379c8ee08..83aae7c7a 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/events_boilerplate.go +++ b/vendor/github.com/Scalingo/go-scalingo/v11/events_boilerplate.go @@ -251,6 +251,10 @@ func (e *EventStartRegionMigrationType) TypeDataPtr() any { return &e.TypeData } +func (e *EventRedisToValkeyMigrationCompletedType) TypeDataPtr() any { + return &e.TypeData +} + func (e *EventNewLogDrainType) TypeDataPtr() any { return &e.TypeData } diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/events_specialize.go b/vendor/github.com/Scalingo/go-scalingo/v11/events_specialize.go index 6c4182300..90645b5c5 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/events_specialize.go +++ b/vendor/github.com/Scalingo/go-scalingo/v11/events_specialize.go @@ -136,6 +136,8 @@ func (pev *Event) Specialize() DetailedEvent { e = &EventAddonUpdatedType{Event: ev} case EventStartRegionMigration: e = &EventStartRegionMigrationType{Event: ev} + case EventRedisToValkeyMigrationCompleted: + e = &EventRedisToValkeyMigrationCompletedType{Event: ev} case EventNewLogDrain: e = &EventNewLogDrainType{Event: ev} case EventDeleteLogDrain: diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/events_structs.go b/vendor/github.com/Scalingo/go-scalingo/v11/events_structs.go index dbc9ebdda..96793321e 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/events_structs.go +++ b/vendor/github.com/Scalingo/go-scalingo/v11/events_structs.go @@ -136,6 +136,7 @@ const ( EventDeleteAutoscaler EventTypeName = "delete_autoscaler" EventAddonUpdated EventTypeName = "addon_updated" EventStartRegionMigration EventTypeName = "start_region_migration" + EventRedisToValkeyMigrationCompleted EventTypeName = "redis_to_valkey_migration_completed" EventNewLogDrain EventTypeName = "new_log_drain" EventDeleteLogDrain EventTypeName = "delete_log_drain" EventNewAddonLogDrain EventTypeName = "new_addon_log_drain" @@ -729,6 +730,21 @@ func (ev *EventStartRegionMigrationType) String() string { return fmt.Sprintf("Application region migration started from %s to %s/%s", ev.TypeData.Source, ev.TypeData.Destination, ev.TypeData.DstAppName) } +type EventRedisToValkeyMigrationCompletedTypeData struct { + FromPlan string `json:"from_plan"` + ToPlan string `json:"to_plan"` +} + +type EventRedisToValkeyMigrationCompletedType struct { + Event + + TypeData EventRedisToValkeyMigrationCompletedTypeData `json:"type_data"` +} + +func (ev *EventRedisToValkeyMigrationCompletedType) String() string { + return fmt.Sprintf("Redis to Valkey migration completed from plan %s to %s", ev.TypeData.FromPlan, ev.TypeData.ToPlan) +} + // New log drain type EventNewLogDrainTypeData struct { URL string `json:"url"` diff --git a/vendor/github.com/Scalingo/go-scalingo/v11/version.go b/vendor/github.com/Scalingo/go-scalingo/v11/version.go index 64761d439..e7e3862b6 100644 --- a/vendor/github.com/Scalingo/go-scalingo/v11/version.go +++ b/vendor/github.com/Scalingo/go-scalingo/v11/version.go @@ -1,3 +1,3 @@ package scalingo -var Version = "11.7.0" +var Version = "11.8.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 583f5eee2..5d13790ba 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -59,8 +59,8 @@ github.com/ProtonMail/go-crypto/openpgp/s2k github.com/ProtonMail/go-crypto/openpgp/slhdsa github.com/ProtonMail/go-crypto/openpgp/x25519 github.com/ProtonMail/go-crypto/openpgp/x448 -# github.com/Scalingo/go-scalingo/v11 v11.7.0 -## explicit; go 1.25.0 +# github.com/Scalingo/go-scalingo/v11 v11.8.0 +## explicit; go 1.26.8 github.com/Scalingo/go-scalingo/v11 github.com/Scalingo/go-scalingo/v11/billing github.com/Scalingo/go-scalingo/v11/debug