-
Notifications
You must be signed in to change notification settings - Fork 13
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
Enrich service wait up/down errors with more debug info. #2740
Conversation
This should help with rollbar reports.
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.
@Naatan For this story, I agree that we should step back from the wait up/down pacing (new story filed here: https://activestatef.atlassian.net/browse/DX-2176), but I'm curious to bring up the third point in the AC:
Consider and possibly include having some flag or arg passed in to the service start call at system startup so that we can better understand the context of the reported errors.
I feel fairly strongly that this would be an exceedingly useful data point. However, we didn't discuss a design. If you agree, should we create a separate story or update the current one?
Could you guys please add your concerns with the ACs to the jira ticket and move it back to triage. We should not be omitting AC's without conversation with either myself or Pete. I have opinions, but need more context. Probably easier if we talk about this during stand. |
6fb4500
to
c807070
Compare
cmd/state-svc/main.go
Outdated
p, nil, nil, | ||
p, | ||
[]*captain.Flag{ | ||
{Name: "startup", Value: &startup}, // differentiate between autostart and cli invocation |
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'm not sure if we have curated the help output for the service, but I suggest setting Hidden to true.
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 suggest renaming "startup" to autostart.
cmd/state-svc/main.go
Outdated
return runStart(out, "svc-start:cli") | ||
argText := "svc-start:cli" | ||
if startup { | ||
argText = "svc-start:startup" |
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.
argText = "svc-start:startup" | |
argText += "-autostart" |
cmd/state-svc/autostart/autostart.go
Outdated
@@ -13,7 +13,7 @@ import ( | |||
var Options = autostart.Options{ | |||
Name: constants.SvcAppName, | |||
LaunchFileName: constants.SvcLaunchFileName, | |||
Args: []string{"start"}, | |||
Args: []string{"start", "--startup"}, |
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.
Args: []string{"start", "--startup"}, | |
Args: []string{"start", "--autostart"}, |
cmd/state-svc/main.go
Outdated
p, nil, nil, | ||
p, | ||
[]*captain.Flag{ | ||
{Name: "startup", Value: &startup}, // differentiate between autostart and cli invocation |
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 suggest renaming "startup" to autostart.
cmd/state-svc/main.go
Outdated
return runStart(out, "svc-start:cli") | ||
argText := "svc-start:cli" | ||
if autostart { | ||
argText += "-autostart" |
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.
argText += "-autostart" | |
argText += "svc-start:auto" |
This should help with rollbar reports.
This is based on work done in the https://github.com/ActiveState/cli/commits/green/upg_svc_wait.DX-1824 branch: https://github.com/ActiveState/cli/pull/2739/files
I omitted the wait up/down pacing (c1920bb) because that's additional complication for little gain from what little I understood of it. Maintenance going forward may be a burden.