Validate capabilityDefinitions in FindImageInCloudProfile#1775
Validate capabilityDefinitions in FindImageInCloudProfile#1775Roncossek wants to merge 1 commit intogardener:masterfrom
Conversation
…e to ensure they are not empty
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
This change adds an early validation check to ensure capability definitions are not empty before processing machine images in the AWS cloud profile configuration helper function. The modification improves error handling by providing clear feedback when required capability definitions are missing and suggests using a normalization function to set defaults. Walkthrough
Model: claude-sonnet-4-20250514 | Prompt Tokens: 353 | Completion Tokens: 95 |
How to categorize this PR?
/area quality
/kind enhancement
/platform aws
What this PR does / why we need it:
Adds early validation in
FindImageInCloudProfilethatcapabilityDefinitionsis not empty. An empty slice means the caller skippedNormalizeCapabilityDefinitions(), which would cause incorrect or confusing failures downstream.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
The sibling function
FindImageInWorkerStatushandles emptycapabilityDefinitionsvia a legacy fallback.FindImageInCloudProfilehas no such path, so the check makes this requirement explicit.Release note: