odo icon indicating copy to clipboard operation
odo copied to clipboard

`odo dev` not handling changes to the Devfile after removing a Kubernetes resource

Open rm3l opened this issue 3 years ago • 3 comments

/kind bug /area binding

What versions of software are you using?

Operating System: Fedora 36

Output of odo version: odo v3.0.0-rc1 (897f5f3e0)

How did you run odo exactly?

Reproduction steps:

  1. New project, but you can use any other project: odo init --name my-sample-go --devfile go --starter go-starter
  2. Run odo dev, and wait until the Dev session is up and running
  3. Add a new binding, e.g.: odo add binding --name my-sample-go-postgresql-binding --service postgresql => Changes to the Devfile are automatically handled, and the pod is recreated and binding information injected, which is fine.
  4. Wait until the Dev session is ok again. Now, if I remove the previous binding from the Devfile with odo remove binding --name my-sample-go-postgresql-binding, the running odo dev session will just display "Updating component...", but it looks like nothing is actually happening in the cluster.

Actual behavior

The pod is not recreated and the binding information is still there in the pod.

Expected behavior

Similar to how odo add binding affects the currently running Dev pod, I would expect odo remove binding to cause the Dev pod to be recreated with no binding data injected in it.

Any logs, error output, etc?

rm3l avatar Sep 07 '22 09:09 rm3l

Please check with #5923, this bug might be a regression.

valaparthvi avatar Sep 08 '22 12:09 valaparthvi

FYI, this regression was caused by this commit: 6d82a577a29206ce0693bf67d1a050f8103fcff3 (#6029):

/triage ready

rm3l avatar Sep 12 '22 11:09 rm3l

This issue holds true for all the resources that are created by odo dev. It does not check if the resources in devfile and cluster match. Although that is not a regression, it was just something we never implemented. I tested with 27f9dff19c1152ab2afd5ced481dd17b18aecee1.

valaparthvi avatar Sep 22 '22 06:09 valaparthvi