fix(juicefs): parse mount options after the standalone -o argument #6283
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
cheyang
Ⅰ. Describe what this PR does
JuiceFSEngine.isCommandChangedcompares the mount options of the running fuse/worker command with the freshly generated one, so that an editedJuiceFSRuntime(for example a newcache-size) updates the mount script ConfigMap and the worker StatefulSet template.To get the options it split the command on the bare substring
-oand read the second piece. The generated command isexec /bin/mount.juicefs <source> <mountPath> -o <options>, and<mountPath>contains the dataset name, so a dataset such asdemo-outputsplits the command in the wrong place. Option names such ascache-partial-onlycontain-otoo. 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
-oargument (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_isCommandChangedinpkg/ddc/juicefs/sync_runtime_test.go:test-true-dataset-name-contains-dash-o: datasetdemo-output, onlycache-sizediffers, 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: optioncache-partial-only, onlycache-sizediffers, 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
metricsoption, are untouched. A command that has no-ostill yields an empty option set, as before.