CQL (Cortex Query Language) is at the core of virtually everything Cortex provides, from defining how Scorecards evaluate health and readiness to deciding which entities a plugin should show up on. CQL v2.0 is a new-and-improved major version of CQL with tons of improvements, including better UX and tooling (autocomplete, syntax highlighting, and more). To help you upgrade, you can read our CQL v2.0 guide for the full summary of changes & refer to our migration guide to upgrade.
CQL v2.0 comes with expanded support! Below is the full list of additional functionality that we’ve added to CQL v2.0:
- Strings support .split()
- Team entities now support entity.children() and entity.parents(). With this, you can validate that your team hierarchy is set up as you expect.
- We’ve added support for getting the creation and last updated timestamps using entity.created(asTimestamp = true) and entity.lastUpdated(asTimestamp = true). Without the asTimestamp parameter, the result will return a Duration.
- It’s now easier to check for archived entities! We’ve added support for entity.isArchived() as well as isArchived to the dependency, children, and parent objects so that you can check whether an entity has any archived dependencies, children, or parents. For example, you can check whether an entity has archived dependencies using dependencies.out(includeArchived = true).any((dependency) => dependency.isArchived == true.
- You can now measure information about incidents from Pagerduty, including how many were opened in the last month or how many took over 2 days to resolve.
- We’ve added support for pull requests from GitHub or GitLab to CQL allowing you to check attributes about pull requests in Scorecards.
- We’ve expanded git.branchProtection to support disableOverridingApproversPerMergeRequest, mergeRequestsAuthorApproval, requiredStatusChecks, and more for users with GitLab Ultimate. You can see the full branchProtection object in the CQL explorer.
- We’ve expanded the available metrics from SonarQube to include security_hotspots, security_rating, and more.
- K8s now supports k8s.clusters() allowing you to access all clusters and write expressions against them.
Going forward, we will only be adding new functionality in CQL v2.0.
Comments
0 comments
Article is closed for comments.