Skip to content

Conversation

lovisaberggren
Copy link
Collaborator

@lovisaberggren lovisaberggren commented Aug 12, 2025

Proposed changes

Updates IPA 117-126 to use the new adoption/violation/exception handler so we can fail for unneeded exceptions.

Also updated the contributing guide with the new helper functions and examples. + some code refactoring.

Jira ticket: CLOUDP-307585

Will follow up with PR to release new IPA validation version.


if (hasException(propertyObject, RULE_NAME)) {
collectException(propertyObject, RULE_NAME, path);
if (!inputIsCloudProviderField(fieldType, input, propertyObject, propertyNameToLookFor, cloudProviderEnumValues)) {
Copy link
Collaborator Author

@lovisaberggren lovisaberggren Aug 12, 2025

Choose a reason for hiding this comment

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

Did some refactoring splitting the old function checkViolationsAndReturnErrors() into two:

  • First check if the field is a cloud provider field inputIsCloudProviderField(), if not just return
  • Do the validation checkViolationsAndReturnErrors() (a bit simpler since we now know the property is considered a cloud provider field)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made the helper functions private since they're only used by the new helper functions now.

@lovisaberggren lovisaberggren marked this pull request as ready for review August 12, 2025 14:49
@lovisaberggren lovisaberggren requested a review from a team as a code owner August 12, 2025 14:49
Copy link
Collaborator

@yelizhenden-mdb yelizhenden-mdb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@lovisaberggren lovisaberggren merged commit 510fad3 into main Aug 12, 2025
17 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-307585 branch August 12, 2025 15:43
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