Skip to content

Commit 6eeb07b

Browse files
committed
remove canary flag
1 parent 513eed9 commit 6eeb07b

6 files changed

Lines changed: 5 additions & 32 deletions

File tree

internal/cmd/canary_flag.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

internal/cmd/db_create.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func init() {
5656
flags.AddCSVSeparator(createCmd)
5757
addLocationFlag(createCmd, "Location ID. If no ID is specified, closest location to you is used by default.")
5858
addWaitFlag(createCmd, "Wait for the database to be ready to receive requests.")
59-
addCanaryFlag(createCmd)
6059
addEnableExtensionsFlag(createCmd)
6160
addSchemaFlag(createCmd)
6261
addTypeFlag(createCmd)
@@ -119,12 +118,7 @@ func CreateDatabase(name string) error {
119118
return err
120119
}
121120

122-
version := "latest"
123-
if canaryFlag {
124-
version = "canary"
125-
}
126-
127-
if err := ensureGroup(client, groupName, groups, location, version); err != nil {
121+
if err := ensureGroup(client, groupName, groups, location, "latest"); err != nil {
128122
return err
129123
}
130124

internal/cmd/db_replicate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818

1919
func init() {
2020
dbCmd.AddCommand(replicateCmd)
21-
addCanaryFlag(replicateCmd)
2221
addWaitFlag(replicateCmd, "Wait for the replica to be ready to receive requests.")
2322
}
2423

internal/cmd/group.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cmd
22

33
import (
4-
"errors"
54
"fmt"
65
"time"
76

@@ -24,8 +23,7 @@ func init() {
2423
groupCmd.AddCommand(unarchiveGroupCmd)
2524
addLocationFlag(groupsCreateCmd, "Create the group primary in the specified location")
2625
addWaitFlag(groupsCreateCmd, "Wait for group to be ready")
27-
addCanaryFlag(groupsCreateCmd)
28-
flags.AddVersion(groupsCreateCmd, "Version of the group. Valid values: 'latest', 'canary' or 'vector'")
26+
flags.AddVersion(groupsCreateCmd, "Version of the group. Valid values: 'latest' or 'vector'")
2927
groupCmd.AddCommand(groupsDestroyCmd)
3028
addYesFlag(groupsDestroyCmd, "Confirms the destruction of the group, with all its locations and databases.")
3129
groupCmd.AddCommand(groupShowCmd)
@@ -102,16 +100,8 @@ var groupsCreateCmd = &cobra.Command{
102100
location, _ = closestLocation(client)
103101
}
104102

105-
version := flags.Version()
106-
if canaryFlag {
107-
if version != "" {
108-
return errors.New("cannot specify both --canary and --version flags")
109-
}
110-
version = "canary"
111-
}
112-
113103
name := args[0]
114-
return createGroup(client, name, location, version)
104+
return createGroup(client, name, location, flags.Version())
115105
},
116106
}
117107

internal/cmd/group_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func init() {
1414
groupCmd.AddCommand(groupUpdateCmd)
1515
flags.AddYes(groupUpdateCmd, "Confirms the update")
16-
flags.AddVersion(groupUpdateCmd, "Version to update to. Valid values: 'latest', 'canary' or 'vector'")
16+
flags.AddVersion(groupUpdateCmd, "Version to update to. Valid values: 'latest' or 'vector'")
1717
flags.AddExtensions(groupUpdateCmd, "Extensions to enable. Valid values: 'all' or 'none'")
1818
}
1919

internal/flags/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var versionFlag string
99
func AddVersion(cmd *cobra.Command, desc string) {
1010
cmd.Flags().StringVar(&versionFlag, "version", "", desc)
1111
_ = cmd.RegisterFlagCompletionFunc("version", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
12-
return []string{"latest", "canary"}, cobra.ShellCompDirectiveNoFileComp
12+
return []string{"latest"}, cobra.ShellCompDirectiveNoFileComp
1313
})
1414
}
1515

0 commit comments

Comments
 (0)