Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle direct dependency relationships in is_exclusive_dependency_of #590

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Feb 20, 2024

Description

Handles direct dependency relationships in the is_exclusive_dependency_of CEL policy function.

Addressed Issue

N/A

Additional Details

Because the recursive query only operates on the COMPONENT table, it doesn't "see" occurrences of a component's UUID being referenced in PROJECT.DIRECT_DEPENDENCIES.

Added a separate query to check for this condition. It also acts as a short-circuiting mechanism that can avoid the expensive recursive query from being executed, as the existence of a direct dependency already false-ifies the "is exclusive dependency of another component" condition.

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

Because the recursive query only operates on the `COMPONENT` table, it doesn't "see" occurrences of a component's UUID being referenced in `PROJECT.DIRECT_DEPENDENCIES`.

Added a separate query to check for this condition. It also acts as a short-circuiting mechanism that can avoid the expensive recursive query from being executed, as the existence of a direct dependency already false-ifies the "is exclusive dependency of another component" condition.

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added the defect Something isn't working label Feb 20, 2024
@nscuro nscuro added this to the 5.4.0 milestone Feb 20, 2024
@VithikaS VithikaS merged commit 5a0fe4d into main Feb 20, 2024
6 checks passed
@VithikaS VithikaS deleted the is-excl-dep-of-fix branch February 20, 2024 20:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
defect Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants