feat(influxdb): add support for InfluxDB v3 in influxdb scaler#7001
feat(influxdb): add support for InfluxDB v3 in influxdb scaler#7001wozniakjan merged 8 commits intokedacore:mainfrom
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. |
37a8139 to
c20e792
Compare
|
Not sure why that test suddenly fails, can't reproduce locally either. 🤔 |
|
/run-e2e influxdb |
57a177e to
e17c427
Compare
|
/run-e2e influxdb |
|
Hey folks, I'm back from being away for a few weeks and just wanted to check if there was any actions required on my end to get this over the line? |
|
this comment is left > https://github.com/kedacore/keda/pull/7001/files#r2355289311 Could you take a look? 🙏 |
0d8795a to
be1c3d9
Compare
Thanks @JorTurFer, that should be sorted now! |
04a733a to
d744160
Compare
|
/run-e2e influxdb |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for InfluxDB v3 to the existing InfluxDB scaler, extending its compatibility beyond v2. The implementation includes validation logic, new client handling for v3, and comprehensive test coverage.
- Introduces InfluxDB v3 client integration using the InfluxCommunity/influxdb3-go package
- Adds metadata validation for v3-specific requirements (database, metricKey, queryType)
- Creates comprehensive e2e tests for v3 functionality with activation and scaling scenarios
Reviewed Changes
Copilot reviewed 6 out of 950 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/scalers/influxdb_scaler.go | Main implementation with v3 client support, validation, and query handling |
| pkg/scalers/influxdb_scaler_test.go | Unit tests covering v3 metadata validation and metric generation |
| tests/scalers/influxdb/influxdb_v3/influxdb_v3_test.go | Complete e2e test suite for v3 functionality |
| tests/scalers/influxdb/influxdb_v2/influxdb_v2_test.go | Package name fix and path correction |
| go.mod | Dependency updates including new influxdb3-go package |
| CHANGELOG.md | Documentation of the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/run-e2e influxdb |
|
Hi @jmickey i see there is still one remaining question from Jan and one merge conflict. |
aafec84 to
73bbc4b
Compare
|
Semgrep found 2 Consider to use well-defined context Semgrep found 1 Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and render data using 'template.Execute()'. |
Signed-off-by: Josh Michielsen <github@mickey.dev>
Signed-off-by: Josh Michielsen <github@mickey.dev>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev>
Signed-off-by: Josh Michielsen <github@mickey.dev>
Signed-off-by: Josh Michielsen <github@mickey.dev>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Josh Michielsen <github@mickey.dev>
73bbc4b to
942d1d9
Compare
Signed-off-by: Josh Michielsen <github@mickey.dev>
942d1d9 to
e9e6bed
Compare
|
@rickbrouwer should be good to go now |
|
/run-e2e influxdb |
…ore#7001) * feat(influxdb): add support for InfluxDB v3 in influxdb scaler Signed-off-by: Josh Michielsen <github@mickey.dev> * chore(deps): move new indirect deps to existing require block Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: add nil check to influxdbv3 client close Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: use enum struct tag param to validate InfluxVersion field Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * refactor(influxdb): add deprecated authToken from triggerMetadata param Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: regenerate scaler schemas Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: reduce calls to strings.ToLower() Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: remove dotenv loading in influxdb e2e tests Signed-off-by: Josh Michielsen <github@mickey.dev> --------- Signed-off-by: Josh Michielsen <github@mickey.dev> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dmitriy Altuhov <altuhovd@gmail.com>
…ore#7001) * feat(influxdb): add support for InfluxDB v3 in influxdb scaler Signed-off-by: Josh Michielsen <github@mickey.dev> * chore(deps): move new indirect deps to existing require block Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: add nil check to influxdbv3 client close Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: use enum struct tag param to validate InfluxVersion field Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * refactor(influxdb): add deprecated authToken from triggerMetadata param Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: regenerate scaler schemas Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: reduce calls to strings.ToLower() Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: remove dotenv loading in influxdb e2e tests Signed-off-by: Josh Michielsen <github@mickey.dev> --------- Signed-off-by: Josh Michielsen <github@mickey.dev> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ore#7001) * feat(influxdb): add support for InfluxDB v3 in influxdb scaler Signed-off-by: Josh Michielsen <github@mickey.dev> * chore(deps): move new indirect deps to existing require block Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: add nil check to influxdbv3 client close Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * fix: use enum struct tag param to validate InfluxVersion field Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Josh Michielsen <github@mickey.dev> * refactor(influxdb): add deprecated authToken from triggerMetadata param Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: regenerate scaler schemas Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: reduce calls to strings.ToLower() Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Josh Michielsen <github@mickey.dev> * chore: remove dotenv loading in influxdb e2e tests Signed-off-by: Josh Michielsen <github@mickey.dev> --------- Signed-off-by: Josh Michielsen <github@mickey.dev> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Provide a description of what has been changed
Checklist
Fixes #6981
Relates to kedacore/keda-docs#1615