feat: add profile-state MissingRuntimeInfoReason values#675
Conversation
Add ProfileStillLearning(5), AwaitingScanUpdate(6) and ProfileTooLarge(7), derived from the workload's own ApplicationProfile state. Used by postgres-connector to report a per-workload missing-runtime-info reason on the vulnerabilities Workloads page instead of a cluster-wide heuristic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Pull request overview
Adds additional MissingRuntimeInfoReason enum values to the shared type library (armotypes) so downstream services/UI can report workload-specific “missing runtime info” states derived from the workload’s own ApplicationProfile status.
Changes:
- Introduced three new
MissingRuntimeInfoReasonvalues:ProfileStillLearning (5),AwaitingScanUpdate (6), andProfileTooLarge (7). - Documented that reasons 5–7 are profile-derived and complement existing cluster/node-agent-derived reasons (0–4).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 29687105706Warning No base build found for commit Coverage: 45.815%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
What
Adds three
MissingRuntimeInfoReasonvalues derived from the state of the workload's own ApplicationProfile:ProfileStillLearning = 5— profile exists but the learning period hasn't finishedAwaitingScanUpdate = 6— profile is complete and ready; relevancy data attaches on the next scanProfileTooLarge = 7— profile exceeded the size limit and can't be used for relevancyWhy
On the vulnerabilities Workloads page, the missing-runtime-info reason is currently computed once per cluster (from node-agent pod statuses) and applied to every flagged workload — any cluster with healthy agents shows "Workload requires a restart" on all of them. postgres-connector now resolves the reason per workload from its ApplicationProfile annotations (mirroring the kubevuln relevancy gate:
kubescape.io/completion == completeandkubescape.io/statusin {ready, completed}), and needs these values to express the profile-derived states.Companion changes: postgres-connector (per-workload resolution, currently with local copies of these constants) and armo-ng-app (tooltip texts for 5-7).