odigos: Odigos uninstall output is not helpful when odigos in not installed

When running the odigos cli odigos uninstall, there can be 2 options.

  1. odigos is install, in which case the following output is printed to console which is good
➜  cli git:(odigos-deployment) odigos uninstall
About to uninstall Odigos from namespace odigos-system
Are you sure? [Y/n]: Y
Uninstalling Odigos Deployments                   ✔
Uninstalling Odigos DaemonSets                    ✔
Uninstalling Odigos ConfigMaps                    ✔
Uninstalling Odigos CRDs                          ✔
Uninstalling Odigos RBAC                          ✔
Uninstalling Odigos Secrets                       ✔
Uninstalling Namespace odigos-system              ✔
Waiting for namespace to be deleted               ✔
Rolling back odigos changes to pods
Rolling back odigos changes to namespaces
        ✔

SUCCESS: Odigos uninstalled.
  1. If Odigos is not installed to begin with, the output is not very helpful:
➜  cli git:(odigos-deployment) odigos uninstall
About to uninstall Odigos from namespace odigos-system
Are you sure? [Y/n]: Y
Uninstalling Odigos Deployments                   ✔
Uninstalling Odigos DaemonSets                    ✔
Uninstalling Odigos ConfigMaps                    ✔
Uninstalling Odigos CRDs                          ✔
Uninstalling Odigos RBAC                          ✔
Uninstalling Odigos Secrets                       ✔
Uninstalling Namespace odigos-system              X
ERROR namespaces "odigos-system" not found

I think it is more useful to print something like “Odigos is not installed in the cluster” if the namespace is not found.

To check your fix, you can set up an odigos environment with Quickstart. Then, make necessary changes in the cli module code, and run in terminal:

➜  odigos git:(main) cd cli
➜  cli git:(main) go run . uninstall

To run the cli uninstall command locally from code and verify your fix.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@blumamir I am facing error due to recent changes in this:

https://github.com/keyval-dev/odigos/blob/3319cab6c2ea6034d3aa25ca073a1dd8602339a3/instrumentor/go.mod#L4

This generates error: image

Do i need to update my go lang version ? My current version is: go version go1.18.1 linux/amd64

SOLVED!! Just needed to update the go lang version

here https://github.com/keyval-dev/odigos/blob/main/cli/cmd/install.go in line 55 ?

You are doing awesome work, thanks! if you want to learn something new for using github, I have 2 tips:

  1. if you want to get a link for a specific line in a specific file, you can click on that file number (55) in your case, and choose Cope permalink

image

This link will still point to the right line even if the source file is changed in the future.

  1. instead of pasting urls in github comments, you can use Markdown links, so you can write cleaner text which is easier to read:

here - This link is written like this:

image

  • I want to reply like that but i don’t how to do it
  • Thank you for the tip 👍

Yes I am using v0.1.75. Thanks for the help @HeetVekariya