← Back to Pull requests

test(e2e): verify runtime config injection for clientless Mooncake pods #6286

Open
unknown opened this pull request with 236 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 22, 2026 17:02 UTC
Author

Ⅰ. Describe what this PR does

Mooncake 应用通过 SDK 直连 master。现有读写 Job 的 Pod 模板增加了 clientless.fluid.io/inject: "true" 标签和 fluid.io/datasets: mooncake-demo 注解。容器启动时加载 FLUID_RUNTIME_CONFIG_PATH_MOONCAKE_DEMO 指向的 runtime.sh,通过 ${MASTER_NAME}-0.${MASTER_SERVICE_NAME} 定位 master,完成原有的 4 MiB 写入和读回校验。

Worker 也改为直接加载 runtime.json 同目录的 runtime.sh,从中读取服务名和存储配额。测试镜像因此移除了 jq。

Ⅱ. Does this pull request fix one issue?

Fixes #6251

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

  • Pod admission webhook 处理的是 Job 创建的 Pod。读写成功后,用例检查该 Pod 的 rw 容器是否将 ConfigMap fluid-runtime-config-mooncake-demo 只读挂载到 /etc/fluid/config/mooncake-demo,并验证 FLUID_RUNTIME_CONFIG_PATH_MOONCAKE_DEMO 指向挂载目录内的 runtime.sh。

  • 用 kubectl run --dry-run=server 提交引用不存在数据集 mooncake-missing 的 Pod。用例要求 clientless.fluid.io webhook 拒绝请求,且错误信息中包含 "mooncake-missing" not found。
  • Ⅳ. Describe how to verify it

    在已启用 CacheRuntime 并部署 #6197 webhook 的 kind 集群上,从仓库根目录构建镜像并运行 Mooncake 用例。以下命令使用 CI 的集群名 fluid-cluster,运行前请确认 kubectl 当前上下文指向该集群。

    docker build -t fluidcloudnative/mooncake:e2e test/gha-e2e/mooncake/image
    kind load docker-image fluidcloudnative/mooncake:e2e --name fluid-cluster
    bash test/gha-e2e/mooncake/test.sh
    

  • ca72c8ae 搭配 #6197 的 9c8d0e9f 在 kind / Kubernetes v1.33.2 上跑通了完整 Mooncake E2E。4 MiB 数据写入和读回的 MD5 一致,Dataset 报告 cached=4.00MiB、fileNum=1。

  • 74d77d9b 调整了 worker 的配置路径校验。入口脚本用例确认变量未设置或为空时立即退出,路径含空格时能正常加载。基于该提交重建镜像并部署 #6197 的 9c8d0e9f webhook 后,完整 Mooncake E2E 在 kind / Kubernetes v1.33.2 上再次通过。
  • Ⅴ. Special notes for reviews

    此用例依赖 #6197 提供的注入标签和 webhook,请在 #6197 合入后合入本 PR。

    本次 CI 的五个 Kubernetes 版本 都停在缺失数据集的拒绝断言。当前 master 的 Helm chart 尚未注册 clientless.fluid.io webhook,因此 API Server 放行了这次 server-side dry-run。

    Diff: 236 lines (+177 / -59) across 2 files Reviewer: cheyang Review duration: 11874m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.60) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.60 · 236 lines diff across 2 files
    0.60
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.327
    Sensitive Paths sensitive_paths
    0.060
    Real PR Conversation Timeline
    1 comments
    "Review active on #6286"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.2% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 60.4% (MEDIUM) · Higher = larger blast radius
    60.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.2% · Lower = rushed or shallow review
    44.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 33.7% · Safe to merge
    33.7%