Skip elements with provisional ancestors#59
Conversation
There was a problem hiding this comment.
Code Review
This pull request modifies the violation reporting logic in provisional/compare.go to skip entities that have a provisional ancestor. The review feedback correctly identifies that the current implementation misses checking the entity itself for provisional status and provides a code suggestion to include this check, ensuring that violations are not reported for any provisional feature.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request modifies the comparison logic in provisional/compare.go to skip reporting non-provisional violations when an entity has a provisional ancestor. A review comment identifies that violationType is a bitmask, making the direct equality check unreliable if multiple bits are set. The reviewer suggests using bitwise operations to clear the ViolationTypeNonProvisional bit and only skipping the entity if no other violation types remain.
Description
This change modifies the violation reporting logic in the
provisionalpackage. It adds a check to skip reporting violations for an entity if any of its ancestors are marked as provisional.The goal is to avoid reporting violations for entities that are part of provisional features or clusters, as they may not be subject to full validation rules yet.
Details
provisional/compare.go