Closed burke closed 10 years ago
Thanks for the report.
1) Marathon currently supports only PUT requests, which must accept the full representation of the resource (see PATCH vs. PUT). It would be useful to support PATCH as well though.
2) That's a problem I haven't seen yet. I will try to reproduce it.
3) I submitted pull request #202 to fix this. The App model will only submit a whitelist of attributes when saving, which excludes the immutable "tasksRateLimit", "tasksRunning", etc. and the "version".
@burke I can't reproduce the container
value being clobbered via the UI. Can you provide an example to reproduce it?
The container
value is only clobbered if I treat PUT
as a PATCH
and omit it from the input. Don't worry too much about that; it's just that it mostly works as a PATCH
:)
When I said "even though we have container
set" above, I actually meant we have it set in marathon, not in the query.
Aha, thanks for the clarification. PATCH would be a nice addition it sounds like, but for right now you'll have to request the state of the app before sending a PUT if you want to change any attributes.
If you verify the pull request fixes this issue for you, I'll close this and open an improvement issue for adding PATCH support.
Much better, thanks!
If I use the suspend or scale buttons in the UI, the changes don't stick. This is the request payload:
Of note:
1) It's sending all the attributes, when it really should just be sending
instances
.2) It's attempting to clobber
container
withnull
, even though we havecontainer
set.3) It's sending
version
, which is defined to make marathon ignore all the other params, includinginstances
.When I interact with the API directly, it does stick:
This started happening at the same time as #194, I think. It's still broken on master.