Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread junxu chen
Sorry for the mistake. Self register and not affect other nodes should be: curl -XPATCH http://172.17.0.1:9080/apisix/admin/upstreams/1 -d ‘{nodes: {" 172.17.0.6:8080": 10}}’ Self unregister and not affect other nodes should be: curl -XPA

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread junxu chen
hi, Ming If we support both styles, it should be: curl -XPATCH http://172.17.0.1:9080/apisix/admin/upstreams/1/methods -d ‘["GET"]’ Self register and not affect other nodes: curl -XPATCH http://172.17.0.1:9080/apisix/admin/upstreams/1/nodes -d ‘{" 172.17.0.6:8080": 10}’ Self unregister and n

[RESULT][VOTE] Release Apache APISIX (incubating) 1.4.1

2020-07-13 Thread junxu chen
Hello community, Release vote for Apache APISIX (Incubating) 1.4.1 has PASSED and closed now. The result as follows: 1 Mentor +1 vote: - Justin Mclean 4 PPMC +1 votes: - Ming Wen - Lang Wang - YuanSheng Wang - agile6v Vote thread: https://lists.apache.org/thread.html/r440a2a13f12f9497b5a576b

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread Ming Wen
hi,junxu, please show the example how to resolve: "methods": ["GET", null, null, null, null, null, null, null, null] IMO, multiple implementations will confuse users. Thanks, Ming Wen, Apache APISIX(incubating) & Apache SkyWalking Twitter: _WenMing junxu chen 于2020年7月14日周二 上午9:28写道: > I think

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread junxu chen
I think We could support both styles. Want to update a certain attribute in full, use the old style. Want to partially update, use the current style. On Tue, Jul 14, 2020 at 9:15 AM Ming Wen wrote: > > For example, if user want to update the `method` of > `/apisix/admin/routes/1`, > user need to

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread Ming Wen
> For example, if user want to update the `method` of `/apisix/admin/routes/1`, user need to PATCH with data: `"methods": ["GET", null, null, null, null, null, null, null, null]`. For me, I don't know why I need a lot of `null` after "GET". I suggest we focus on solving these kinds of problems fir

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread YuanSheng Wang
old style: curl -XPATCH http://127.0.0.1:9080/apisix/admin/upstreams/1/nodes -d ‘{" 127.0.0.1:8083":3}’ current style: curl -XPATCH http://127.0.0.1:9080/apisix/admin/upstreams/1 -d ‘{nodes: {" 127.0.0.1:8083":3}}’ They are the same and all idempotent. On Tue, Jul 14, 2020 at 7:27 AM Ming Wen

Re: Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread Ming Wen
hi, jinwei, we need to roll back the current PATCH implementation if you want this style of admin api. jinwei 于 2020年7月14日周二 上午12:25写道: > I used to use this API a lot > > > > > curl -XPATCH http://127.0.0.1:9080/apisix/admin/upstreams/1/nodes -d ‘{" > 127.0.0.1:8083":3}’ > > > > > I like this A

Re:Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread jinwei
I used to use this API a lot curl -XPATCH http://127.0.0.1:9080/apisix/admin/upstreams/1/nodes -d ‘{"127.0.0.1:8083":3}’ I like this API very much, because it is idempotent. We can clearly know that the result of nodes is the element I specify and will not be affected by history; Thi

Re: [DISCUSS] roll back the current PATCH implementation for admin api

2020-07-13 Thread YuanSheng Wang
{ desc: , id: , nodes: ["xx", "yy", "zz"] } I have one question, if we want to update the `desc` and `nodes`, how to do with this case? The old API style does not support this way. Should we support this case? Otherwise, we will never support updating part of the data like thi