-
Notifications
You must be signed in to change notification settings - Fork 9
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
feature/implementing-ngrok-startup-script #21
feature/implementing-ngrok-startup-script #21
Conversation
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
tunnel_endpoint.sh
Outdated
WAIT_INTERVAL=${WAIT_INTERVAL:-3} | ||
WAIT_ATTEMPTS=${WAIT_ATTEMPTS:-10} | ||
|
||
retrieve_endpoint () { |
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 more of a function that makes sure the server is ready rather than retrieving the endpoint.
tunnel_endpoint.sh
Outdated
retrieve_endpoint () { | ||
for _ in $(seq 1 "$WAIT_ATTEMPTS"); do | ||
#TODO If wait attempts exceeded and we still haven't successfully gotten an endpoint, exit with status 1 | ||
if ! curl -s -o /dev/null -w '%{http_code}' "${1}/url" | grep "200" > /dev/null; then |
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.
if ! curl -s -o /dev/null -w '%{http_code}' "${1}/url" | grep "200" > /dev/null; then | |
if ! curl -s -o /dev/null -w '%{http_code}' "${1}" | grep "200" > /dev/null; then |
I think we need to remove the /url
so the function args can specify the endpoint fully and not have anything appended to it.
tunnel_endpoint.sh
Outdated
|
||
retrieve_endpoint () { | ||
for _ in $(seq 1 "$WAIT_ATTEMPTS"); do | ||
#TODO If wait attempts exceeded and we still haven't successfully gotten an endpoint, exit with status 1 |
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 we should implement this TODO. In the branch where we do the waiting, we should check if current number of attempt is equal to max and then exit 1
if it is.
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: anwalker293 <alex.walker@indicio.tech>
Signed-off-by: Alex Walker <alex.walker@indicio.tech>
Also making requested changes Signed-off-by: Alex Walker <alex.walker@indicio.tech>
@dbluhm I think this is ready to rock and roll :) |
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.
Looks good to me!
Signed-off-by: Alexandra N. Walker alex.walker@indicio.tech ☀️