Skip to content

Conversation

@mtodor
Copy link
Collaborator

@mtodor mtodor commented Dec 12, 2025

Description

This PR is changing from offset/limit paging to cursor based paging (only for get deployments for CVE) - change for list clusters will be made in a separate PR.

Cursor keeps only offset and limit is defined with constant. This cursor solution allows us to expose limit in the future if it is required.

Validation

  • Added unit tests
  • Tested with LLM (claude - Sonnet 4.5)
Prompt: Is this CVE affecting me CVE-AAA-BBB?
Response:
Yes, CVE-AAA-BBB is affecting your environment. I found 100+ affected deployments across your two clusters: ..

Prompt: How many deployments and clusters are exactly affected?
Response (after using paging): 
Impact Summary:
  - Total Deployments Affected: 214
  - Total Clusters Affected: 2
  
Prompt: How many platform deployments are affected?
Response (after using paging and filtering properly):
  Total Platform Deployments: 206 out of 214

  This means:
  - 206 platform deployments are affected (infrastructure components)
  - 8 user workload deployments are affected

@mtodor mtodor requested a review from janisz as a code owner December 12, 2025 10:28
@mtodor mtodor requested review from janisz and removed request for janisz December 12, 2025 10:28
@codecov-commenter
Copy link

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
225 2 223 0
View the full list of 2 ❄️ flaky test(s)
github.com/stackrox/stackrox-mcp/internal/testutil::

Flake rate in main: 100.00% (Passed 0 times, Failed 2 times)

Stack Traces | 0s run time
Build error
github.com/stackrox/stackrox-mcp/internal/toolsets/mock::

Flake rate in main: 100.00% (Passed 0 times, Failed 2 times)

Stack Traces | 0s run time
Build error

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Contributor

@janisz janisz left a comment

Choose a reason for hiding this comment

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

Maybe add a link to pagination in MCP as for the first look it looks weird that we use base64 to encode int :)

Base automatically changed from mtodor/ROX-31479-add-get-cve-related-deployments to main December 12, 2025 15:14
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.

3 participants