Skip to content
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

remove dns sleep #2550

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/_nebari/stages/kubernetes_ingress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,18 @@ def _attempt_dns_lookup(

attempt = 0
while not _attempt_dns_lookup(domain_name, ip):
sleeptime = 60 * (2**attempt)
if not disable_prompt:
if disable_prompt:
sleeptime = 60 * (2**attempt)
print(f"Will attempt to poll DNS again in {sleeptime} seconds...")
time.sleep(sleeptime)
else:
input(
f"After attempting to poll the DNS, the record for domain={domain_name} appears not to exist, "
f"has recently been updated, or has yet to fully propagate. This non-deterministic behavior is likely due to "
f"DNS caching and will likely resolve itself in a few minutes.\n\n\tTo poll the DNS again in {sleeptime} seconds "
f"[Press Enter].\n\n...otherwise kill the process and run the deployment again later..."
f"DNS caching and will likely resolve itself in a few minutes.\n\n\tTo poll the DNS again [Press Enter].\n\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Adam-D-Lewis Can we add extra information to let the user know this will only run up to five times? Something like [4/5]

f"...otherwise kill the process and run the deployment again later..."
)

print(f"Will attempt to poll DNS again in {sleeptime} seconds...")
time.sleep(sleeptime)
attempt += 1
if attempt == 5:
print(
Expand Down