Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow reloading with non POST methods #5343
Comments
This comment has been minimized.
This comment has been minimized.
|
Longer term we plan on switching this to PUT for XSRF reasons, so supporting both now would make sense.
Is that supported by the RFCs? |
This comment has been minimized.
This comment has been minimized.
|
TBH I have no idea what RFCs say about this but it does make sense IMHO. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil can I work on this? |
This comment has been minimized.
This comment has been minimized.
|
Sure |
bharaththiruveedula
referenced this issue
Mar 16, 2019
Merged
Support non POST methods for Lifecycle and Admin APIs #5376
This comment has been minimized.
This comment has been minimized.
Danielv123
commented
Mar 26, 2019
|
With the PR merged, this issue should be considered for closing. |
brian-brazil
closed this
Mar 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
eirc commentedMar 12, 2019
•
edited
The
/-/reloadendpoint only works with thePOSTmethod. It would possibly make more sense to allow other methods too likePUT.prometheus/web/web.go
Line 313 in 7c8f0b0
The reasoning is that
POSTby definition produces different side effects each time it is run (like create new resources underREST) compared toPUTwhich you can supposedly safely fire multiple times.Technically my problem is when trying to reload prometheus with a python program and
urllib3refuses to retryPOSTrequests when there's a read error (specifically) since resending aPOSTwhen the server may have already received is a no no although it's not really a problem in config reloading.https://github.com/urllib3/urllib3/blob/2a0957ea27e966166f81f88693af8e2f87d19fb6/src/urllib3/util/retry.py#L97-L104
PS: I'm also suggesting to just add the
PUTinstead of replacing thePOSTjust for compatibility reasons, I'm sure many would take issue with such an API change.