`odo dev` needs to handle changes in `devfile.yaml`
/kind user-story
User Story
- As an odo user
- I don't want to keep manually restarting
odo devcommand every time I edit something in devfile (likecommandLineor env variable) - it is annoying, time-consuming (for example in java-springboot stopping
odo devdeletes m2 volume that serves as maven cache, next time everything needs to be downloaded again)
Acceptance Criteria
- [ ]
odo devshould 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
Could be easier to implement with @feloy 's POC using controller-runtime: https://github.com/feloy/odo-dev-controller-poc
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
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 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.