Output function signature license requirements to Kibana definitions (#127717)

Output function signature license requirements to Kibana definition files, and also test that this matches the actual licensing behaviour of the functions.

ES|QL functions that enforce license checks do so with the `LicenseAware` interface. This does not expose what that functions license level is, but only whether the current active license will be sufficient for that function and its current signature (data types passed in as fields). Rather than add to this interface, we've made the license level information test-only information. This means if a function implements LicenseAware, it also needs to add a method to its test class to specify the license level for the signature being called. All functions will be tested for compliance, so failing to add this will result in test failure. Also if the test license level does not match the enforced license, that will also cause a failure.
This commit is contained in:
Craig Taverner 2025-05-07 10:02:17 +02:00 committed by GitHub
parent 8bda02dafa
commit 543aeb8c19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 227 additions and 29 deletions

View file

@ -2,6 +2,7 @@
"comment" : "This is generated by ESQLs AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
"type" : "grouping",
"name" : "categorize",
"license" : "PLATINUM",
"description" : "Groups text messages into categories of similarly formatted text values.",
"signatures" : [
{
@ -13,6 +14,7 @@
"description" : "Expression to categorize"
}
],
"license" : "PLATINUM",
"variadic" : false,
"returnType" : "keyword"
},
@ -25,6 +27,7 @@
"description" : "Expression to categorize"
}
],
"license" : "PLATINUM",
"variadic" : false,
"returnType" : "keyword"
}

View file

@ -25,6 +25,7 @@
"description" : ""
}
],
"license" : "PLATINUM",
"variadic" : false,
"returnType" : "cartesian_shape"
},
@ -49,6 +50,7 @@
"description" : ""
}
],
"license" : "PLATINUM",
"variadic" : false,
"returnType" : "geo_shape"
}