← Back to Pull requests

e2e: fix EROFS layer push idempotency on unpublish retry and enhance diagnostic logs #134

Closed
unknown closed this pull request without merging on Oct 02, 2026 21:23 UTC
View on GitHub
unknown unknown commented on Oct 02, 2026 20:07 UTC
Author

Fixes #133

Summary of Changes

1. Diagnostic Dump Fix (tests/e2e/harness.go):
- Enhanced DumpDiagnosticLogs to query pod listings in the target namespace with wide output, capture container logs for each daemonset pod (both agentfs-node-daemon and node-driver-registrar), inspect --previous container logs to reveal crash/restart causes, and describe active/terminating test pods.

2. Idempotent Layer Push & Concurrency Fix (cmd/agentfs-node-daemon/main.go):
- Fixed pushErofsLayersSnapshot to check if the controller already contains the target layer stack before reporting an optimistic concurrency conflict. This prevents unpublish retries from getting stuck in an infinite conflict loop if the server snapshot was updated on a previous try before an unmount error/retry.
- Handled missing local snapshot.pb gracefully on disk without throwing fatal read errors.
- Updated snapshot.pb on disk immediately after snapshot upload to keep local state synchronized with the controller.
- Persisted volume_id to the local volume directory so logical volume mappings survive daemon restarts, and delayed volumeMappings deletion until after unpublish and cleanup succeed.
- Returned errors from pullSnapshot in NodePublishVolume instead of continuing with an unpopulated volume.
- Added MNT_DETACH fallback for targetPath, lowerPath, and layer mounts if standard unmount returns EBUSY.

3. E2E Test Robustness (tests/e2e/e2e_test.go):
- Added terminationGracePeriodSeconds: 1 on layer test pods to prevent 30-second shutdown delays during pod deletion.
- Added waitForSnapshotLayers helper that waits for the snapshot to appear on the controller with the expected layer count.

Diff: 219 lines (+164 / -55) across 2 files Reviewer: justinsb Review duration: 76m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 219 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
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
Diff Size diff_size
0.323
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #134"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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: 36.7% (MEDIUM) · Higher = larger blast radius
36.7%
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: 60.5% · Lower = rushed or shallow review
60.5%
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: 14.5% · Safe to merge
14.5%