-
Notifications
You must be signed in to change notification settings - Fork 653
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
WIP--Fix CI validator break issue and remove several redis marks in several files #42
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -28,7 +28,7 @@ then | |||||||||
while [ $((PORT < ENDPORT)) != "0" ]; do | ||||||||||
PORT=$((PORT+1)) | ||||||||||
echo "Starting $PORT" | ||||||||||
$BIN_PATH/redis-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} | ||||||||||
$BIN_PATH/placeholderkv-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} | ||||||||||
done | ||||||||||
exit 0 | ||||||||||
fi | ||||||||||
|
@@ -44,7 +44,7 @@ then | |||||||||
if [ "$2" == "-f" ]; then | ||||||||||
OPT_ARG="--cluster-yes" | ||||||||||
fi | ||||||||||
$BIN_PATH/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG | ||||||||||
$BIN_PATH/placeholderkv-cli --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
exit 0 | ||||||||||
fi | ||||||||||
|
||||||||||
|
@@ -53,7 +53,7 @@ then | |||||||||
while [ $((PORT < ENDPORT)) != "0" ]; do | ||||||||||
PORT=$((PORT+1)) | ||||||||||
echo "Stopping $PORT" | ||||||||||
$BIN_PATH/redis-cli -p $PORT shutdown nosave | ||||||||||
$BIN_PATH/placeholderkv-cli -p $PORT shutdown nosave | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
done | ||||||||||
exit 0 | ||||||||||
fi | ||||||||||
|
@@ -70,7 +70,7 @@ then | |||||||||
while [ $((PORT < ENDPORT)) != "0" ]; do | ||||||||||
PORT=$((PORT+1)) | ||||||||||
echo "Starting $PORT" | ||||||||||
$BIN_PATH/redis-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} | ||||||||||
$BIN_PATH/placeholderkv-server --port $PORT --protected-mode $PROTECTED_MODE --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --appenddirname appendonlydir-${PORT} --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes ${ADDITIONAL_OPTIONS} | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
done | ||||||||||
exit 0 | ||||||||||
fi | ||||||||||
|
@@ -81,7 +81,7 @@ then | |||||||||
while [ 1 ]; do | ||||||||||
clear | ||||||||||
date | ||||||||||
$BIN_PATH/redis-cli -p $PORT cluster nodes | head -30 | ||||||||||
$BIN_PATH/placeholderkv-cli -p $PORT cluster nodes | head -30 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
sleep 1 | ||||||||||
done | ||||||||||
exit 0 | ||||||||||
|
@@ -105,7 +105,7 @@ if [ "$1" == "call" ] | |||||||||
then | ||||||||||
while [ $((PORT < ENDPORT)) != "0" ]; do | ||||||||||
PORT=$((PORT+1)) | ||||||||||
$BIN_PATH/redis-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9 | ||||||||||
$BIN_PATH/placeholderkv-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
done | ||||||||||
exit 0 | ||||||||||
fi | ||||||||||
|
@@ -131,10 +131,10 @@ then | |||||||||
fi | ||||||||||
|
||||||||||
echo "Usage: $0 [start|create|stop|restart|watch|tail|tailall|clean|clean-logs|call]" | ||||||||||
echo "start -- Launch Redis Cluster instances." | ||||||||||
echo "start -- Launch Server Cluster instances." | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
echo "create [-f] -- Create a cluster using redis-cli --cluster create." | ||||||||||
echo "stop -- Stop Redis Cluster instances." | ||||||||||
echo "restart -- Restart Redis Cluster instances." | ||||||||||
echo "stop -- Stop Server Cluster instances." | ||||||||||
echo "restart -- Restart Server Cluster instances." | ||||||||||
Comment on lines
+136
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node." | ||||||||||
echo "tail <id> -- Run tail -f of instance at base port + ID." | ||||||||||
echo "tailall -- Run tail -f for all the log files at once." | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,8 +12,8 @@ | |||||||||||
### END INIT INFO | ||||||||||||
|
||||||||||||
REDISPORT=6379 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
EXEC=/usr/local/bin/redis-server | ||||||||||||
CLIEXEC=/usr/local/bin/redis-cli | ||||||||||||
EXEC=/usr/local/bin/placeholderkv-server | ||||||||||||
CLIEXEC=/usr/local/bin/placeholderkv-cli | ||||||||||||
|
||||||||||||
PIDFILE=/var/run/redis_${REDISPORT}.pid | ||||||||||||
CONF="/etc/redis/${REDISPORT}.conf" | ||||||||||||
Comment on lines
18
to
19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need decisions about these file names. I believe they are used in
Suggested change
|
||||||||||||
|
@@ -24,7 +24,7 @@ case "$1" in | |||||||||||
then | ||||||||||||
echo "$PIDFILE exists, process is already running or crashed" | ||||||||||||
else | ||||||||||||
echo "Starting Redis server..." | ||||||||||||
echo "Starting Placeholderkv server..." | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
So we're touching these files just once, let's make it engine agnostic where it makes sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, either "server" or use a variable defined only once at the top of the file. In an init script, think it's useful to know which service has been started or stopped. |
||||||||||||
$EXEC $CONF | ||||||||||||
fi | ||||||||||||
;; | ||||||||||||
|
@@ -38,10 +38,10 @@ case "$1" in | |||||||||||
$CLIEXEC -p $REDISPORT shutdown | ||||||||||||
while [ -x /proc/${PID} ] | ||||||||||||
do | ||||||||||||
echo "Waiting for Redis to shutdown ..." | ||||||||||||
echo "Waiting for Placeholderkv to shutdown ..." | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
sleep 1 | ||||||||||||
done | ||||||||||||
echo "Redis stopped" | ||||||||||||
echo "Placeholderkv stopped" | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
fi | ||||||||||||
;; | ||||||||||||
*) | ||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,12 +23,12 @@ | |||||||||
""" | ||||||||||
The purpose of this file is to validate the reply_schema values of COMMAND DOCS. | ||||||||||
Basically, this is what it does: | ||||||||||
1. Goes over req-res files, generated by redis-servers, spawned by the testsuite (see logreqres.c) | ||||||||||
1. Goes over req-res files, generated by placeholderkv-servers, spawned by the testsuite (see logreqres.c) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
2. For each request-response pair, it validates the response against the request's reply_schema (obtained from COMMAND DOCS) | ||||||||||
|
||||||||||
This script spins up a redis-server and a redis-cli in order to obtain COMMAND DOCS. | ||||||||||
This script spins up a placeholderkv-server and a placeholderkv-cli in order to obtain COMMAND DOCS. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
In order to use this file you must run the redis testsuite with the following flags: | ||||||||||
In order to use this file you must run the placeholderkv testsuite with the following flags: | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
./runtest --dont-clean --force-resp3 --log-req-res | ||||||||||
|
||||||||||
And then: | ||||||||||
|
@@ -62,7 +62,7 @@ | |||||||||
|
||||||||||
class Request(object): | ||||||||||
""" | ||||||||||
This class represents a Redis request (AKA command, argv) | ||||||||||
This class represents a Placeholderkv request (AKA command, argv) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
""" | ||||||||||
def __init__(self, f, docs, line_counter): | ||||||||||
""" | ||||||||||
|
@@ -106,7 +106,7 @@ def __str__(self): | |||||||||
|
||||||||||
class Response(object): | ||||||||||
""" | ||||||||||
This class represents a Redis response in RESP3 | ||||||||||
This class represents a Placeholderkv response in RESP3 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
""" | ||||||||||
def __init__(self, f, line_counter): | ||||||||||
""" | ||||||||||
|
@@ -159,7 +159,7 @@ def __init__(self, f, line_counter): | |||||||||
count = int(line[1:]) | ||||||||||
for i in range(count): | ||||||||||
field = Response(f, line_counter) | ||||||||||
# Redis allows fields to be non-strings but JSON doesn't. | ||||||||||
# Placeholderkv allows fields to be non-strings but JSON doesn't. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
# Luckily, for any kind of response we can validate, the fields are | ||||||||||
# always strings (example: XINFO STREAM) | ||||||||||
# The reason we can't always convert to string is because of DEBUG PROTOCOL MAP | ||||||||||
|
@@ -241,7 +241,7 @@ def fetch_schemas(cli, port, args, docs): | |||||||||
|
||||||||||
while True: | ||||||||||
try: | ||||||||||
print('Connecting to Redis...') | ||||||||||
print('Connecting to Placeholderkv...') | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
r = redis.Redis(port=port) | ||||||||||
r.ping() | ||||||||||
break | ||||||||||
|
@@ -271,9 +271,9 @@ def fetch_schemas(cli, port, args, docs): | |||||||||
testdir = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../tests") | ||||||||||
|
||||||||||
parser = argparse.ArgumentParser() | ||||||||||
parser.add_argument('--server', type=str, default='%s/redis-server' % srcdir) | ||||||||||
parser.add_argument('--server', type=str, default='%s/placeholderkv-server' % srcdir) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use a variable for this and define it in the top of the file. |
||||||||||
parser.add_argument('--port', type=int, default=6534) | ||||||||||
parser.add_argument('--cli', type=str, default='%s/redis-cli' % srcdir) | ||||||||||
parser.add_argument('--cli', type=str, default='%s/placeholderkv-cli' % srcdir) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use a variable for this and define it in the top of the file. |
||||||||||
parser.add_argument('--module', type=str, action='append', default=[]) | ||||||||||
parser.add_argument('--verbose', action='store_true') | ||||||||||
parser.add_argument('--fail-commands-not-all-hit', action='store_true') | ||||||||||
|
@@ -282,16 +282,16 @@ def fetch_schemas(cli, port, args, docs): | |||||||||
|
||||||||||
docs = dict() | ||||||||||
|
||||||||||
# Fetch schemas from a Redis instance | ||||||||||
print('Starting Redis server') | ||||||||||
# Fetch schemas from a Placeholderkv instance | ||||||||||
print('Starting Placeholderkv server') | ||||||||||
Comment on lines
+285
to
+286
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
redis_args = [args.server, '--port', str(args.port)] | ||||||||||
for module in args.module: | ||||||||||
redis_args += ['--loadmodule', 'tests/modules/%s.so' % module] | ||||||||||
|
||||||||||
fetch_schemas(args.cli, args.port, redis_args, docs) | ||||||||||
|
||||||||||
# Fetch schemas from a sentinel | ||||||||||
print('Starting Redis sentinel') | ||||||||||
print('Starting Placeholderkv sentinel') | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
# Sentinel needs a config file to start | ||||||||||
config_file = "tmpsentinel.conf" | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -20,15 +20,15 @@ proc run-tests branches { | |||||||||||||
exec -ignorestderr make 2> /dev/null | ||||||||||||||
|
||||||||||||||
if {$branch_id == 0} { | ||||||||||||||
puts " copy redis-benchmark from unstable to /tmp..." | ||||||||||||||
exec -ignorestderr cp ./redis-benchmark /tmp | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bold statement by me, maybe we just delete this file? Has anybody ever run this? I've never seen this before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me check if this file is necessary. I never use it before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I run the daily CI without this file, all test cases pass. I think we could remove it safely. (Here is the result https://github.com/hwware/redis/actions/runs/8454862841) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, let's delete it. |
||||||||||||||
puts " copy placeholderkv-benchmark from unstable to /tmp..." | ||||||||||||||
exec -ignorestderr cp ./placeholderkv-benchmark /tmp | ||||||||||||||
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use a variable for this and define it in the top of the file. Example:
Suggested change
|
||||||||||||||
incr branch_id | ||||||||||||||
continue | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
# Start the Redis server | ||||||||||||||
puts " starting the server... [exec ./redis-server -v]" | ||||||||||||||
set pids [exec echo "port $::port\nloglevel warning\n" | ./redis-server - > /dev/null 2> /dev/null &] | ||||||||||||||
# Start the Placeholderkv server | ||||||||||||||
puts " starting the server... [exec ./placeholderkv-server -v]" | ||||||||||||||
set pids [exec echo "port $::port\nloglevel warning\n" | ./placeholderkv-server - > /dev/null 2> /dev/null &] | ||||||||||||||
Comment on lines
+29
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
puts " pids: $pids" | ||||||||||||||
after 1000 | ||||||||||||||
puts " running the benchmark" | ||||||||||||||
|
@@ -38,7 +38,7 @@ proc run-tests branches { | |||||||||||||
puts " redis INFO shows version: [lindex [split $i] 0]" | ||||||||||||||
$r close | ||||||||||||||
|
||||||||||||||
set output [exec /tmp/redis-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port] | ||||||||||||||
set output [exec /tmp/placeholderkv-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port] | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
lappend runs $b $output | ||||||||||||||
puts " killing server..." | ||||||||||||||
catch {exec kill -9 [lindex $pids 0]} | ||||||||||||||
|
@@ -83,7 +83,7 @@ proc combine-results {results} { | |||||||||||||
} | ||||||||||||||
|
||||||||||||||
proc main {} { | ||||||||||||||
# Note: the first branch is only used in order to get the redis-benchmark | ||||||||||||||
# Note: the first branch is only used in order to get the placeholderkv-benchmark | ||||||||||||||
# executable. Tests are performed starting from the second branch. | ||||||||||||||
set branches { | ||||||||||||||
slowset 2.2.0 2.4.0 unstable slowset | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
# example systemd template service unit file for multiple redis-servers | ||
# example systemd template service unit file for multiple placeholderkv-server | ||
# | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As in every other file, I think we shouldn't use "placeholderkv" more than once in each script for defining a variable at the top of the file. In comments, we can just say server instance and similar words. |
||
# You can use this file as a blueprint for your actual template service unit | ||
# file, if you intend to run multiple independent redis-server instances in | ||
# file, if you intend to run multiple independent placeholderkv-server instances in | ||
# parallel using systemd's "template unit files" feature. If you do, you will | ||
# want to choose a better basename for your service unit by renaming this file | ||
# when copying it. | ||
# | ||
# Please take a look at the provided "systemd-redis_server.service" example | ||
# Please take a look at the provided "systemd-placeholderkv_server.service" example | ||
# service unit file, too, if you choose to use this approach at managing | ||
# multiple redis-server instances via systemd. | ||
# multiple placeholderkv-server instances via systemd. | ||
|
||
[Unit] | ||
Description=Redis data structure server - instance %i | ||
Documentation=https://redis.io/documentation | ||
# This template unit assumes your redis-server configuration file(s) | ||
# to live at /etc/redis/redis_server_<INSTANCE_NAME>.conf | ||
AssertPathExists=/etc/redis/redis_server_%i.conf | ||
# This template unit assumes your placeholderkv-server configuration file(s) | ||
# to live at /etc/redis/placeholder_server_<INSTANCE_NAME>.conf | ||
AssertPathExists=/etc/redis/placeholder_server_%i.conf | ||
#Before=your_application.service another_example_application.service | ||
#AssertPathExists=/var/lib/redis | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/redis-server /etc/redis/redis_server_%i.conf | ||
ExecStart=/usr/local/bin/placeholderkv-server /etc/redis/placeholderkv_server_%i.conf | ||
LimitNOFILE=10032 | ||
NoNewPrivileges=yes | ||
#OOMScoreAdjust=-900 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# example systemd service unit file for redis-server | ||
# example systemd service unit file for placeholderkv-server | ||
# | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is covered here: https://github.com/placeholderkv/placeholderkv/pull/29/files |
||
# In order to use this as a template for providing a redis service in your | ||
# environment, _at the very least_ make sure to adapt the redis configuration | ||
|
@@ -24,9 +24,9 @@ Wants=network-online.target | |
After=network-online.target | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no | ||
## Alternatively, have redis-server load a configuration file: | ||
#ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf | ||
ExecStart=/usr/local/bin/placeholderkv-server --supervised systemd --daemonize no | ||
## Alternatively, have placeholderkv-server load a configuration file: | ||
#ExecStart=/usr/local/bin/placeholderkv-server /path/to/your/redis.conf | ||
LimitNOFILE=10032 | ||
NoNewPrivileges=yes | ||
#OOMScoreAdjust=-900 | ||
|
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.
Let's avoid spelling out "placeholderkv" everywhere, because we will change it soon and backporting these changes will be a PITA.
Let's define near the top of the file
And then use it within this file everywhere, like
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.
I think I can temporarily set this PR as WIP, and wait for our project offical name.