-
Notifications
You must be signed in to change notification settings - Fork 243
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
Issue #2687 Modify tray started check to verify if daemon is running #2722
Conversation
@@ -99,3 +103,12 @@ func fixPlistFileExists(agentConfig launchd.AgentConfig) error { | |||
} | |||
return nil | |||
} | |||
|
|||
func checkIfDaemonRunning() error { | |||
return crcerrors.Retry(context.Background(), time.Second*20, func() error { |
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.
20 seconds seem very long?
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.
yes, it needs to be changed, in the on macOS tray we only wait 1 second before making /status
calls, so 1 second interval and the limit we can set to 3? worst case 3 seconds wait time
f2a26ea
to
88d2990
Compare
return &crcerrors.RetriableError{Err: fmt.Errorf("Daemon is not yet running: %w", err)} | ||
} | ||
return nil | ||
}, time.Second*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.
the *1
is not needed :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anjannath, cfergeau The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…unning the daemon might take a few seconds to come up and make the api endpoint available it is better to check that the daemon is up by trying to access this endpoint to make sure user is successfully able to do `crc start` after `crc setup`
88d2990
to
4449a93
Compare
New changes are detected. LGTM label has been removed. |
Why this is marked as |
Its removed now, the bot took sometime to remove the label :) |
the daemon might take a few seconds to come up and make the api endpoint available
it is better to check that the daemon is up by trying to access this endpoint to
make sure user is successfully able to do
crc start
aftercrc setup