feat: addition info into component list endpoint in luminork #8017
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enhance Components Endpoint with Optional Qualification Status and Upgrade Information
How does this PR change the system?
This PR enhances the existing Luminork API
/componentsendpoint with optional inclusion parameters, allowing clients to request additional component information without breaking backward compatibility. The enhancement provides real-time qualification status and upgrade-ability data on-demand.Enhanced endpoint:
GET /v1/w/{workspace_id}/change-sets/{change_set_id}/componentsNew optional query parameters:
includeQualifications=true- Include real-time qualification status with running state trackingincludeUpgradeStatus=true- Include upgrade-ability informationKey features:
runningcount based on FuncRun statesincludeCodegenparameterScreenshots:
Basic response (unchanged, matches production):
{ "componentDetails": [ { "componentId": "01KCHHG49B8F0JXVJY3PQWS5S1", "name": "555s", "schemaName": "Workspace Management", "codegen": null } ], "nextCursor": null }Enhanced response with inclusions:
{ "componentDetails": [ { "componentId": "01KCHHG49B8F0JXVJY3PQWS5S1", "name": "555s", "schemaName": "Workspace Management", "codegen": null, "qualificationStatus": { "total": 2, "succeeded": 2, "warned": 0, "failed": 0, "running": 0 }, "canBeUpgraded": false } ], "nextCursor": null }Out of Scope:
How was it tested?
Tests I actually ran and verified:
componentDetails,nextCursor,componentId,schemaName)includeQualifications=trueaddsqualificationStatusfield with real data (total: 2, succeeded: 2, failed: 0, running: 0)includeUpgradeStatus=trueaddscanBeUpgradedfield with accurate valueslimit=1returns 1 component with correct cursorincludeQualifications,includeUpgradeStatus)Test results:
api.systeminit.comexactlyDoes it require a docs change?
Documentation included:
Technical approach:
#[serde(skip_serializing_if = "Option::is_none")]to omit when not requestedCreated/Dispatched/Running/PostProcessing) to determine actively executing qualificationsincludeCodegenUsage Examples