Add scaler api for consumption plan support
Description This PR adds scaler apis for supporting SQL extension on Azure Functions Consumption Plan. The TargetScaler and ScaleMonitor would be called from scale controller by including the sql package.
Task List
- [x] Create SqlScalerProvider class
- [x] Add extension method 'AddSqlScaleForTrigger'
- [x] Add e2e test similar to cosmosdb
Reference PRs
@AmeyaRele We've already started the release process for our GA Trigger release - is this something that should be included as a part of that? Or is it ok to follow up with later on?
Also, is there any documentation you could link to with more context about what this feature is as well?
@Charles-Gagnon we can follow up with this later on. It isn't a criteria for GA of trigger afaik.
I don't believe there is public documentation on this, but essentially the scale component is redesigned to use these methods by including the extension as a package and use reflection to call the method in the scale component. This is required in consumption(scale to zero) plan for azure functions as the scale component is not guaranteed to have a worker running which it can query for the scaling decisions.
Hi @AmeyaRele, just curious how much more work is needed in this PR. Is it just the tests, or is there other known work that needs to go in product code-wise?
It's just the tests, the changes are done. Need a review on this PR from scale controller team
There are merge conflicts, please merge main. Please confirm with Alexey on using the hostId and we can have a discussion on getting userFunctionId.
@Charles-Gagnon please review again