Skip to content

Commit db7b223

Browse files
committed
Refactor grpc flags for standardized naming (vitessio#18009)
Signed-off-by: mounicasruthi <[email protected]>
1 parent ea5c71e commit db7b223

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+467
-397
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ report
9393
# mise files
9494
.mise.toml
9595
/errors/
96+
go/flags/endtoend/count_flags.sh

docker/mini/vtctld-mini-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ grpc_port=15999
2323

2424
echo "- Starting vtctld..."
2525
# shellcheck disable=SC2086
26+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2627
vtctld \
2728
$TOPOLOGY_FLAGS \
2829
--disable_active_reparents \

docker/mini/vttablet-mini-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ echo "> Starting vttablet for server $mysql_host:$mysql_port"
3939
echo " - Tablet alias is $alias"
4040
echo " - Tablet listens on http://$hostname:$port"
4141
# shellcheck disable=SC2086
42+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
4243
vttablet \
4344
$TOPOLOGY_FLAGS \
4445
-log_dir $VTDATAROOT/tmp \

examples/common/scripts/vtctld-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ grpc_port=15999
2323

2424
echo "Starting vtctld..."
2525
# shellcheck disable=SC2086
26+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2627
vtctld \
2728
$TOPOLOGY_FLAGS \
2829
--cell $cell \

examples/common/scripts/vtgate-up.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ mysql_server_socket_path="/tmp/mysql.sock"
2626

2727
echo "Starting vtgate..."
2828
# shellcheck disable=SC2086
29+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
2930
vtgate \
3031
$TOPOLOGY_FLAGS \
3132
--log_dir $VTDATAROOT/tmp \

examples/compose/docker-compose.beginners.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ services:
6363
- "15000:$WEB_PORT"
6464
- "$GRPC_PORT"
6565
command: ["sh", "-c", " /vt/bin/vtctld \
66+
# TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
6667
$TOPOLOGY_FLAGS \
6768
--cell $CELL \
6869
--service_map 'grpc-vtctl,grpc-vtctld' \
6970
--backup_storage_implementation file \
7071
--file_backup_storage_root /vt/vtdataroot/backups \
7172
--logtostderr=true \
7273
--port $WEB_PORT \
73-
--grpc_port $GRPC_PORT
74+
--grpc-port $GRPC_PORT
7475
"]
7576
depends_on:
7677
consul1:
@@ -89,10 +90,11 @@ services:
8990
- "$GRPC_PORT"
9091
- "15306:$MYSQL_PORT"
9192
command: ["sh", "-c", "/vt/bin/vtgate \
93+
# TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
9294
$TOPOLOGY_FLAGS \
9395
--logtostderr=true \
9496
--port $WEB_PORT \
95-
--grpc_port $GRPC_PORT \
97+
--grpc-port $GRPC_PORT \
9698
--mysql_server_port $MYSQL_PORT \
9799
--mysql_auth_server_impl none \
98100
--cell $CELL \

examples/compose/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ services:
139139
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
140140
--topo-global-root vitess/global --cell test
141141
--service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root
142-
/vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc_port 15999 '
142+
/vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc-port 15999 '
143143
depends_on:
144144
external_db_host:
145145
condition: service_healthy
@@ -154,7 +154,7 @@ services:
154154
- sh
155155
- -c
156156
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
157-
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc_port
157+
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc-port
158158
15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell test --cells_to_watch
159159
test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map ''grpc-vtgateservice''
160160
--normalize_queries=true '

examples/compose/vtcompose/docker-compose.test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ services:
152152
- sh
153153
- -c
154154
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
155-
--topo-global-root vitess/global --cell test
156-
--service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file
157-
--file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port
158-
8080 --grpc_port 15999 '
155+
--topo-global-root vitess/global --cell test
156+
--service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file
157+
--file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port
158+
8080 --grpc-port 15999 '
159159
depends_on:
160160
external_db_host:
161161
condition: service_healthy
@@ -170,10 +170,10 @@ services:
170170
- sh
171171
- -c
172172
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
173-
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080
174-
--grpc_port 15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell
175-
test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map
176-
''grpc-vtgateservice'' --normalize_queries=true '
173+
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080
174+
--grpc-port 15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell
175+
test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map
176+
''grpc-vtgateservice'' --normalize_queries=true '
177177
depends_on:
178178
- vtctld
179179
image: vitess/lite:${VITESS_TAG:-latest}

examples/compose/vtcompose/vtcompose.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ func generateVtctld(opts vtOptions) string {
637637
--file_backup_storage_root /vt/vtdataroot/backups \
638638
--logtostderr=true \
639639
--port %[1]d \
640-
--grpc_port %[2]d \
640+
--grpc-port %[2]d \
641641
"]
642642
volumes:
643643
- .:/script
@@ -665,7 +665,7 @@ func generateVtgate(opts vtOptions) string {
665665
%[4]s \
666666
--logtostderr=true \
667667
--port %[1]d \
668-
--grpc_port %[2]d \
668+
--grpc-port %[2]d \
669669
--mysql_server_port %[3]d \
670670
--mysql_auth_server_impl none \
671671
--cell %[5]s \

examples/compose/vttablet-up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ else
142142
--restore_from_backup"
143143
fi
144144

145-
145+
#TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
146146
echo "Starting vttablet..."
147147
exec $VTROOT/bin/vttablet \
148148
$TOPOLOGY_FLAGS \

0 commit comments

Comments
 (0)