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

Minor fixes for error messages on failure to disable Hubble #1742

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented Jun 21, 2023

Here are a few minor fixes for some error messages from the CLI, in particular on uninstall when trying to disable Hubble.

  • internal/cli/cmd: Add line breaks after error messages
  • internal/cli/cmd: Fix error displayed on failure to disable Hubble

I observed the following when uninstalling Cilium:

    ℹ️  Failed to disable Hubble. This is expected if Hubble is not enabled: %!s(<nil>)🔮 Auto-detected Kubernetes kind: kind

We have two different messages on the same line. Add missing line breaks
at the end of fmt.Printf() invocations, to avoid joining these unrelated
lines.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
I observed the following when uninstalling Cilium:

    ℹ️  Failed to disable Hubble. This is expected if Hubble is not enabled: %!s(<nil>)🔮 Auto-detected Kubernetes kind: kind

Note the "%!s(<nil>)" error message. This is because the error displayed
is nil, because we do not pass the right error to the fmt.Printf()
invocation to create this message. Let's fix it.

My understanding is that this fix should also prevent the message from
showing up when Hubble has not been enabled, so we can also remove the
related part of the output message.

Fixes: 0eb0600 ("hubble: Remove --base-version flag")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
@qmonnet qmonnet added the sig/hubble Impacts hubble label Jun 21, 2023
@qmonnet qmonnet requested a review from a team as a code owner June 21, 2023 15:38
@qmonnet qmonnet requested a review from derailed June 21, 2023 15:38
@qmonnet qmonnet temporarily deployed to ci June 21, 2023 15:38 — with GitHub Actions Inactive
Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

Thanks!

@tklauser tklauser merged commit 38c6535 into cilium:main Jun 22, 2023
18 of 19 checks passed
@qmonnet qmonnet deleted the pr/hubble-disable-fmt branch June 22, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/hubble Impacts hubble
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants