Skip to content

Conversation

@kienan
Copy link
Contributor

@kienan kienan commented Oct 3, 2025

https://cortex1.atlassian.net/browse/CET-21596

Migrate scorecard filters to V2 format

This updates the scorecard filter to use the new API format. The main change is replacing the category field with a more flexible types and groups structure.

Breaking Changes

The filter.category field has been removed. Use filter.types.include instead:

# Before
filter = {
  category = "SERVICE"
  query    = "description != null"
}

# After
filter = {
  types = {
    include = ["service"]
  }
  query = "description != null"
}

What Changed

  • Removed filter.category field
  • Added filter.types with include and exclude lists
  • Added filter.groups with include and exclude lists
  • The kind field is now automatically set to "GENERIC" (not exposed to users)
  • Dropped cqlVersion since it's always 2.0

The new format gives more control over which entities get evaluated by a scorecard. You can now filter by multiple types, exclude specific types, and filter by groups.

Files Changed

  • API models and client code
  • Resource and data source schemas
  • Parser for API responses
  • Tests updated to cover new filter structure
  • Example files and documentation

Version bumped to 0.5.0 due to breaking changes.

Testing

I ran the acceptance tests as well as set up the provider locally and testing with the new filter format.

@kienan kienan force-pushed the kienan/update-to-new-filter-format branch from 22f31de to fe46992 Compare October 29, 2025 23:31
@kienan kienan force-pushed the kienan/update-to-new-filter-format branch from 3a6d497 to 548b65f Compare October 30, 2025 03:37
@kienan kienan requested review from akwirick and gvillenave October 30, 2025 03:39
@gvillenave gvillenave requested a review from maddymanu October 30, 2025 17:50
Copy link
Contributor

@gvillenave gvillenave left a comment

Choose a reason for hiding this comment

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

LGTM

@kienan kienan merged commit 72725e4 into main Oct 30, 2025
3 checks passed
@kienan kienan deleted the kienan/update-to-new-filter-format branch October 30, 2025 22:07
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.

3 participants