Update an k8s application with rok returns 422 error
Following the changes made on the structure of the Application resources (and its nested resources like ApplicationStatus), updating a k8s application with rok doesn't work:
$ rok kube app create -f git/krake/rak/functionals/echo-demo-update.yaml echo-demo
[...]
$ rok kube app update -f git/krake/rak/functionals/echo-demo.yaml echo-demo
Traceback (most recent call last):
File "/home/krake/.local/bin/rok", line 8, in <module>
sys.exit(main())
File "/home/krake/.local/lib/python3.6/site-packages/rok/__main__.py", line 18, in main
exit_code = resolver(command, **args)
File "/home/krake/.local/lib/python3.6/site-packages/rok/fixtures.py", line 209, in __call__
return func(**kwargs)
File "/home/krake/.local/lib/python3.6/site-packages/rok/kubernetes.py", line 200, in update_application
session.put(f"/kubernetes/namespaces/{namespace}/applications/{name}", json=app)
File "/home/krake/.local/lib/python3.6/site-packages/requests/sessions.py", line 593, in put
return self.request('PUT', url, data=data, **kwargs)
File "/home/krake/.local/lib/python3.6/site-packages/rok/fixtures.py", line 277, in request
resp.raise_for_status()
File "/home/krake/.local/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: http://localhost:8080/kubernetes/namespaces/system/applications/echo-demo
This should be fixed and added to the integration tests.