From 0bdc0e7609c0e0244b2fa1877aa069ba9f7e6318 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Mon, 14 Nov 2022 17:30:49 -0500 Subject: [PATCH] generate update graph for currently released spicedb versions --- default-operator-config.yaml | 672 +++++++++++++++++++++++++- pkg/updates/file.go | 2 +- tools/generate-allowed-images/main.go | 63 --- tools/generate-update-graph/main.go | 233 +++++++++ 4 files changed, 886 insertions(+), 84 deletions(-) delete mode 100644 tools/generate-allowed-images/main.go create mode 100644 tools/generate-update-graph/main.go diff --git a/default-operator-config.yaml b/default-operator-config.yaml index 55b659f6..840a6819 100644 --- a/default-operator-config.yaml +++ b/default-operator-config.yaml @@ -1,21 +1,653 @@ -allowedImages: -- ghcr.io/authzed/spicedb -- authzed/spicedb -- quay.io/authzed/spicedb -allowedTags: -- v1.11.0 -- v1.10.0 -- v1.9.0 -- v1.8.0 -- v1.7.1 -- v1.7.0 -- v1.6.0 -- v1.5.0 -- v1.4.0 -- v1.3.0 -- v1.2.0 -- v1.1.0 -- v1.0.0 -disableImageValidation: false +channels: +- edges: + v1.0.0: + - v1.1.0 + - 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 + v1.1.0: + - 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 + 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 + 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.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.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.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.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.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.8.0: + - v1.9.0 + - 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.10.0: + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.0-phase1 + v1.11.0: + - v1.12.0 + - v1.13.0 + - v1.14.0-phase1 + v1.12.0: + - v1.13.0 + - v1.14.0-phase1 + v1.13.0: + - v1.14.0-phase1 + v1.14.0: + - v1.14.1 + v1.14.0-phase1: + - v1.14.0-phase2 + v1.14.0-phase2: + - v1.14.0 + metadata: + datastore: postgres + name: postgres + nodes: + - id: v1.14.1 + migration: drop-id-constraints + tag: v1.14.1 + - id: v1.14.0 + migration: drop-id-constraints + tag: v1.14.0 + - id: v1.14.0-phase2 + migration: add-xid-constraints + phase: write-both-read-new + tag: v1.14.0 + - id: v1.14.0-phase1 + migration: add-xid-columns + phase: write-both-read-old + tag: v1.14.0 + - id: v1.13.0 + migration: add-ns-config-id + tag: v1.13.0 + - id: v1.12.0 + migration: add-ns-config-id + tag: v1.12.0 + - id: v1.11.0 + migration: add-ns-config-id + tag: v1.11.0 + - id: v1.10.0 + migration: add-ns-config-id + tag: v1.10.0 + - id: v1.9.0 + migration: add-unique-datastore-id + tag: v1.9.0 + - id: v1.8.0 + migration: add-unique-datastore-id + tag: v1.8.0 + - id: v1.7.1 + migration: add-unique-datastore-id + tag: v1.7.1 + - id: v1.7.0 + migration: add-unique-datastore-id + tag: v1.7.0 + - id: v1.6.0 + migration: add-unique-datastore-id + tag: v1.6.0 + - id: v1.5.0 + migration: add-transaction-timestamp-index + tag: v1.5.0 + - id: v1.4.0 + migration: add-transaction-timestamp-index + tag: v1.4.0 + - id: v1.3.0 + migration: add-transaction-timestamp-index + tag: v1.3.0 + - id: v1.2.0 + migration: add-transaction-timestamp-index + tag: v1.2.0 + - id: v1.1.0 + migration: add-transaction-timestamp-index + tag: v1.1.0 + - id: v1.0.0 + migration: add-unique-living-ns + tag: v1.0.0 +- edges: + v1.0.0: + - v1.1.0 + - 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.1.0: + - 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.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.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.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.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.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.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.7.1: + - v1.8.0 + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.8.0: + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.9.0: + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.10.0: + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.11.0: + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.12.0: + - v1.13.0 + - v1.14.1 + v1.13.0: + - v1.14.1 + v1.14.0: + - v1.14.1 + metadata: + datastore: cockroachdb + name: cockroachdb + nodes: + - id: v1.14.1 + migration: add-caveats + tag: v1.14.1 + - id: v1.14.0 + migration: add-caveats + tag: v1.14.0 + - id: v1.13.0 + migration: add-metadata-and-counters + tag: v1.13.0 + - id: v1.12.0 + migration: add-metadata-and-counters + tag: v1.12.0 + - id: v1.11.0 + migration: add-metadata-and-counters + tag: v1.11.0 + - id: v1.10.0 + migration: add-metadata-and-counters + tag: v1.10.0 + - id: v1.9.0 + migration: add-metadata-and-counters + tag: v1.9.0 + - id: v1.8.0 + migration: add-metadata-and-counters + tag: v1.8.0 + - id: v1.7.1 + migration: add-metadata-and-counters + tag: v1.7.1 + - id: v1.7.0 + migration: add-metadata-and-counters + tag: v1.7.0 + - id: v1.6.0 + migration: add-metadata-and-counters + tag: v1.6.0 + - id: v1.5.0 + migration: add-transactions-table + tag: v1.5.0 + - id: v1.4.0 + migration: add-transactions-table + tag: v1.4.0 + - id: v1.3.0 + migration: add-transactions-table + tag: v1.3.0 + - id: v1.2.0 + migration: add-transactions-table + tag: v1.2.0 + - id: v1.1.0 + migration: add-transactions-table + tag: v1.1.0 + - id: v1.0.0 + migration: add-transactions-table + tag: v1.0.0 +- edges: + 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.7.1: + - v1.8.0 + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.8.0: + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.9.0: + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.10.0: + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.11.0: + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.12.0: + - v1.13.0 + - v1.14.1 + v1.13.0: + - v1.14.1 + v1.14.0: + - v1.14.1 + metadata: + datastore: mysql + name: mysql + nodes: + - id: v1.14.1 + migration: add-caveats + tag: v1.14.1 + - id: v1.14.0 + migration: add-caveats + tag: v1.14.0 + - id: v1.13.0 + migration: add_ns_config_id + tag: v1.13.0 + - id: v1.12.0 + migration: add_ns_config_id + tag: v1.12.0 + - id: v1.11.0 + migration: add_ns_config_id + tag: v1.11.0 + - id: v1.10.0 + migration: add_ns_config_id + tag: v1.10.0 + - id: v1.9.0 + migration: add_unique_datastore_id + tag: v1.9.0 + - id: v1.8.0 + migration: add_unique_datastore_id + tag: v1.8.0 + - id: v1.7.1 + migration: add_unique_datastore_id + tag: v1.7.1 + - id: v1.7.0 + migration: add_unique_datastore_id + tag: v1.7.0 +- edges: + v1.0.0: + - v1.1.0 + - 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.1.0: + - 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.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.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.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.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.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.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.7.1: + - v1.8.0 + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.8.0: + - v1.9.0 + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.9.0: + - v1.10.0 + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.10.0: + - v1.11.0 + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.11.0: + - v1.12.0 + - v1.13.0 + - v1.14.1 + v1.12.0: + - v1.13.0 + - v1.14.1 + v1.13.0: + - v1.14.1 + v1.14.0: + - v1.14.1 + metadata: + datastore: spanner + name: spanner + nodes: + - id: v1.14.1 + migration: add-caveats + tag: v1.14.1 + - id: v1.14.0 + migration: add-caveats + tag: v1.14.0 + - id: v1.13.0 + migration: add-metadata-and-counters + tag: v1.13.0 + - id: v1.12.0 + migration: add-metadata-and-counters + tag: v1.12.0 + - id: v1.11.0 + migration: add-metadata-and-counters + tag: v1.11.0 + - id: v1.10.0 + migration: add-metadata-and-counters + tag: v1.10.0 + - id: v1.9.0 + migration: add-metadata-and-counters + tag: v1.9.0 + - id: v1.8.0 + migration: add-metadata-and-counters + tag: v1.8.0 + - id: v1.7.1 + migration: add-metadata-and-counters + tag: v1.7.1 + - id: v1.7.0 + migration: add-metadata-and-counters + tag: v1.7.0 + - id: v1.6.0 + migration: add-metadata-and-counters + tag: v1.6.0 + - id: v1.5.0 + migration: initial + tag: v1.5.0 + - id: v1.4.0 + migration: initial + tag: v1.4.0 + - id: v1.3.0 + migration: initial + tag: v1.3.0 + - id: v1.2.0 + migration: initial + tag: v1.2.0 + - id: v1.1.0 + migration: initial + tag: v1.1.0 + - id: v1.0.0 + migration: initial + tag: v1.0.0 imageName: ghcr.io/authzed/spicedb -imageTag: v1.11.0 diff --git a/pkg/updates/file.go b/pkg/updates/file.go index 9b1ba538..af3fcbb4 100644 --- a/pkg/updates/file.go +++ b/pkg/updates/file.go @@ -7,7 +7,7 @@ import ( ) type Channel struct { - Name string + Name string `json:"name"` Metadata map[string]string `json:"metadata,omitempty"` Edges EdgeSet `json:"edges,omitempty"` Nodes []State `json:"nodes,omitempty"` diff --git a/tools/generate-allowed-images/main.go b/tools/generate-allowed-images/main.go deleted file mode 100644 index 998cd7b5..00000000 --- a/tools/generate-allowed-images/main.go +++ /dev/null @@ -1,63 +0,0 @@ -package main - -import ( - "context" - "fmt" - "os" - - "github.com/google/go-github/v43/github" - "sigs.k8s.io/yaml" - - "github.com/authzed/spicedb-operator/pkg/config" -) - -//go:generate go run main.go ../../default-operator-config.yaml - -const ( - githubNamespace = "authzed" - githubRepository = "spicedb" -) - -func main() { - if len(os.Args) != 2 { - fmt.Println("must provide filename") - os.Exit(1) - } - ctx := context.Background() - client := github.NewClient(nil) - - // this returns the newest release by date, not by version - // note that spicedb uses the same API to determine if it's up to date - latestRelease, _, err := client.Repositories.GetLatestRelease(ctx, githubNamespace, githubRepository) - if err != nil { - panic(err) - } - allReleases, _, err := client.Repositories.ListReleases(ctx, githubNamespace, githubRepository, nil) - if err != nil { - panic(err) - } - allowedTags := make([]string, 0, len(allReleases)) - for _, r := range allReleases { - allowedTags = append(allowedTags, *r.Name) - } - - opconfig := config.OperatorConfig{ - ImageName: "ghcr.io/authzed/spicedb", - ImageTag: *latestRelease.Name, - AllowedImages: []string{ - "ghcr.io/authzed/spicedb", - "authzed/spicedb", - "quay.io/authzed/spicedb", - }, - AllowedTags: allowedTags, - } - - yamlBytes, err := yaml.Marshal(&opconfig) - if err != nil { - panic(err) - } - - if err := os.WriteFile(os.Args[1], yamlBytes, 0o666); err != nil { - panic(err) - } -} diff --git a/tools/generate-update-graph/main.go b/tools/generate-update-graph/main.go new file mode 100644 index 00000000..66eddd11 --- /dev/null +++ b/tools/generate-update-graph/main.go @@ -0,0 +1,233 @@ +package main + +import ( + "context" + "fmt" + "os" + + "github.com/google/go-github/v43/github" + "sigs.k8s.io/yaml" + + "github.com/authzed/spicedb-operator/pkg/config" + "github.com/authzed/spicedb-operator/pkg/updates" +) + +//go:generate go run main.go ../../default-operator-config.yaml + +const ( + githubNamespace = "authzed" + githubRepository = "spicedb" +) + +func main() { + if len(os.Args) != 2 { + fmt.Println("must provide filename") + os.Exit(1) + } + ctx := context.Background() + client := github.NewClient(nil) + + // this returns the newest release by date, not by version + // note that spicedb uses the same API to determine if it's up to date + latestRelease, _, err := client.Repositories.GetLatestRelease(ctx, githubNamespace, githubRepository) + if err != nil { + panic(err) + } + + opconfig := config.OperatorConfig{ + ImageName: "ghcr.io/authzed/spicedb", + UpdateGraph: updates.UpdateGraph{Channels: []updates.Channel{ + postgresChannel(), + crdbChannel(), + mysqlChannel(), + spannerChannel(), + }}, + } + + for _, c := range opconfig.Channels { + if c.Nodes[0].Tag != *latestRelease.Name { + fmt.Printf("channel %q does not contain the latest release %q\n", c.Name, *latestRelease.Name) + os.Exit(1) + return + } + } + + yamlBytes, err := yaml.Marshal(&opconfig) + if err != nil { + panic(err) + } + + if err := os.WriteFile(os.Args[1], yamlBytes, 0o666); err != nil { + panic(err) + } +} + +func postgresChannel() updates.Channel { + releases := []updates.State{ + {ID: "v1.14.1", Tag: "v1.14.1", Migration: "drop-id-constraints"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "drop-id-constraints"}, + {ID: "v1.14.0-phase2", Tag: "v1.14.0", Migration: "add-xid-constraints", Phase: "write-both-read-new"}, + {ID: "v1.14.0-phase1", Tag: "v1.14.0", Migration: "add-xid-columns", Phase: "write-both-read-old"}, + {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"}, + {ID: "v1.10.0", Tag: "v1.10.0", Migration: "add-ns-config-id"}, + {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.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"}, + {ID: "v1.1.0", Tag: "v1.1.0", Migration: "add-transaction-timestamp-index"}, + {ID: "v1.0.0", Tag: "v1.0.0", Migration: "add-unique-living-ns"}, + } + return updates.Channel{ + Name: "postgres", + Metadata: map[string]string{"datastore": "postgres"}, + Nodes: releases, + Edges: map[string][]string{ + "v1.14.0": {"v1.14.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"}, + "v1.1.0": {"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"}, + "v1.0.0": {"v1.1.0", "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"}, + }, + } +} + +func crdbChannel() updates.Channel { + releases := []updates.State{ + {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add-caveats"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats"}, + {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"}, + {ID: "v1.10.0", Tag: "v1.10.0", Migration: "add-metadata-and-counters"}, + {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.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"}, + {ID: "v1.1.0", Tag: "v1.1.0", Migration: "add-transactions-table"}, + {ID: "v1.0.0", Tag: "v1.0.0", Migration: "add-transactions-table"}, + } + return updates.Channel{ + Name: "cockroachdb", + Metadata: map[string]string{"datastore": "cockroachdb"}, + Nodes: releases, + Edges: map[string][]string{ + "v1.14.0": {"v1.14.1"}, + "v1.13.0": {"v1.14.1"}, + "v1.12.0": {"v1.13.0", "v1.14.1"}, + "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.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.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.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.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.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.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.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.1.0": {"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.0.0": {"v1.1.0", "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"}, + }, + } +} + +func mysqlChannel() updates.Channel { + releases := []updates.State{ + {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add-caveats"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats"}, + {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"}, + {ID: "v1.10.0", Tag: "v1.10.0", Migration: "add_ns_config_id"}, + {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"}, + } + return updates.Channel{ + Name: "mysql", + Metadata: map[string]string{"datastore": "mysql"}, + Nodes: releases, + Edges: map[string][]string{ + "v1.14.0": {"v1.14.1"}, + "v1.13.0": {"v1.14.1"}, + "v1.12.0": {"v1.13.0", "v1.14.1"}, + "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.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.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"}, + }, + } +} + +func spannerChannel() updates.Channel { + releases := []updates.State{ + {ID: "v1.14.1", Tag: "v1.14.1", Migration: "add-caveats"}, + {ID: "v1.14.0", Tag: "v1.14.0", Migration: "add-caveats"}, + {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"}, + {ID: "v1.10.0", Tag: "v1.10.0", Migration: "add-metadata-and-counters"}, + {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.6.0", Tag: "v1.6.0", Migration: "add-metadata-and-counters"}, + {ID: "v1.5.0", Tag: "v1.5.0", Migration: "initial"}, + {ID: "v1.4.0", Tag: "v1.4.0", Migration: "initial"}, + {ID: "v1.3.0", Tag: "v1.3.0", Migration: "initial"}, + {ID: "v1.2.0", Tag: "v1.2.0", Migration: "initial"}, + {ID: "v1.1.0", Tag: "v1.1.0", Migration: "initial"}, + {ID: "v1.0.0", Tag: "v1.0.0", Migration: "initial"}, + } + return updates.Channel{ + Name: "spanner", + Metadata: map[string]string{"datastore": "spanner"}, + Nodes: releases, + Edges: map[string][]string{ + "v1.14.0": {"v1.14.1"}, + "v1.13.0": {"v1.14.1"}, + "v1.12.0": {"v1.13.0", "v1.14.1"}, + "v1.11.0": {"v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.10.0": {"v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.9.0": {"v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.1"}, + "v1.8.0": {"v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0", "v1.13.0", "v1.14.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.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.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.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.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.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.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.1.0": {"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.0.0": {"v1.1.0", "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"}, + }, + } +}