← Back to Pull requests

fix(juicefs): parse mount options after the standalone -o argument #6283

Open
unknown opened this pull request with 267 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 20, 2026 12:50 UTC
Author

Ⅰ. Describe what this PR does

JuiceFSEngine.isCommandChanged compares the mount options of the running fuse/worker command with the freshly generated one, so that an edited JuiceFSRuntime (for example a new cache-size) updates the mount script ConfigMap and the worker StatefulSet template.

To get the options it split the command on the bare substring -o and read the second piece. The generated command is exec /bin/mount.juicefs <source> <mountPath> -o <options>, and <mountPath> contains the dataset name, so a dataset such as demo-output splits the command in the wrong place. Option names such as cache-partial-only contain -o too. In those cases the second piece is not the option list, the old and new options look identical and the change is never detected.

This PR cuts the command at the -o argument (with the surrounding spaces) and reads everything after it as the option list. The rest of the comparison is unchanged.

Ⅱ. Does this pull request fix one issue?

Fixes #6282

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

Three cases added to TestJuiceFSEngine_isCommandChanged in pkg/ddc/juicefs/sync_runtime_test.go:

  • test-true-dataset-name-contains-dash-o: dataset demo-output, only cache-size differs, expects "changed".

  • test-false-dataset-name-contains-dash-o: same dataset, same options in a different order, expects "not changed".

  • test-true-option-name-contains-dash-o: option cache-partial-only, only cache-size differs, expects "changed".
  • The two "changed" cases fail on master and pass with this change. The "not changed" case passes on both and guards against over-reporting.

    Ⅳ. Describe how to verify it

    go test -p 2 -gcflags=all=-l ./pkg/ddc/juicefs/ -run TestJuiceFSEngine_isCommandChanged -v

    Ⅴ. Special notes for reviews

    Only the way the option string is located changes; how each option is split into key and value, and the ignoring of the metrics option, are untouched. A command that has no -o still yields an empty option set, as before.

    Diff: 267 lines (+200 / -67) across 3 files Reviewer: cheyang Review duration: 3294m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 267 lines diff across 3 files
    0.39
    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%
    46%
    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.334
    Real PR Conversation Timeline
    1 comments
    "Review active on #6283"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    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: 39.4% (MEDIUM) · Higher = larger blast radius
    39.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 21.0% · Safe to merge
    21.0%