-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable -mysql_server_version in vttestserver, and utilize it in vttestserver container images #7474
Enable -mysql_server_version in vttestserver, and utilize it in vttestserver container images #7474
Conversation
…erverVersion downstream Signed-off-by: Mike Cronce <[email protected]>
Signed-off-by: Mike Cronce <[email protected]>
@@ -55,4 +55,4 @@ COPY --from=builder --chown=vitess:vitess /vt/install /vt | |||
VOLUME /vt/vtdataroot | |||
USER vitess | |||
|
|||
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} | |||
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} -mysql_server_version 5.7.9-vitess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be nice to allow users to override this with an env variable.
We can default to 5.7.9-Vitess
which is the internal default as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -55,4 +55,4 @@ COPY --from=builder --chown=vitess:vitess /vt/install /vt | |||
VOLUME /vt/vtdataroot | |||
USER vitess | |||
|
|||
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} | |||
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} -mysql_server_version 8.0.0-vitess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably use a current mysql version - say 8.0.21.
To make this more usable, how about adding an env variable similar to the others and defaulting to 8.0.21-Vitess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -247,6 +247,9 @@ func VtcomboProcess(env Environment, args *Config, mysql MySQLManager) *VtProces | |||
if args.VSchemaDDLAuthorizedUsers != "" { | |||
vt.ExtraArgs = append(vt.ExtraArgs, []string{"-vschema_ddl_authorized_users", args.VSchemaDDLAuthorizedUsers}...) | |||
} | |||
if *servenv.MySQLServerVersion != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. I thought we would have to add an arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was what I tried first, but it failed because this one was already being pulled in :)
…and change the :mysql80 default from 8.0.0-vitess to 8.0.21-vitess Signed-off-by: Mike Cronce <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Exposes the
-mysql_server_version
parameter invttestserver
, and changes thevitess/vttestserver
container images to set it appropriately.Related Issue(s)
Checklist
Deployment Notes
N/A - only impacts new
vttestserver
runsImpacted Areas in Vitess
Components that this PR will affect: