[EXPERIMENT] Try CUSTOM_REST_ENABLED to see if it avoids the single-writer CI regression - #947
[EXPERIMENT] Try CUSTOM_REST_ENABLED to see if it avoids the single-writer CI regression#947matthyx wants to merge 1 commit into
Conversation
…loyment Component-tests have been failing widely (18-19/30 matrix jobs) since kubescape/helm-charts bumped storage.image.tag to v0.0.331, which enables kubescape/storage's single-writer write path by default (storage#393). That path serializes every Create/GuaranteedUpdate across all container profiles through one goroutine, collapsing write concurrency from up to 10-way (SqlitePoolSize) to strictly 1-way -- plausible cause of the sustained "context deadline exceeded" / "failed to create container profile, requeuing" errors seen throughout these test runs. This commit flips CUSTOM_REST_ENABLED (storage#387) on the test storage deployment to empirically check whether the new genericrest.Store-based REST path avoids the bottleneck. Code inspection of storage's pkg/apiserver/apiserver.go shows both REST implementations share the same containerProfileStorageImpl instance, so this is not expected to help, but is cheap to verify directly against CI before pursuing a fix that targets the single-writer path itself. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLN3CgGftcnAikV13qD6yJ
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe storage Deployment now sets ChangesStorage deployment configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This updates the test storage deployment to enable the custom REST path. No concrete merge-blocking impact is identified in the supplied change context. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Result: 18 failed / 32 total — statistically identical to the unmodified baseline (18-19/30). Confirms the code-level prediction: CUSTOM_REST_ENABLED only swaps the API-server REST registry layer; both the default and custom REST implementations share the same underlying StorageImpl/single-writer write path, so it doesn't touch the actual bottleneck. Root cause and real fix are tracked in kubescape/storage#397 (shard the single-writer commit path by key hash instead of funneling every write through one global goroutine). |
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup EffectivenessNo data available. |
Purpose
This is a diagnostic experiment, not a proposed fix — do not merge.
component-tests has been failing widely (18-19 of ~30 matrix jobs) since kubescape/helm-charts bumped
storage.image.tagto v0.0.331, which flips kubescape/storage's single-writer write path on by default (storage#393). That path serializes everyCreate/GuaranteedUpdatefor every container profile through one dedicated writer goroutine, collapsing write concurrency from up to 10-way (SqlitePoolSize) to strictly 1-way — a plausible cause of the sustainedcontext deadline exceeded/failed to create container profile, requeuingerrors seen throughout these runs (300+ occurrences, spanning the full ~19-minute test).This PR flips
CUSTOM_REST_ENABLED(storage#387) on in the test storage deployment to empirically check whether the newgenericrest.Store-based REST path sidesteps the bottleneck.Expected result: it won't help. Reading
pkg/apiserver/apiserver.goin kubescape/storage@v0.0.331 shows the default REST (containerprofile.NewREST) and custom REST (containerprofile.NewCustomREST) are wired to the samecontainerProfileStorageImplinstance — both funnel through the identical single-writer path inpkg/registry/file/singlewriter.go.CUSTOM_REST_ENABLEDonly swaps the API-server registry layer, not the underlying storage write path.Opening this PR to let CI confirm or refute that reading before pursuing a fix that targets the single-writer bottleneck directly.
Test plan
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01LLN3CgGftcnAikV13qD6yJ
AI-skills: none | cmds: /oh-my-claudecode:autopilot
Summary by CodeRabbit