From e02c01e76a1cc4685814f7a606ce837fc24beddc Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Wed, 17 May 2023 19:54:28 -0400 Subject: [PATCH 1/3] make it easier to specify lists of versions in the update graph with semver ranges --- pkg/updates/file.go | 3 + proposed-update-graph.yaml | 1 + tools/generate-update-graph/main.go | 259 ++++++++++++----------- tools/generate-update-graph/main_test.go | 100 +++++++++ tools/go.mod | 3 + tools/go.sum | 7 + 6 files changed, 250 insertions(+), 123 deletions(-) create mode 100644 tools/generate-update-graph/main_test.go diff --git a/pkg/updates/file.go b/pkg/updates/file.go index 121e2be2..1e7d84b3 100644 --- a/pkg/updates/file.go +++ b/pkg/updates/file.go @@ -46,6 +46,9 @@ type State struct { Migration string `json:"migration,omitempty"` Phase string `json:"phase,omitempty"` Digest string `json:"digest,omitempty"` + + // Deprecated releases can be updated from, but not to + Deprecated bool `json:"-"` } // UpdateGraph holds a graph of required update edges diff --git a/proposed-update-graph.yaml b/proposed-update-graph.yaml index 79e21c5a..bd86fd74 100644 --- a/proposed-update-graph.yaml +++ b/proposed-update-graph.yaml @@ -381,6 +381,7 @@ channels: - v1.14.1 - v1.15.0 - v1.16.2 + - v1.17.0 - v1.18.0 - v1.19.1 v1.14.0: diff --git a/tools/generate-update-graph/main.go b/tools/generate-update-graph/main.go index 8eb71ad7..f60c8104 100644 --- a/tools/generate-update-graph/main.go +++ b/tools/generate-update-graph/main.go @@ -3,7 +3,10 @@ package main import ( "fmt" "os" + "sort" + "strings" + "github.com/blang/semver/v4" "sigs.k8s.io/yaml" "github.com/authzed/spicedb-operator/pkg/config" @@ -45,8 +48,8 @@ func postgresChannel() updates.Channel { {ID: "v1.18.0", Tag: "v1.18.0", Migration: "drop-bigserial-ids"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "drop-bigserial-ids"}, {ID: "v1.16.2", Tag: "v1.16.2", Migration: "drop-bigserial-ids"}, - {ID: "v1.16.1", Tag: "v1.16.1", Migration: "drop-bigserial-ids"}, - {ID: "v1.16.0", Tag: "v1.16.0", Migration: "drop-bigserial-ids"}, + {ID: "v1.16.1", Tag: "v1.16.1", Migration: "drop-bigserial-ids", Deprecated: true}, + {ID: "v1.16.0", Tag: "v1.16.0", Migration: "drop-bigserial-ids", Deprecated: true}, {ID: "v1.15.0", Tag: "v1.15.0", Migration: "drop-bigserial-ids"}, {ID: "v1.14.1", Tag: "v1.14.1", Migration: "drop-bigserial-ids"}, {ID: "v1.14.0", Tag: "v1.14.0", Migration: "drop-bigserial-ids"}, @@ -59,13 +62,39 @@ func postgresChannel() updates.Channel { {ID: "v1.9.0", Tag: "v1.9.0", Migration: "add-unique-datastore-id"}, {ID: "v1.8.0", Tag: "v1.8.0", Migration: "add-unique-datastore-id"}, {ID: "v1.7.1", Tag: "v1.7.1", Migration: "add-unique-datastore-id"}, - {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add-unique-datastore-id"}, + {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add-unique-datastore-id", Deprecated: true}, {ID: "v1.6.0", Tag: "v1.6.0", Migration: "add-unique-datastore-id"}, {ID: "v1.5.0", Tag: "v1.5.0", Migration: "add-transaction-timestamp-index"}, {ID: "v1.4.0", Tag: "v1.4.0", Migration: "add-transaction-timestamp-index"}, {ID: "v1.3.0", Tag: "v1.3.0", Migration: "add-transaction-timestamp-index"}, {ID: "v1.2.0", Tag: "v1.2.0", Migration: "add-transaction-timestamp-index"}, } + edgePatterns := map[string]string{ + "v1.18.0": ">=1.19.1", + "v1.17.0": ">=1.18.0", + "v1.16.2": ">=1.17.0", + "v1.16.1": ">=1.16.2", + "v1.16.0": ">=1.16.2", + "v1.15.0": ">=1.16.2", + "v1.14.1": ">=1.15.0", + "v1.14.0": ">=1.14.1", + "v1.14.0-phase2": "1.14.0", + "v1.14.0-phase1": "1.14.0-phase2", + "v1.13.0": "1.14.0-phase1", + "v1.12.0": ">=1.13.0 <=1.14.0-phase1", + "v1.11.0": ">=1.12.0 <=1.14.0-phase1", + "v1.10.0": ">=1.11.0 <=1.14.0-phase1", + "v1.9.0": ">=1.10.0 <=1.14.0-phase1", + "v1.8.0": ">=1.9.0 <=1.14.0-phase1", + "v1.7.1": ">=1.8.0 <=1.14.0-phase1", + "v1.7.0": ">=1.7.1 <=1.14.0-phase1", + "v1.6.0": ">=1.7.1 <=1.14.0-phase1", + "v1.5.0": ">=1.6.0 <=1.14.0-phase1", + "v1.4.0": ">=1.5.0 <=1.14.0-phase1", + "v1.3.0": ">=1.4.0 <=1.14.0-phase1", + "v1.2.0": ">=1.3.0 <=1.14.0-phase1", + } + return updates.Channel{ Name: "stable", Metadata: map[string]string{ @@ -73,31 +102,7 @@ func postgresChannel() updates.Channel { "default": "true", }, Nodes: releases, - Edges: map[string][]string{ - "v1.18.0": {"v1.19.1"}, - "v1.17.0": {"v1.18.0", "v1.19.1"}, - "v1.16.2": {"v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.1": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.15.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.1": {"v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0-phase2": {"v1.14.0"}, - "v1.14.0-phase1": {"v1.14.0-phase2"}, - "v1.13.0": {"v1.14.0-phase1"}, - "v1.12.0": {"v1.13.0", "v1.14.0-phase1"}, - "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.7.1": {"v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.7.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.6.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.5.0": {"v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.4.0": {"v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.3.0": {"v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - "v1.2.0": {"v1.3.0", "v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.0-phase1"}, - }, + Edges: edgesFromPatterns(edgePatterns, releases), } } @@ -107,11 +112,11 @@ func crdbChannel() updates.Channel { {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add-caveats"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add-caveats"}, {ID: "v1.16.2", Tag: "v1.16.2", Migration: "add-caveats"}, - {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add-caveats"}, - {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add-caveats"}, + {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add-caveats", Deprecated: true}, + {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add-caveats", Deprecated: true}, {ID: "v1.15.0", Tag: "v1.15.0", Migration: "add-caveats"}, {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add-caveats"}, - {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats", Deprecated: true}, {ID: "v1.13.0", Tag: "v1.13.0", Migration: "add-metadata-and-counters"}, {ID: "v1.12.0", Tag: "v1.12.0", Migration: "add-metadata-and-counters"}, {ID: "v1.11.0", Tag: "v1.11.0", Migration: "add-metadata-and-counters"}, @@ -119,13 +124,36 @@ func crdbChannel() updates.Channel { {ID: "v1.9.0", Tag: "v1.9.0", Migration: "add-metadata-and-counters"}, {ID: "v1.8.0", Tag: "v1.8.0", Migration: "add-metadata-and-counters"}, {ID: "v1.7.1", Tag: "v1.7.1", Migration: "add-metadata-and-counters"}, - {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add-metadata-and-counters"}, + {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add-metadata-and-counters", Deprecated: true}, {ID: "v1.6.0", Tag: "v1.6.0", Migration: "add-metadata-and-counters"}, {ID: "v1.5.0", Tag: "v1.5.0", Migration: "add-transactions-table"}, {ID: "v1.4.0", Tag: "v1.4.0", Migration: "add-transactions-table"}, {ID: "v1.3.0", Tag: "v1.3.0", Migration: "add-transactions-table"}, {ID: "v1.2.0", Tag: "v1.2.0", Migration: "add-transactions-table"}, } + edgePatterns := map[string]string{ + "v1.18.0": ">=1.19.1", + "v1.17.0": ">=1.18.0", + "v1.16.2": ">=1.17.0", + "v1.16.1": ">=1.16.2", + "v1.16.0": ">=1.16.2", + "v1.15.0": ">=1.16.2", + "v1.14.1": ">=1.15.0", + "v1.14.0": ">=1.14.1", + "v1.13.0": ">=1.14.1", + "v1.12.0": ">=1.13.0", + "v1.11.0": ">=1.12.0", + "v1.10.0": ">=1.11.0", + "v1.9.0": ">=1.10.0", + "v1.8.0": ">=1.9.0", + "v1.7.1": ">=1.8.0", + "v1.7.0": ">=1.7.1", + "v1.6.0": ">=1.7.1", + "v1.5.0": ">=1.6.0", + "v1.4.0": ">=1.5.0", + "v1.3.0": ">=1.4.0", + "v1.2.0": ">=1.3.0", + } return updates.Channel{ Name: "stable", Metadata: map[string]string{ @@ -133,29 +161,7 @@ func crdbChannel() updates.Channel { "default": "true", }, Nodes: releases, - Edges: map[string][]string{ - "v1.18.0": {"v1.19.1"}, - "v1.17.0": {"v1.18.0", "v1.19.1"}, - "v1.16.2": {"v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.1": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.15.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.1": {"v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.13.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.18.0", "v1.19.1"}, - "v1.12.0": {"v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.1": {"v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.6.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.5.0": {"v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.4.0": {"v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.3.0": {"v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.2.0": {"v1.3.0", "v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - }, + Edges: edgesFromPatterns(edgePatterns, releases), } } @@ -165,11 +171,11 @@ func mysqlChannel() updates.Channel { {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add_caveat"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add_caveat"}, {ID: "v1.16.2", Tag: "v1.16.2", Migration: "add_caveat"}, - {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add_caveat"}, - {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add_caveat"}, + {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add_caveat", Deprecated: true}, + {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add_caveat", Deprecated: true}, {ID: "v1.15.0", Tag: "v1.15.0", Migration: "add_caveat"}, {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add_caveat"}, - {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add_caveat"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add_caveat", Deprecated: true}, {ID: "v1.13.0", Tag: "v1.13.0", Migration: "add_ns_config_id"}, {ID: "v1.12.0", Tag: "v1.12.0", Migration: "add_ns_config_id"}, {ID: "v1.11.0", Tag: "v1.11.0", Migration: "add_ns_config_id"}, @@ -177,7 +183,25 @@ func mysqlChannel() updates.Channel { {ID: "v1.9.0", Tag: "v1.9.0", Migration: "add_unique_datastore_id"}, {ID: "v1.8.0", Tag: "v1.8.0", Migration: "add_unique_datastore_id"}, {ID: "v1.7.1", Tag: "v1.7.1", Migration: "add_unique_datastore_id"}, - {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add_unique_datastore_id"}, + {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add_unique_datastore_id", Deprecated: true}, + } + edgePatterns := map[string]string{ + "v1.18.0": ">=1.19.1", + "v1.17.0": ">=1.18.0", + "v1.16.2": ">=1.17.0", + "v1.16.1": ">=1.16.2", + "v1.16.0": ">=1.16.2", + "v1.15.0": ">=1.16.2", + "v1.14.1": ">=1.15.0", + "v1.14.0": ">=1.14.1", + "v1.13.0": ">=1.14.1", + "v1.12.0": ">=1.13.0", + "v1.11.0": ">=1.12.0", + "v1.10.0": ">=1.11.0", + "v1.9.0": ">=1.10.0", + "v1.8.0": ">=1.9.0", + "v1.7.1": ">=1.8.0", + "v1.7.0": ">=1.7.1", } return updates.Channel{ Name: "stable", @@ -186,24 +210,7 @@ func mysqlChannel() updates.Channel { "default": "true", }, Nodes: releases, - Edges: map[string][]string{ - "v1.18.0": {"v1.19.1"}, - "v1.17.0": {"v1.18.0", "v1.19.1"}, - "v1.16.2": {"v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.1": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.15.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.1": {"v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.13.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.12.0": {"v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.1": {"v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - }, + Edges: edgesFromPatterns(edgePatterns, releases), } } @@ -213,11 +220,11 @@ func spannerChannel() updates.Channel { {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add-caveats"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add-caveats"}, {ID: "v1.16.2", Tag: "v1.16.2", Migration: "add-caveats"}, - {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add-caveats"}, - {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add-caveats"}, + {ID: "v1.16.1", Tag: "v1.16.1", Migration: "add-caveats", Deprecated: true}, + {ID: "v1.16.0", Tag: "v1.16.0", Migration: "add-caveats", Deprecated: true}, {ID: "v1.15.0", Tag: "v1.15.0", Migration: "add-caveats"}, {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add-caveats"}, - {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats", Deprecated: true}, {ID: "v1.13.0", Tag: "v1.13.0", Migration: "add-metadata-and-counters"}, {ID: "v1.12.0", Tag: "v1.12.0", Migration: "add-metadata-and-counters"}, {ID: "v1.11.0", Tag: "v1.11.0", Migration: "add-metadata-and-counters"}, @@ -225,6 +232,22 @@ func spannerChannel() updates.Channel { {ID: "v1.9.0", Tag: "v1.9.0", Migration: "add-metadata-and-counters"}, {ID: "v1.8.0", Tag: "v1.8.0", Migration: "add-metadata-and-counters"}, } + edgePatterns := map[string]string{ + "v1.18.0": ">=1.19.1", + "v1.17.0": ">=1.18.0", + "v1.16.2": ">=1.17.0", + "v1.16.1": ">=1.16.2", + "v1.16.0": ">=1.16.2", + "v1.15.0": ">=1.16.2", + "v1.14.1": ">=1.15.0", + "v1.14.0": ">=1.14.1", + "v1.13.0": ">=1.14.1", + "v1.12.0": ">=1.13.0", + "v1.11.0": ">=1.12.0", + "v1.10.0": ">=1.11.0", + "v1.9.0": ">=1.10.0", + "v1.8.0": ">=1.9.0", + } return updates.Channel{ Name: "stable", Metadata: map[string]string{ @@ -232,22 +255,7 @@ func spannerChannel() updates.Channel { "default": "true", }, Nodes: releases, - Edges: map[string][]string{ - "v1.18.0": {"v1.19.1"}, - "v1.17.0": {"v1.18.0", "v1.19.1"}, - "v1.16.2": {"v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.1": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.15.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.1": {"v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.13.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.12.0": {"v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - }, + Edges: edgesFromPatterns(edgePatterns, releases), } } @@ -257,11 +265,11 @@ func memoryChannel() updates.Channel { {ID: "v1.18.0", Tag: "v1.18.0"}, {ID: "v1.17.0", Tag: "v1.17.0"}, {ID: "v1.16.2", Tag: "v1.16.2"}, - {ID: "v1.16.1", Tag: "v1.16.1"}, - {ID: "v1.16.0", Tag: "v1.16.0"}, + {ID: "v1.16.1", Tag: "v1.16.1", Deprecated: true}, + {ID: "v1.16.0", Tag: "v1.16.0", Deprecated: true}, {ID: "v1.15.0", Tag: "v1.15.0"}, {ID: "v1.14.1", Tag: "v1.14.1"}, - {ID: "v1.14.0", Tag: "v1.14.0"}, + {ID: "v1.14.0", Tag: "v1.14.0", Deprecated: true}, {ID: "v1.13.0", Tag: "v1.13.0"}, {ID: "v1.12.0", Tag: "v1.12.0"}, {ID: "v1.11.0", Tag: "v1.11.0"}, @@ -269,13 +277,18 @@ func memoryChannel() updates.Channel { {ID: "v1.9.0", Tag: "v1.9.0"}, {ID: "v1.8.0", Tag: "v1.8.0"}, {ID: "v1.7.1", Tag: "v1.7.1"}, - {ID: "v1.7.0", Tag: "v1.7.0"}, + {ID: "v1.7.0", Tag: "v1.7.0", Deprecated: true}, {ID: "v1.6.0", Tag: "v1.6.0"}, {ID: "v1.5.0", Tag: "v1.5.0"}, {ID: "v1.4.0", Tag: "v1.4.0"}, {ID: "v1.3.0", Tag: "v1.3.0"}, {ID: "v1.2.0", Tag: "v1.2.0"}, } + edgePatterns := make(map[string]string) + for _, from := range releases { + edgePatterns[from.ID] = ">" + strings.TrimPrefix(from.ID, "v") + } + return updates.Channel{ Name: "stable", Metadata: map[string]string{ @@ -283,28 +296,28 @@ func memoryChannel() updates.Channel { "default": "true", }, Nodes: releases, - Edges: map[string][]string{ - "v1.18.0": {"v1.19.1"}, - "v1.17.0": {"v1.18.0", "v1.19.1"}, - "v1.16.2": {"v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.1": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.16.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.15.0": {"v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.1": {"v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.14.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.13.0": {"v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.12.0": {"v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.1": {"v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.7.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.6.0": {"v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.5.0": {"v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.4.0": {"v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.3.0": {"v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - "v1.2.0": {"v1.3.0", "v1.4.0", "v1.5.0", "v1.6.0", "v1.7.1", "v1.8.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1", "v1.15.0", "v1.16.2", "v1.17.0", "v1.18.0", "v1.19.1"}, - }, + Edges: edgesFromPatterns(edgePatterns, releases), + } +} + +func edgesFromPatterns(patterns map[string]string, releases []updates.State) map[string][]string { + edges := make(map[string][]string) + for from, to := range patterns { + toRange := semver.MustParseRange(to) + for _, release := range releases { + if release.Deprecated { + continue + } + if !toRange(semver.MustParse(strings.TrimPrefix(release.ID, "v"))) { + continue + } + edges[from] = append(edges[from], release.ID) + } + sort.Slice(edges[from], func(i, j int) bool { + v1 := semver.MustParse(strings.TrimPrefix(edges[from][i], "v")) + v2 := semver.MustParse(strings.TrimPrefix(edges[from][j], "v")) + return v1.LT(v2) + }) } + return edges } diff --git a/tools/generate-update-graph/main_test.go b/tools/generate-update-graph/main_test.go new file mode 100644 index 00000000..dad9fa0b --- /dev/null +++ b/tools/generate-update-graph/main_test.go @@ -0,0 +1,100 @@ +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/authzed/spicedb-operator/pkg/updates" +) + +func TestEdgesFromPatterns(t *testing.T) { + tests := []struct { + name string + patterns map[string]string + releases []updates.State + want map[string][]string + }{ + { + name: "single edge", + releases: []updates.State{ + {ID: "v1.0.0"}, + {ID: "v1.1.0"}, + }, + patterns: map[string]string{ + "v1.0.0": "1.1.0", + }, + want: map[string][]string{ + "v1.0.0": {"v1.1.0"}, + }, + }, + { + name: "open edge range", + releases: []updates.State{ + {ID: "v1.0.0"}, + {ID: "v1.1.0"}, + {ID: "v1.2.0"}, + }, + patterns: map[string]string{ + "v1.0.0": ">1.0.0", + }, + want: map[string][]string{ + "v1.0.0": {"v1.1.0", "v1.2.0"}, + }, + }, + { + name: "closed edge range", + releases: []updates.State{ + {ID: "v1.0.0"}, + {ID: "v1.1.0"}, + {ID: "v1.2.0"}, + }, + patterns: map[string]string{ + "v1.0.0": ">1.0.0 <=1.1.0", + }, + want: map[string][]string{ + "v1.0.0": {"v1.1.0"}, + }, + }, + { + name: "edge range with deprecated release in range", + releases: []updates.State{ + {ID: "v1.0.0"}, + {ID: "v1.1.0", Deprecated: true}, + {ID: "v1.2.0"}, + }, + patterns: map[string]string{ + "v1.0.0": ">1.0.0", + }, + want: map[string][]string{ + "v1.0.0": {"v1.2.0"}, + }, + }, + { + name: "edge range with omitted version", + releases: []updates.State{ + {ID: "v1.0.0"}, + {ID: "v1.1.0"}, + {ID: "v1.2.0"}, + {ID: "v1.3.0"}, + }, + patterns: map[string]string{ + "v1.0.0": ">1.0.0 !1.2.0", + }, + want: map[string][]string{ + "v1.0.0": {"v1.1.0", "v1.3.0"}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := edgesFromPatterns(tt.patterns, tt.releases) + for from, to := range tt.want { + require.ElementsMatch(t, to, got[from]) + } + for from, to := range got { + require.ElementsMatch(t, to, tt.want[from]) + } + }) + } +} diff --git a/tools/go.mod b/tools/go.mod index 514c11eb..7d815a79 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,6 +4,8 @@ go 1.19 require ( github.com/authzed/spicedb-operator v0.0.0-00010101000000-000000000000 + github.com/blang/semver/v4 v4.0.0 + github.com/stretchr/testify v1.8.2 sigs.k8s.io/yaml v1.3.0 ) @@ -31,6 +33,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/exp v0.0.0-20220823124025-807a23277127 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect diff --git a/tools/go.sum b/tools/go.sum index 7f3a964a..0124def5 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/authzed/controller-idioms v0.7.0 h1:HhNMUBb8hJzYqY3mhen3B2AC5nsIem3fBe0tC/AAOHo= github.com/authzed/controller-idioms v0.7.0/go.mod h1:0B/PmqCguKv8b3azSMF+HdyKpKr2o3UAZ5eo12Ze8Fo= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -98,10 +100,15 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From ffc963070b0a42fb94522e52caedb4d5815826ec Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Wed, 17 May 2023 19:59:09 -0400 Subject: [PATCH 2/3] graph: add v1.21.0 to the update graphs --- proposed-update-graph.yaml | 104 ++++++++++++++++++++++++++++ tools/generate-update-graph/main.go | 9 +++ 2 files changed, 113 insertions(+) diff --git a/proposed-update-graph.yaml b/proposed-update-graph.yaml index bd86fd74..74906e4c 100644 --- a/proposed-update-graph.yaml +++ b/proposed-update-graph.yaml @@ -106,6 +106,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0-phase1: - v1.14.0-phase2 v1.14.0-phase2: @@ -116,35 +117,47 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: postgres default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-gc-covering-index + tag: v1.21.0 - id: v1.19.1 migration: add-gc-covering-index tag: v1.19.1 @@ -238,6 +251,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.3.0: - v1.4.0 - v1.5.0 @@ -255,6 +269,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.4.0: - v1.5.0 - v1.6.0 @@ -271,6 +286,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.5.0: - v1.6.0 - v1.7.1 @@ -286,6 +302,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.6.0: - v1.7.1 - v1.8.0 @@ -300,6 +317,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.0: - v1.7.1 - v1.8.0 @@ -314,6 +332,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -327,6 +346,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -339,6 +359,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -350,6 +371,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -360,6 +382,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -369,6 +392,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -377,6 +401,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -384,6 +409,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -391,41 +417,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: cockroachdb default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-caveats + tag: v1.21.0 - id: v1.19.1 migration: add-caveats tag: v1.19.1 @@ -507,6 +546,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -520,6 +560,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -532,6 +573,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -543,6 +585,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -553,6 +596,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -562,6 +606,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -570,6 +615,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -577,6 +623,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -584,41 +631,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: mysql default: "true" name: stable nodes: + - id: v1.21.0 + migration: extend_object_id + tag: v1.21.0 - id: v1.19.1 migration: add_caveat tag: v1.19.1 @@ -683,6 +743,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -694,6 +755,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -704,6 +766,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -713,6 +776,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -721,6 +785,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -728,6 +793,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -735,41 +801,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: spanner default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-caveats + tag: v1.21.0 - id: v1.19.1 migration: add-caveats tag: v1.19.1 @@ -834,6 +913,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.3.0: - v1.4.0 - v1.5.0 @@ -851,6 +931,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.4.0: - v1.5.0 - v1.6.0 @@ -867,6 +948,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.5.0: - v1.6.0 - v1.7.1 @@ -882,6 +964,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.6.0: - v1.7.1 - v1.8.0 @@ -896,6 +979,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.0: - v1.7.1 - v1.8.0 @@ -910,6 +994,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -923,6 +1008,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -935,6 +1021,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -946,6 +1033,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -956,6 +1044,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -965,6 +1054,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -973,6 +1063,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -980,6 +1071,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -987,41 +1079,53 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: memory default: "true" name: stable nodes: + - id: v1.21.0 + tag: v1.21.0 - id: v1.19.1 tag: v1.19.1 - id: v1.18.0 diff --git a/tools/generate-update-graph/main.go b/tools/generate-update-graph/main.go index f60c8104..152af960 100644 --- a/tools/generate-update-graph/main.go +++ b/tools/generate-update-graph/main.go @@ -44,6 +44,7 @@ func main() { func postgresChannel() updates.Channel { releases := []updates.State{ + {ID: "v1.21.0", Tag: "v1.21.0", Migration: "add-gc-covering-index"}, {ID: "v1.19.1", Tag: "v1.19.1", Migration: "add-gc-covering-index"}, {ID: "v1.18.0", Tag: "v1.18.0", Migration: "drop-bigserial-ids"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "drop-bigserial-ids"}, @@ -70,6 +71,7 @@ func postgresChannel() updates.Channel { {ID: "v1.2.0", Tag: "v1.2.0", Migration: "add-transaction-timestamp-index"}, } edgePatterns := map[string]string{ + "v1.19.1": ">=1.21.0", "v1.18.0": ">=1.19.1", "v1.17.0": ">=1.18.0", "v1.16.2": ">=1.17.0", @@ -108,6 +110,7 @@ func postgresChannel() updates.Channel { func crdbChannel() updates.Channel { releases := []updates.State{ + {ID: "v1.21.0", Tag: "v1.21.0", Migration: "add-caveats"}, {ID: "v1.19.1", Tag: "v1.19.1", Migration: "add-caveats"}, {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add-caveats"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add-caveats"}, @@ -132,6 +135,7 @@ func crdbChannel() updates.Channel { {ID: "v1.2.0", Tag: "v1.2.0", Migration: "add-transactions-table"}, } edgePatterns := map[string]string{ + "v1.19.1": ">=1.21.0", "v1.18.0": ">=1.19.1", "v1.17.0": ">=1.18.0", "v1.16.2": ">=1.17.0", @@ -167,6 +171,7 @@ func crdbChannel() updates.Channel { func mysqlChannel() updates.Channel { releases := []updates.State{ + {ID: "v1.21.0", Tag: "v1.21.0", Migration: "extend_object_id"}, {ID: "v1.19.1", Tag: "v1.19.1", Migration: "add_caveat"}, {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add_caveat"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add_caveat"}, @@ -186,6 +191,7 @@ func mysqlChannel() updates.Channel { {ID: "v1.7.0", Tag: "v1.7.0", Migration: "add_unique_datastore_id", Deprecated: true}, } edgePatterns := map[string]string{ + "v1.19.1": ">=1.21.0", "v1.18.0": ">=1.19.1", "v1.17.0": ">=1.18.0", "v1.16.2": ">=1.17.0", @@ -216,6 +222,7 @@ func mysqlChannel() updates.Channel { func spannerChannel() updates.Channel { releases := []updates.State{ + {ID: "v1.21.0", Tag: "v1.21.0", Migration: "add-caveats"}, {ID: "v1.19.1", Tag: "v1.19.1", Migration: "add-caveats"}, {ID: "v1.18.0", Tag: "v1.18.0", Migration: "add-caveats"}, {ID: "v1.17.0", Tag: "v1.17.0", Migration: "add-caveats"}, @@ -233,6 +240,7 @@ func spannerChannel() updates.Channel { {ID: "v1.8.0", Tag: "v1.8.0", Migration: "add-metadata-and-counters"}, } edgePatterns := map[string]string{ + "v1.19.1": ">=1.21.0", "v1.18.0": ">=1.19.1", "v1.17.0": ">=1.18.0", "v1.16.2": ">=1.17.0", @@ -261,6 +269,7 @@ func spannerChannel() updates.Channel { func memoryChannel() updates.Channel { releases := []updates.State{ + {ID: "v1.21.0", Tag: "v1.21.0"}, {ID: "v1.19.1", Tag: "v1.19.1"}, {ID: "v1.18.0", Tag: "v1.18.0"}, {ID: "v1.17.0", Tag: "v1.17.0"}, From cb90dfbfe99c6bd54bc4be8f02f619a8cb3a1e0b Mon Sep 17 00:00:00 2001 From: ecordell Date: Thu, 18 May 2023 14:53:38 +0000 Subject: [PATCH 3/3] update validated graph after successful tests --- validated-update-graph.yaml | 105 ++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/validated-update-graph.yaml b/validated-update-graph.yaml index 79e21c5a..74906e4c 100644 --- a/validated-update-graph.yaml +++ b/validated-update-graph.yaml @@ -106,6 +106,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0-phase1: - v1.14.0-phase2 v1.14.0-phase2: @@ -116,35 +117,47 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: postgres default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-gc-covering-index + tag: v1.21.0 - id: v1.19.1 migration: add-gc-covering-index tag: v1.19.1 @@ -238,6 +251,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.3.0: - v1.4.0 - v1.5.0 @@ -255,6 +269,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.4.0: - v1.5.0 - v1.6.0 @@ -271,6 +286,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.5.0: - v1.6.0 - v1.7.1 @@ -286,6 +302,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.6.0: - v1.7.1 - v1.8.0 @@ -300,6 +317,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.0: - v1.7.1 - v1.8.0 @@ -314,6 +332,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -327,6 +346,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -339,6 +359,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -350,6 +371,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -360,6 +382,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -369,6 +392,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -377,12 +401,15 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 - v1.16.2 + - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -390,41 +417,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: cockroachdb default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-caveats + tag: v1.21.0 - id: v1.19.1 migration: add-caveats tag: v1.19.1 @@ -506,6 +546,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -519,6 +560,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -531,6 +573,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -542,6 +585,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -552,6 +596,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -561,6 +606,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -569,6 +615,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -576,6 +623,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -583,41 +631,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: mysql default: "true" name: stable nodes: + - id: v1.21.0 + migration: extend_object_id + tag: v1.21.0 - id: v1.19.1 migration: add_caveat tag: v1.19.1 @@ -682,6 +743,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -693,6 +755,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -703,6 +766,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -712,6 +776,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -720,6 +785,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -727,6 +793,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -734,41 +801,54 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: spanner default: "true" name: stable nodes: + - id: v1.21.0 + migration: add-caveats + tag: v1.21.0 - id: v1.19.1 migration: add-caveats tag: v1.19.1 @@ -833,6 +913,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.3.0: - v1.4.0 - v1.5.0 @@ -850,6 +931,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.4.0: - v1.5.0 - v1.6.0 @@ -866,6 +948,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.5.0: - v1.6.0 - v1.7.1 @@ -881,6 +964,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.6.0: - v1.7.1 - v1.8.0 @@ -895,6 +979,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.0: - v1.7.1 - v1.8.0 @@ -909,6 +994,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.7.1: - v1.8.0 - v1.9.0 @@ -922,6 +1008,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.8.0: - v1.9.0 - v1.10.0 @@ -934,6 +1021,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.9.0: - v1.10.0 - v1.11.0 @@ -945,6 +1033,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.10.0: - v1.11.0 - v1.12.0 @@ -955,6 +1044,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.11.0: - v1.12.0 - v1.13.0 @@ -964,6 +1054,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.12.0: - v1.13.0 - v1.14.1 @@ -972,6 +1063,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.13.0: - v1.14.1 - v1.15.0 @@ -979,6 +1071,7 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.0: - v1.14.1 - v1.15.0 @@ -986,41 +1079,53 @@ channels: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.14.1: - v1.15.0 - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.15.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.0: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.1: - v1.16.2 - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.16.2: - v1.17.0 - v1.18.0 - v1.19.1 + - v1.21.0 v1.17.0: - v1.18.0 - v1.19.1 + - v1.21.0 v1.18.0: - v1.19.1 + - v1.21.0 + v1.19.1: + - v1.21.0 metadata: datastore: memory default: "true" name: stable nodes: + - id: v1.21.0 + tag: v1.21.0 - id: v1.19.1 tag: v1.19.1 - id: v1.18.0