AlexStocks commented on code in PR #1046:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1046#discussion_r4219015244
##########
admin/initialize/router.go:
##########
@@ -79,20 +75,25 @@ func Routers() *gin.Engine {
taR.PUT("/config/api/listener", configInfo.CreateListener)
taR.DELETE("/config/api/listener", configInfo.DeleteListener)
- taR.GET("/config/api/resource/method/list",
configInfo.GetMethodList)
- taR.GET("/config/api/resource/method/detail",
configInfo.GetMethodDetail)
- taR.POST("/config/api/resource/method",
configInfo.CreateMethodInfo)
- taR.PUT("/config/api/resource/method",
configInfo.ModifyMethodInfo)
- taR.DELETE("/config/api/resource/method",
configInfo.DeleteMethodInfo)
+ // AdminRouteBinding API. Each route has
+ // an independent draft/publish boundary; publishing one route
still
+ // updates its generated legacy keys in one etcd transaction.
+ taR.GET(routeBindingAPIPath+"/schema",
configInfo.GetRouteBindingSchema)
+ taR.GET(routeBindingAPIPath+"/list",
configInfo.GetRouteBindingList)
+ taR.GET(routeBindingAPIPath+"/detail",
configInfo.GetRouteBindingDetail)
+ taR.POST(routeBindingAPIPath, configInfo.CreateRouteBinding)
+ taR.PUT(routeBindingAPIPath, configInfo.ModifyRouteBinding)
+ taR.DELETE(routeBindingAPIPath, configInfo.DeleteRouteBinding)
+ taR.POST(routeBindingAPIPath+"/validate",
configInfo.ValidateRouteBinding)
+ taR.POST(routeBindingAPIPath+"/preview",
configInfo.PreviewRouteBinding)
+ taR.PUT(routeBindingAPIPath+"/publish",
configInfo.PublishRouteBinding)
+ taR.GET(routeBindingAPIPath+"/status",
configInfo.GetRouteBindingStatus)
+ taR.GET(routeBindingAPIPath+"/diff",
configInfo.GetRouteBindingDiff)
taR.GET("/config/api/opa/policy", opa.GetOPAPolicy)
taR.PUT("/config/api/opa/policy", opa.PutOPAPolicy)
taR.DELETE("/config/api/opa/policy", opa.DeleteOPAPolicy)
- // Which request method to choose, Temporarily choose put method
- taR.PUT("/config/api/resource/publish",
configInfo.BatchReleaseResource)
- taR.PUT("/config/api/resource/method/publish",
configInfo.BatchReleaseMethod)
- taR.PUT("/config/api/plugin_group/publish",
configInfo.BatchReleasePluginGroup)
Review Comment:
[P1] 删除了与本次改动无关的 plugin_group 发布接口
把 `admin/controller/configInfo/configInfo.go` 的发布函数整体移出时,连带删除了
`BatchReleasePluginGroup`,并同时移除了 `PUT /config/api/plugin_group/publish`
的路由注册(base `admin/initialize/router.go:95`)。
核对结果:head 中该函数已不存在;`logic.BRGetPluginGroupList`、`BRCreate`、`BRUpdate` 与
`PluginGroup` 常量同样被删除;`admin/doc` 重新生成后不再包含 `plugin_group` 路径;`admin/API.md` 的
“IV. PluginGroup and Plugin Related” 整节被移除。
这不是 Resource/Method 模型的替代:plugin_group 属于另一个配置域,且该接口在 base
是已注册并有实际实现的(读未发布空间后写入发布空间),不同于 `BatchReleaseMethod` 这类 `// todo` 空实现。PR 描述与
release-note 只声明了路由启用态变更,`API.md` 的 “Upgrade compatibility” 也只说明
Resource/Method 的破坏性变更,未提及 plugin_group。
影响:仍在调用 `PUT /config/api/plugin_group/publish` 的客户端或运维脚本会静默得到
404(该路径已无注册路由),且没有替代接口。
建议:先确认这是有意清理还是误删。若有意,请在 PR 描述和 release-note 中显式写明该接口被移除;若无意,请恢复
`BatchReleasePluginGroup` 及其路由注册。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]