azure-functions-sql-extension icon indicating copy to clipboard operation
azure-functions-sql-extension copied to clipboard

Add scaler api for consumption plan support

Open AmeyaRele opened this issue 2 years ago • 5 comments

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 avatar Nov 03 '23 11:11 AmeyaRele

@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 avatar Nov 03 '23 16:11 Charles-Gagnon

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

AmeyaRele avatar Nov 06 '23 09:11 AmeyaRele

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?

chlafreniere avatar Nov 26 '23 22:11 chlafreniere

It's just the tests, the changes are done. Need a review on this PR from scale controller team

AmeyaRele avatar Dec 04 '23 06:12 AmeyaRele

There are merge conflicts, please merge main. Please confirm with Alexey on using the hostId and we can have a discussion on getting userFunctionId.

MaddyDev avatar Feb 15 '24 05:02 MaddyDev

@Charles-Gagnon please review again

AmeyaRele avatar Jul 02 '24 07:07 AmeyaRele