Skip to content

Validate capabilityDefinitions in FindImageInCloudProfile#1775

Open
Roncossek wants to merge 1 commit intogardener:masterfrom
Roncossek:checkCapabilitiesDefinition
Open

Validate capabilityDefinitions in FindImageInCloudProfile#1775
Roncossek wants to merge 1 commit intogardener:masterfrom
Roncossek:checkCapabilitiesDefinition

Conversation

@Roncossek
Copy link
Copy Markdown
Contributor

How to categorize this PR?

/area quality
/kind enhancement
/platform aws

What this PR does / why we need it:

Adds early validation in FindImageInCloudProfile that capabilityDefinitions is not empty. An empty slice means the caller skipped NormalizeCapabilityDefinitions(), which would cause incorrect or confusing failures downstream.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

The sibling function FindImageInWorkerStatus handles empty capabilityDefinitions via a legacy fallback. FindImageInCloudProfile has no such path, so the check makes this requirement explicit.

Release note:

Validate that `capabilityDefinitions` is not empty in `FindImageInCloudProfile` to fail fast when normalization was skipped.

@Roncossek Roncossek requested a review from a team as a code owner April 20, 2026 06:03
@gardener-prow gardener-prow Bot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension labels Apr 20, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented Apr 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hebelsan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

  • Bug Fix: Added validation to prevent processing when capability definitions are empty, providing clearer error messages and guidance for proper function usage to ensure system stability.

Model: claude-sonnet-4-20250514 | Prompt Tokens: 353 | Completion Tokens: 95

@federated-github-access federated-github-access Bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 20, 2026
@gardener-prow gardener-prow Bot added the cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. label Apr 20, 2026
@federated-github-access federated-github-access Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Apr 20, 2026
@Roncossek
Copy link
Copy Markdown
Contributor Author

cc @AndreasBurger

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

Labels

area/quality Output qualification (tests, checks, scans, automation in general, etc.) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant