ocket8888 commented on code in PR #6588:
URL: https://github.com/apache/trafficcontrol/pull/6588#discussion_r847626821
##########
dev/atc.dev.sh:
##########
@@ -41,12 +49,14 @@ function atc-ready {
echo "";
echo "-h, --help print usage information and
exit";
echo "-w, --wait wait for ATC to be ready,
instead of just checking if it is ready";
+ echo "-d, --wait wait for the ATC delivery
service to be ready";
Review Comment:
The corresponding long option for `-d` is `--deliveryservice`, not `--wait`
##########
dev/atc.dev.sh:
##########
@@ -32,7 +32,15 @@ function atc-ready {
if [[ $# -gt 0 ]]; then
case "$1" in
-w|--wait)
- while ! curl -skL "$url" >/dev/null 2>&1; do
+ until curl -skL "$url" >/dev/null 2>&1; do
+ sleep 1;
+ done
+ return 0;;
+ -d|--deliveryservice)
Review Comment:
as "Delivery Service" is two words, this should be `--delivery-service`.
That's not explicitly _recommended_ by GNU, but very nearly all examples of
multi-word long options in their [table of commonly used long
options](https://www.gnu.org/prep/standards/standards.html#Option-Table) use
`-` to separate words rather than allowing them to run together.
##########
dev/atc.dev.sh:
##########
@@ -41,12 +49,14 @@ function atc-ready {
echo "";
echo "-h, --help print usage information and
exit";
echo "-w, --wait wait for ATC to be ready,
instead of just checking if it is ready";
+ echo "-d, --wait wait for the ATC delivery
service to be ready";
return 0;;
*)
echo "Usage: $0 [-h] [-w]" >&2;
echo "" >&2;
echo "-h, --help print usage information and
exit" >&2;
echo "-w, --wait wait for ATC to be ready,
instead of just checking if it is ready" >&2;
+ echo "-d, --wait wait for the ATC delivery
service to be ready" >&2;
Review Comment:
same as above RE: wrong long-form option name
##########
dev/atc.dev.sh:
##########
@@ -32,7 +32,15 @@ function atc-ready {
if [[ $# -gt 0 ]]; then
case "$1" in
Review Comment:
just to make a note, now that we have mutually exclusive arguments we might
want to consider using `getopt`. I don't know how that would work on MacOS,
though. And also we may want to consider making those _not_ mutually exclusive,
such that `atc-ready -d` exits immediately with a code that indicates the
readiness of the dev DS, while `atc-ready -wd` waits for the DS to be ready.
##########
dev/traffic_router/Dockerfile:
##########
@@ -25,7 +25,7 @@ ADD
https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.43/bin/apache-tomcat-9.
ARG USER
ARG UID
RUN adduser -H -D ${USER} -u ${UID}
-RUN chown -R ${USER} /opt /usr/share/java/ /root
+RUN chown -R ${UID}:${UID} /opt /usr/share/java/ /root
Review Comment:
switching to UID from USER is fine, but I'm not sure there's any particular
guarantee that any given user has a GID that is exactly the same as their UID,
and that's not information we pass into the Docker build stage at this time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]