Skip to content

throwaway: falsify collapse-settings self-stall CI impact — do not merge - #964

Closed
matthyx wants to merge 1 commit into
mainfrom
throwaway/falsify-collapse-stall
Closed

throwaway: falsify collapse-settings self-stall CI impact — do not merge#964
matthyx wants to merge 1 commit into
mainfrom
throwaway/falsify-collapse-stall

Conversation

@matthyx

@matthyx matthyx commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Manual validation PR — NOT for merge, will be closed after data collection.

kubescape/storage has a confirmed root cause (see storage repo's .omc/plans/collapse-settings-self-stall.md): whenever no CollapseConfiguration/default CR is present, a consolidation-path settings-cache refresh (NewCRDCollapseSettingsProvider / CollapseSettings) can self-stall a goroutine on its own held SQLite write lock for up to the full busy timeout (60s in production). During that window every other writer (every node-agent TS Create, every other consolidation worker) blocks behind it. This fires on essentially every consolidation tick that has data, whenever no CR exists — deterministic, not a race. Test_34_NetworkNeighborsCIDRCollapse is the only existing test that applies this CR today, and only for its own duration.

This PR is the "cheapest falsification experiment" the root-cause doc calls for: adds tests/chart/artifacts/collapseconfiguration-default.yaml (the compiled-in defaults, copied verbatim from storage's artifacts/collapseconfiguration-default-sample.yaml) and a workflow step that applies it right after the chart install, for every test in the matrix — not just Test_34. No storage-image override; uses whatever image storage-tag.sh resolves by default, so this isolates the effect of the CR's presence alone.

Comparison point: recent same-day baselines (no CR, storage main pre-Lane-0) measured 15/16/19 failed out of 31 jobs across 3 runs (mean 16.7) — see #957/#960/#961 and the summary comment on kubescape/storage#399.

If this run (or a couple of reruns) shows a sharp drop in failure count, that's strong evidence this self-stall explains a meaningful chunk of this suite's historical flakiness — independent of, and orthogonal to, the Lane 0 write-path work. If not, its CI-level contribution is small.

Session: https://claude.ai/code/session_01LCMGT6Po2tSr1VEDVrbbYd

🤖 Generated with Claude Code

AI-skills: ralplan,plan | cmds: /compact,/usage-credits

Summary by CodeRabbit

  • Tests
    • Added automated test setup that applies a default collapse configuration during component tests.
    • Added configuration coverage for collapse thresholds, path prefixes, network IP groups, and CIDR settings.
    • The workflow retries configuration application and verifies the applied resource.

kubescape/storage has a confirmed root cause (see storage repo's
.omc/plans/collapse-settings-self-stall.md): with no
CollapseConfiguration/default CR present, storage's collapse-settings
cache refresh can self-stall a consolidation goroutine on its own held
SQLite write lock for up to the full busy timeout (60s in production),
blocking every other writer for that window. Test_34 is the only
existing test that applies this CR today, and only for its own
duration.

Adds tests/chart/artifacts/collapseconfiguration-default.yaml (the
compiled-in defaults, copied from storage's
artifacts/collapseconfiguration-default-sample.yaml) and a workflow
step that applies it right after the chart install, for every test in
the matrix. No storage image override — uses whatever image the
workflow's storage-tag.sh resolves by default, so this isolates the
effect of the CR's presence alone.

Throwaway PR, not for merge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LCMGT6Po2tSr1VEDVrbbYd
@matthyx matthyx added the ai-assisted Created through Armosec AI tooling (armosec-shared-rules plugin) label Sep 8, 2026
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 793fca25-01bf-444f-bc74-476ac28804c0

📥 Commits

Reviewing files that changed from the base of the PR and between 349c642 and 297a7f8.

📒 Files selected for processing (2)
  • .github/workflows/component-tests.yaml
  • tests/chart/artifacts/collapseconfiguration-default.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The component-tests workflow now applies a default CollapseConfiguration custom resource after the node-agent pod is ready. The new artifact defines collapse and network thresholds for the test environment.

Changes

CollapseConfiguration CI setup

Layer / File(s) Summary
Configure and apply CollapseConfiguration
tests/chart/artifacts/collapseconfiguration-default.yaml, .github/workflows/component-tests.yaml
Defines the default CollapseConfiguration resource with collapse and network thresholds. The workflow retries kubectl apply and then prints the applied resource.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 297a7

Component-test runs now apply a default CollapseConfiguration after the node-agent is ready, using a resource contract already exercised by component tests. No actionable merge-blocking risk is established by the supplied change context.

Suggested reviewers: entlein

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the throwaway experiment and its purpose: testing the CI impact of a collapse-settings self-stall. It also correctly states that the change must not be merged.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch throwaway/falsify-collapse-stall

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Performance Benchmark Results

Node-Agent Resource Usage
Metric BEFORE AFTER Delta
Avg CPU (cores) 0.216 0.204 -5.4%
Peak CPU (cores) 0.229 0.216 -5.6%
Peak CPU p95 (cores) 0.228 0.214 -6.0%
Avg Memory (MiB) 371.967 320.629 -13.8%
Peak Memory (MiB) 374.949 331.758 -11.5%
Dedup Effectiveness

No data available.

@matthyx matthyx moved this to WIP in KS PRs tracking Sep 9, 2026
@matthyx matthyx closed this Sep 11, 2026
@matthyx matthyx moved this from WIP to To Archive in KS PRs tracking Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Created through Armosec AI tooling (armosec-shared-rules plugin)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant