Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route update (HTTP PUT) modifies datastore entity by making it inconsistent #403

Closed
denismakogon opened this issue Dec 7, 2016 · 0 comments

Comments

@denismakogon
Copy link
Contributor

Route update (HTTP PUT) modifies datastore entity by making it inconsistent according to initial route info and requested fields to update.

Steps to reproduce:

  • create route with type async
  • list routes
ubuntu@ubuntu:~$ curl localhost:10501/v1/apps/testapp-68f72660931645198cd892/routes
{"message":"Sucessfully listed routes","routes":[{"app_name":"testapp-68f72660931645198cd892","path":"/hello","image":"iron/hello","memory":128,"type":"async","max_concurrency":1,"timeout":30,"config":{}}]}
  • update route
ubuntu@ubuntu:~$ curl -X PUT localhost:10501/v1/apps/testapp-68f72660931645198cd892/routes/hello -d '{"route":{"type":"sync"}}'
{"message":"Route successfully updated","route":{"app_name":"testapp-68f72660931645198cd892","path":"/hello","type":"sync","config":null}}
  • list routes
ubuntu@ubuntu:~$ curl localhost:10501/v1/apps/testapp-68f72660931645198cd892/routes
{"message":"Sucessfully listed routes","routes":[{"app_name":"testapp-68f72660931645198cd892","path":"/hello","image":"iron/hello","type":"sync","timeout":30,"config":{}}]}
  • get route info
ubuntu@ubuntu:~$ curl localhost:10501/v1/apps/testapp-68f72660931645198cd892/routes/hello
{"message":"Successfully loaded route","route":{"app_name":"testapp-68f72660931645198cd892","path":"/hello","image":"iron/hello","type":"sync","timeout":30,"config":{}}}

So there are two problems:

  • route update response doesn't match to what swagger doc describes along with showing inconsistent info (in particular case - config attributes are not equal (null vs {})
  • route update (HTTP PUT) makes route datastore entity inconsistent (max_concurrency is missing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants