mochengqian opened a new issue, #147:
URL: https://github.com/apache/dubbo-go-pixiu-samples/issues/147

   **问题描述**:
   
   在 `https/pixiu` 样例中,`https/pixiu/conf.yaml` 与 `https/pixiu/api_config.yaml` 
没有闭合到同一条可运行链路:
   
   1. `conf.yaml` 的 HTTP route 指向 `cluster: "test-dubbo"`,但同一个文件里实际定义的 cluster 
是 `name: "user"`。
   2. `api_config.yaml` 的 Dubbo integration 又使用 `clusterName: "test_dubbo"`,和 
`conf.yaml` 中的 `test-dubbo` / `user` 都不一致。
   3. `api_config.yaml` 的 resource path 是 
`/api/v1/test-dubbo/:application/:interface`,但 cluster / route / Dubbo registry 
没有形成一套清晰可复制的主线配置。
   4. `https/pixiu` 目录在当前基线中只有 `conf.yaml` 和 `api_config.yaml`,缺少能验证 HTTPS + 
Dubbo + Zookeeper 主链路是否跑通的样例测试或入口说明。
   
   这是样例配置闭合问题。用户复制该样例后,很容易在 HTTPS listener、API config、Dubbo cluster 和 registry 
之间卡住,无法判断失败是证书、SNI、路由、cluster 还是 provider 注册问题。
   
   **预期行为**:
   
   - `conf.yaml` 中 route 引用的 cluster 应和 `clusters` 定义一致。
   - `api_config.yaml` 中的 `clusterName` 应和 Pixiu cluster 配置一致。
   - HTTPS listener、API resource path、Dubbo integration、Zookeeper registry 
应形成一条清晰可验证的主线。
   - 样例应能通过测试或脚本证明 HTTPS 请求最终能到达 Dubbo provider。
   
   **复现步骤**:
   
   ```bash
   cd dubbo-go-pixiu-samples
   
   git show origin/main:https/pixiu/conf.yaml | sed -n '35,74p'
   git show origin/main:https/pixiu/api_config.yaml | sed -n '21,50p'
   git ls-tree -r --name-only origin/main https/pixiu
   ```
   
   **环境信息**:
   
   - dubbo-go-pixiu-samples:`origin/main` / `HEAD` (`75be5cd`)
   - Go:1.25.0
   - 操作系统:macOS
   - 复现方式:静态检查 `https/pixiu` 样例配置
   
   **关键日志**:
   
   ```text
   # https/pixiu/conf.yaml
   route:
     cluster: "test-dubbo"
   
   clusters:
     - name: "user"
       lb_policy: "lb"
       endpoints:
         - socket_address:
             address: 127.0.0.1
             port: 1314
   
   # https/pixiu/api_config.yaml
   path: '/api/v1/test-dubbo/:application/:interface'
   clusterName: "test_dubbo"
   
   # origin/main files
   https/pixiu/api_config.yaml
   https/pixiu/conf.yaml
   ```
   
   **初步分析**:
   
   这不是单个字段命名风格问题,而是 HTTPS 样例的配置链路没有闭合。`conf.yaml` route 使用 `test-dubbo`,cluster 
定义却是 `user`,`api_config.yaml` 又使用 `test_dubbo`,三处名称不一致。样例缺少验证入口后,这类问题只能在用户手动跑 
HTTPS + Dubbo + Zookeeper 主链路时暴露,定位成本很高。


-- 
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]

Reply via email to