odo icon indicating copy to clipboard operation
odo copied to clipboard

`odo dev` needs to handle changes in `devfile.yaml`

Open kadel opened this issue 3 years ago • 3 comments

/kind user-story

User Story

  • As an odo user
  • I don't want to keep manually restarting odo dev command every time I edit something in devfile (like commandLine or env variable)
  • it is annoying, time-consuming (for example in java-springboot stopping odo dev deletes m2 volume that serves as maven cache, next time everything needs to be downloaded again)

Acceptance Criteria

  • [ ] odo dev should be able to handle changes in devfile.yaml
  • [ ] when possible it should just update resources and let Kubernetes handle changes (re-deploy)
  • [ ] things that were not updated should not be touched (example: editing env variable should not effect volumes)

/kind user-story

kadel avatar May 10 '22 16:05 kadel

Could be easier to implement with @feloy 's POC using controller-runtime: https://github.com/feloy/odo-dev-controller-poc

rm3l avatar Jun 16 '22 12:06 rm3l

After some tests, I can see that odo dev is able to

  • update the deployment when the container information is updated in the Devfile.
  • deploy/undeploy Kubernetes components (including service bindings) to/from cluster when added/removed to/from the devfile

The first thing to fix would be to restart the port forwardings, which are lost after a pod restart

feloy avatar Jun 16 '22 17:06 feloy

odo dev is not able to handle a change in Devfile if a Pod is not in a Running state. The consequence is that if the user starts odo dev with a "failing" Devfile or if it edits the Devfile to make it "fail" (env var makging the app fail, bad memory/cpu allocation, wrong command, etc), it needs to stop odo dev.

feloy avatar Jun 16 '22 17:06 feloy

@feloy It seems like we've covered all the ACs in this epic, I am not sure about the last one though. Please close this epic if you think we're good to go.

valaparthvi avatar Aug 25 '22 06:08 valaparthvi