Skip to content

Conversation

@ekzyis
Copy link

@ekzyis ekzyis commented Jan 17, 2026

Hello!

In a minikube environment, bash scripts/deploy.sh regtest4 in wrath-of-nalo depends on minikube tunnel running. The same is true for warnet dashboard.

However, unlike warnet dashboard, scripts/deploy.sh (specifically update_grafana_dashboard.py) does not return a useful error if the ingress IP address was not found. It prints this error instead:

Error getting ingress IP: 'NoneType' object is not subscriptable

and then tries to resolve None as a domain. Compare this to how warnet dashboard mentions this in that case:

Error: Could not get the IP address of the dashboard
If you are running Minikube please run 'minikube tunnel' in a separate terminal

I didn't want to duplicate this error handling to update_grafana_dashboard.py. Instead, I thought it'd be nice to let warnet setup also handle this, similar to how it's already checking if minikube is running.

This is what this PR is doing! The check depends on pgrep with the -f option being available.

Here's a video of how I tested this:

2026-01-17.13-43-41.mp4

I will include suggestions for my own code in a review. This PR is just meant to show the least invasive change to handle this in warnet setup, assuming that's even the best place to handle it.

def is_minikube_tunnel_running() -> tuple[bool, str]:
try:
result = subprocess.run(
["pgrep", "-f", "minikube tunnel"],
Copy link
Author

Choose a reason for hiding this comment

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

Need to check if we can depend on pgrep -f being available, or if there's a more common way to check if a process is running on systems that would run minikube.

if is_platform_darwin():
check_results.append(check_installation(minikube_version_info))
check_results.append(check_installation(minikube_running_info))
check_results.append(check_installation(minikube_tunnel_running_info))
Copy link
Author

Choose a reason for hiding this comment

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

Maybe this shouldn't be checked independently but inside the check if minikube is running?

That way, we wouldn't always print "Running Minikube is not satisfied" and "Running Minikube Tunnel is not satisfied" together.

capture_output=True,
text=True
)
if result.returncode == 0:
Copy link
Author

Choose a reason for hiding this comment

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

According to man pgrep, checking if the exit code is 0 should be enough:

EXIT STATUS
       0      One or more processes matched the criteria. For pkill and pidwait, one or more processes must also have been successfully signalled or waited for.
       1      No processes matched or none of them could be signalled.
       2      Syntax error in the command line.
       3      Fatal error: out of memory etc.

I have noticed other commands also check the output though. I could do that here, too. That would require -a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant