Skip to content

Conversation

kienan
Copy link

@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.

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.

1 participant