Add new Elastic Forecast scaler#7496
Conversation
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
/run-e2e elastic_forecast_test |
c2ca814 to
9bd32dc
Compare
Signed-off-by: Rick Brouwer <[email protected]>
9bd32dc to
dfef84a
Compare
|
/run-e2e elastic* |
dttung2905
left a comment
There was a problem hiding this comment.
Thanks for the initiative @rickbrouwer ! 🚀
There was a problem hiding this comment.
Pull request overview
This PR introduces a new elastic-forecast scaler to KEDA, enabling proactive scaling based on Elasticsearch ML forecast results (with accompanying unit/e2e tests and schema/changelog updates).
Changes:
- Add
elastic-forecastscaler implementation (forecast creation/renewal + forecast querying). - Register the scaler in the scaler builder and update generated scaler schemas (YAML/JSON).
- Add unit tests and an e2e test scenario for the new scaler; update changelog entry.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/scalers/elastic_forecast_scaler.go |
Implements the new Elastic Forecast scaler logic (forecast lifecycle + metric retrieval). |
pkg/scalers/elastic_forecast_scaler_test.go |
Adds unit tests for metadata parsing, metric spec naming, and renewal-related logic. |
pkg/scaling/scalers_builder.go |
Registers the new elastic-forecast trigger type in the scaler factory. |
schema/generated/scalers-schema.yaml |
Adds the new scaler parameters to the generated YAML schema. |
schema/generated/scalers-schema.json |
Adds the new scaler parameters to the generated JSON schema. |
tests/scalers/elastic_forecast/elastic_forecast_test.go |
Adds an e2e test that provisions Elasticsearch + ML job/datafeed and validates scale-out behavior. |
CHANGELOG.md |
Adds an Unreleased “New” entry for the Elastic Forecast scaler. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8802361 to
1367dc4
Compare
|
/run-e2e elastic_forecast_test |
|
/run-e2e elastic_forecast_test |
7098bef to
85dac49
Compare
|
/run-e2e elastic_forecast_test |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e elastic_forecast_test |
|
ah, forget to update and merge the main branch :) |
|
Attention! I have switched the scaler to Experimental! See the docs. |
zroubalik
left a comment
There was a problem hiding this comment.
This looks great, I would just change the log level on some messages, but that's just my personal opinion to reduce the number of messages emitted by the operator.
Feel free to disregard if you think it should be done this way, I am okay with that.
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e elastic_forecast_test |
Signed-off-by: Rick Brouwer <[email protected]>
|
/run-e2e elastic_forecast_test passed tests: 1failed tests: 0 |
|
/run-e2e elastic_forecast_test passed tests: 1failed tests: 0 |
Signed-off-by: Rick Brouwer <[email protected]> Signed-off-by: Yurii Shcherbak <[email protected]>
Introduce the new Elastic Forecast (Experimental) scaler, as described in mentioned issue.
Checklist
make generate-scalers-schemahas been run to update any outdated generated filesFixes #7494
Docs: kedacore/keda-docs#1710