Skip to content

Conversation

@stephybun
Copy link
Member

@stephybun stephybun commented Dec 2, 2025

Related Issue

Closes #563

Description

This PR updates the existing querycheck.ExpectKnownValue check to be more consistent with the way a query check functions and is named after the introduction of a lookup mechanism introduced by #573

The following changes were made:

  • The ExpectKnownValue check was updated to accept and use a queryfilter to find the relevant resource for assertions instead of the display name which may not always be unique or known beforehand
  • The type querycheck.KnownValuesCheck was introduced to be able to specify multiple known value checks
  • Check was renamed to querycheck.ExpectResourceKnownValues to better reflect what the check is capable of

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

None.

@stephybun stephybun requested a review from a team as a code owner December 2, 2025 08:36
@austinvalle austinvalle added this to the v1.14.0 milestone Dec 2, 2025
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

The approach makes sense to me, I do have a couple small nits, but also one clarification about the early exiting of the check that didn't seem intentional.

@stephybun stephybun force-pushed the b/expect-known-value-with-query-filter branch from b0aba17 to b2d2040 Compare December 3, 2025 07:49
ansgarm
ansgarm previously approved these changes Dec 3, 2025
Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

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

image

@stephybun stephybun merged commit 4fba753 into main Dec 3, 2025
44 checks passed
@stephybun stephybun deleted the b/expect-known-value-with-query-filter branch December 3, 2025 09:19
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.

Proposal: Simplify KnownValue checks for query results

3 participants