Alanxtl commented on code in PR #1084:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1084#discussion_r4533118174
##########
pkg/config/schema/builtin.go:
##########
@@ -33,16 +33,21 @@ var supportedDubboParamTypes = []string{
"java.lang.Float", "java.lang.Double", "java.lang.Boolean",
"java.lang.Byte", "java.lang.Object", "java.util.Date",
}
-// RegisterBuiltinSchemas installs only the Admin-facing route binding. Legacy
-// Resource and Method are compiler outputs rather than form objects.
+// RegisterBuiltinSchemas installs the Admin-facing configuration objects.
func RegisterBuiltinSchemas(registry *Registry) error {
if registry == nil {
return fmt.Errorf("admin object schema registry is nil")
}
if err := registry.Register(adminRouteBindingSchema()); err != nil {
return err
}
- return registry.RegisterValidator(KindAdminRouteBinding,
validateAdminRouteBinding)
+ if err := registry.RegisterValidator(KindAdminRouteBinding,
validateAdminRouteBinding); err != nil {
+ return err
+ }
+ if err := registry.Register(adminClusterSchema()); err != nil {
Review Comment:
注册 AdminCluster 后,路由的 ValidateRouteBinding 和 RouteBindingStore.Normalize
都会接受合法 Cluster。向路由更新接口提交同名 Cluster,可以覆盖原路由草稿,之后预览或发布才报 cannot compile kind
"AdminCluster"。应在路由 Store 写入前和独立 validate 接口显式限制 KindAdminRouteBinding,补充错误
kind 的创建、更新、校验测试。
--
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]