-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[elastic-agent] Add hint to version command for binary #25380
Conversation
By default when running `elastic-agent version` it is expected that the daemon is running. If it is not running, an error is shown. Then the flag --binary-only should be used. A hint for this is added here to the error message for users.
Pinging @elastic/agent (Team:Agent) |
@@ -64,7 +64,7 @@ func NewCommandWithArgs(streams *cli.IOStreams) *cobra.Command { | |||
binaryOnly, _ := cmd.Flags().GetBool("binary-only") | |||
if !binaryOnly { | |||
if d, err := queryDaemon(); err != nil { | |||
returnErr = fmt.Errorf("failed to communicate with running daemon: %w", err) | |||
returnErr = fmt.Errorf("could not get version. failed to communicate with running daemon: %w\n Use --binary-only flag to get version from binary.", err) |
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 would update that to so
Use --binary-only flag to skip trying to retrieve version from running daemon.
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.
updated
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.
Just a comment on the wording. Overall looks good.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
By default when running `elastic-agent version` it is expected that the daemon is running. If it is not running, an error is shown. Then the flag --binary-only should be used. A hint for this is added here to the error message for users. (cherry picked from commit 7916ad4)
By default when running `elastic-agent version` it is expected that the daemon is running. If it is not running, an error is shown. Then the flag --binary-only should be used. A hint for this is added here to the error message for users. (cherry picked from commit 7916ad4) Co-authored-by: Nicolas Ruflin <spam@ruflin.com>
We have validated this feature in lieu of github.com//issues/20825 ticket on 8.0 BC1 and 8.0 snapshot build and found it working fine there. Further, we will validate same on 8.1 too once stable build BC2 will be available. Thanks |
Hi @jlind23 We have revalidated it on 8.1 snapshot build and found it working fine there too. Thanks |
By default when running
elastic-agent version
it is expected that the daemon is running. If it is not running, an error is shown. Then the flag --binary-only should be used. A hint for this is added here to the error message for users.