diff --git a/changelog/19.0/19.0.0/summary.md b/changelog/19.0/19.0.0/summary.md new file mode 100644 index 00000000000..849992aa9d0 --- /dev/null +++ b/changelog/19.0/19.0.0/summary.md @@ -0,0 +1,13 @@ +## Summary + +### Table of Contents + +- **[Major Changes](#major-changes)** + - **[Deprecations and Deletions](#deprecations-and-deletions)** + + +## Major Changes + +### Deprecations and Deletions + +- The `MYSQL_FLAVOR` environment variable is now removed from all Docker Images. \ No newline at end of file diff --git a/changelog/19.0/README.md b/changelog/19.0/README.md new file mode 100644 index 00000000000..aecff732ce1 --- /dev/null +++ b/changelog/19.0/README.md @@ -0,0 +1,2 @@ +## v19.0 +* **[19.0.0](19.0.0)** diff --git a/changelog/README.md b/changelog/README.md index ffb8d698b28..66ed9543e5d 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,4 +1,5 @@ ## Releases +* [19.0](19.0) * [18.0](18.0) * [17.0](17.0) * [16.0](16.0) diff --git a/docker/bootstrap/Dockerfile.mysql80 b/docker/bootstrap/Dockerfile.mysql80 index 059f01b8101..46dec046411 100644 --- a/docker/bootstrap/Dockerfile.mysql80 +++ b/docker/bootstrap/Dockerfile.mysql80 @@ -21,6 +21,5 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyser # Bootstrap Vitess WORKDIR /vt/src/vitess.io/vitess -ENV MYSQL_FLAVOR MySQL80 USER vitess RUN ./bootstrap.sh diff --git a/docker/bootstrap/Dockerfile.percona80 b/docker/bootstrap/Dockerfile.percona80 index 446ec554612..f4d9f1c0458 100644 --- a/docker/bootstrap/Dockerfile.percona80 +++ b/docker/bootstrap/Dockerfile.percona80 @@ -34,6 +34,5 @@ RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.c # Bootstrap Vitess WORKDIR /vt/src/vitess.io/vitess -ENV MYSQL_FLAVOR MySQL80 USER vitess RUN ./bootstrap.sh diff --git a/docker/lite/Dockerfile.mysql80 b/docker/lite/Dockerfile.mysql80 index f91031f5996..d8844dafb54 100644 --- a/docker/lite/Dockerfile.mysql80 +++ b/docker/lite/Dockerfile.mysql80 @@ -47,7 +47,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/docker/lite/Dockerfile.percona80 b/docker/lite/Dockerfile.percona80 index 5e45d1d2113..e3df7801b20 100644 --- a/docker/lite/Dockerfile.percona80 +++ b/docker/lite/Dockerfile.percona80 @@ -47,7 +47,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/docker/lite/Dockerfile.ubi7.mysql80 b/docker/lite/Dockerfile.ubi7.mysql80 index 33e71b1f0e7..36f7a004300 100644 --- a/docker/lite/Dockerfile.ubi7.mysql80 +++ b/docker/lite/Dockerfile.ubi7.mysql80 @@ -76,7 +76,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/docker/lite/Dockerfile.ubi7.percona80 b/docker/lite/Dockerfile.ubi7.percona80 index 8303fe54585..4dd41f473e0 100644 --- a/docker/lite/Dockerfile.ubi7.percona80 +++ b/docker/lite/Dockerfile.ubi7.percona80 @@ -70,7 +70,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/docker/lite/Dockerfile.ubi8.arm64.mysql80 b/docker/lite/Dockerfile.ubi8.arm64.mysql80 index fb8220c64fc..d0bd9b279bc 100644 --- a/docker/lite/Dockerfile.ubi8.arm64.mysql80 +++ b/docker/lite/Dockerfile.ubi8.arm64.mysql80 @@ -83,7 +83,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/docker/lite/Dockerfile.ubi8.mysql80 b/docker/lite/Dockerfile.ubi8.mysql80 index cf1799bfc5e..ec7202d3137 100644 --- a/docker/lite/Dockerfile.ubi8.mysql80 +++ b/docker/lite/Dockerfile.ubi8.mysql80 @@ -81,7 +81,6 @@ RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt ENV VTROOT /vt/src/vitess.io/vitess ENV VTDATAROOT /vt/vtdataroot ENV PATH $VTROOT/bin:$PATH -ENV MYSQL_FLAVOR MySQL80 # Copy artifacts from builder layer. COPY --from=builder --chown=vitess:vitess /vt/install /vt diff --git a/examples/demo/demo.go b/examples/demo/demo.go index 54d7e8732ca..4656f89f34e 100644 --- a/examples/demo/demo.go +++ b/examples/demo/demo.go @@ -80,7 +80,7 @@ func runCluster() { VSchemaDDLAuthorizedUsers: "%", }, } - env, err := vttest.NewLocalTestEnv("", 12345) + env, err := vttest.NewLocalTestEnv(12345) if err != nil { log.Exitf("Error: %v", err) } diff --git a/go/cmd/vttestserver/cli/main.go b/go/cmd/vttestserver/cli/main.go index f9a2f16cd87..ea92ae7dda0 100644 --- a/go/cmd/vttestserver/cli/main.go +++ b/go/cmd/vttestserver/cli/main.go @@ -224,12 +224,12 @@ func New() (cmd *cobra.Command) { func newEnv() (env vttest.Environment, err error) { if basePort != 0 { if config.DataDir == "" { - env, err = vttest.NewLocalTestEnv("", basePort) + env, err = vttest.NewLocalTestEnv(basePort) if err != nil { return } } else { - env, err = vttest.NewLocalTestEnvWithDirectory("", basePort, config.DataDir) + env, err = vttest.NewLocalTestEnvWithDirectory(basePort, config.DataDir) if err != nil { return } diff --git a/go/vt/vttablet/endtoend/streamtimeout/main_test.go b/go/vt/vttablet/endtoend/streamtimeout/main_test.go index e676616b294..68851bf901b 100644 --- a/go/vt/vttablet/endtoend/streamtimeout/main_test.go +++ b/go/vt/vttablet/endtoend/streamtimeout/main_test.go @@ -65,7 +65,7 @@ func TestMain(m *testing.M) { Charset: "utf8mb4_general_ci", } - env, err := vttest.NewLocalTestEnv("", 0) + env, err := vttest.NewLocalTestEnv(0) if err != nil { fmt.Fprintf(os.Stderr, "%v", err) return 1 diff --git a/go/vt/vttest/environment.go b/go/vt/vttest/environment.go index dac9d718827..7f3ea88437a 100644 --- a/go/vt/vttest/environment.go +++ b/go/vt/vttest/environment.go @@ -107,16 +107,8 @@ type LocalTestEnv struct { // flavor is given. const DefaultMySQLFlavor = "MySQL56" -// GetMySQLOptions returns the default option set for the given MySQL -// flavor. If flavor is not set, DefaultMySQLFlavor will -// be used. -// Returns the name of the MySQL flavor being used, the set of MySQL CNF -// files specific to this flavor, and any errors. -func GetMySQLOptions(flavor string) (string, []string, error) { - if flavor == "" { - flavor = DefaultMySQLFlavor - } - +// GetMySQLOptions returns the set of MySQL CNF files and any errors. +func GetMySQLOptions() ([]string, error) { mycnf := []string{} mycnf = append(mycnf, "config/mycnf/test-suite.cnf") @@ -124,7 +116,7 @@ func GetMySQLOptions(flavor string) (string, []string, error) { mycnf[i] = path.Join(os.Getenv("VTROOT"), cnf) } - return flavor, mycnf, nil + return mycnf, nil } // EnvVars implements EnvVars for LocalTestEnv @@ -258,17 +250,17 @@ func randomPort() int { // - MySQLManager() will return a vttest.Mysqlctl instance, configured with the // given MySQL flavor. This will use the `mysqlctl` command to initialize and // teardown a single mysqld instance. -func NewLocalTestEnv(flavor string, basePort int) (*LocalTestEnv, error) { +func NewLocalTestEnv(basePort int) (*LocalTestEnv, error) { directory, err := tmpdir(os.Getenv("VTDATAROOT")) if err != nil { return nil, err } - return NewLocalTestEnvWithDirectory(flavor, basePort, directory) + return NewLocalTestEnvWithDirectory(basePort, directory) } // NewLocalTestEnvWithDirectory returns a new instance of the default test // environment with a directory explicitly specified. -func NewLocalTestEnvWithDirectory(flavor string, basePort int, directory string) (*LocalTestEnv, error) { +func NewLocalTestEnvWithDirectory(basePort int, directory string) (*LocalTestEnv, error) { if _, err := os.Stat(path.Join(directory, "logs")); os.IsNotExist(err) { err := os.Mkdir(path.Join(directory, "logs"), 0700) if err != nil { @@ -276,7 +268,7 @@ func NewLocalTestEnvWithDirectory(flavor string, basePort int, directory string) } } - flavor, mycnf, err := GetMySQLOptions(flavor) + mycnf, err := GetMySQLOptions() if err != nil { return nil, err } @@ -291,14 +283,13 @@ func NewLocalTestEnvWithDirectory(flavor string, basePort int, directory string) DefaultMyCnf: mycnf, Env: []string{ fmt.Sprintf("VTDATAROOT=%s", directory), - fmt.Sprintf("MYSQL_FLAVOR=%s", flavor), "VTTEST=endtoend", }, }, nil } func defaultEnvFactory() (Environment, error) { - return NewLocalTestEnv("", 0) + return NewLocalTestEnv(0) } // NewDefaultEnv is an user-configurable callback that returns a new Environment