odo icon indicating copy to clipboard operation
odo copied to clipboard

`odo list`: add odo version used to create a component to the output

Open kadel opened this issue 3 years ago • 0 comments

/kind user-story

User Story

As an IDE plugin developer, I want to be able to see the version of the odo that was used to create components on the cluster So that I can deal help users transition between odo v2 and odo v3

background

When the user runs odo dev command against the component that exists in the cluster in the pushed state and it was pushed using odo v2, the odo dev will fail, and it will delete the component form the cluster.

Acceptance Criteria

  • [ ] odo list should show the odo version that was used to create (push) component to the cluster
  • [ ] It should be shown in normal and json output as well.

implementation notes

the version is available as a label on the resources create by odo ( app.kubernetes.io/managed-by-version)

example

▶ odo list
 ✓  Listing components from namespace 'tkral-dev' [5s]
 NAME           PROJECT TYPE  RUNNING IN  MANAGED
 myapp          Unknown       Dev         odo (v2.5.1)
 my-nodejs-app  Unknown       Dev         odo (v3.0.0-beta2)

▶ odo list -o json
{
	"components": [
		{
			"name": "my-nodejs-app",
			"managedBy": "odo",
                        "managedByVersion": "v3.0.0-beta2",
			"runningIn": [
				"Dev"
			],
			"projectType": "nodejs"
		},
		{
			"name": "myapp",
			"managedBy": "odo",
                        "managedByVersion": "v2.5.1",
			"runningIn": [
				"Dev"
			],
			"projectType": "Unknown"
		}
	]
}

/kind user-story

kadel avatar Jul 21 '22 15:07 kadel