Skip to content

feat: add profile-state MissingRuntimeInfoReason values#675

Open
rotemamsa wants to merge 1 commit into
mainfrom
feat/per-workload-missing-runtime-reasons
Open

feat: add profile-state MissingRuntimeInfoReason values#675
rotemamsa wants to merge 1 commit into
mainfrom
feat/per-workload-missing-runtime-reasons

Conversation

@rotemamsa

Copy link
Copy Markdown

What

Adds three MissingRuntimeInfoReason values derived from the state of the workload's own ApplicationProfile:

  • ProfileStillLearning = 5 — profile exists but the learning period hasn't finished
  • AwaitingScanUpdate = 6 — profile is complete and ready; relevancy data attaches on the next scan
  • ProfileTooLarge = 7 — profile exceeded the size limit and can't be used for relevancy

Why

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 == complete and kubescape.io/status in {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).

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>
Copilot AI review requested due to automatic review settings July 19, 2026 12:30
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91113ff8-5adf-41a4-90d8-d0d6e2f3c7ea

📥 Commits

Reviewing files that changed from the base of the PR and between 1054740 and be7b3c1.

📒 Files selected for processing (1)
  • armotypes/networkpolicies.go

📝 Walkthrough

Walkthrough

The MissingRuntimeInfoReason enum now includes three public workload-derived reasons: ProfileStillLearning with value 5, AwaitingScanUpdate with value 6, and ProfileTooLarge with value 7. Comments identify these reasons as originating from the workload’s ApplicationProfile state and complementing existing cluster-level reasons.

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

Suggested reviewers: copilot

Poem

A rabbit hops through enum rows,
Three fresh reasons bloom and glow.
Learning, scanning, profiles wide,
New little clues now stand beside.
“Hop hooray!” the bunny sings,
For tidy runtime-info things.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding profile-state MissingRuntimeInfoReason values.
Description check ✅ Passed The description is directly related to the added enum values and explains their purpose and usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/per-workload-missing-runtime-reasons

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MissingRuntimeInfoReason values: ProfileStillLearning (5), AwaitingScanUpdate (6), and ProfileTooLarge (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.

@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 29687105706

Warning

No base build found for commit 1054740 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 45.815%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 4874
Covered Lines: 2233
Line Coverage: 45.81%
Coverage Strength: 5.77 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants