Skip to content

feat(influxdb): add support for InfluxDB v3 in influxdb scaler#7001

Merged
wozniakjan merged 8 commits intokedacore:mainfrom
jmickey:feat/add-influxdbv3-support
Sep 30, 2025
Merged

feat(influxdb): add support for InfluxDB v3 in influxdb scaler#7001
wozniakjan merged 8 commits intokedacore:mainfrom
jmickey:feat/add-influxdbv3-support

Conversation

@jmickey
Copy link
Contributor

@jmickey jmickey commented Aug 21, 2025

Provide a description of what has been changed

  • Add support for InfluxDB v3 in InfluxDB scaler.
  • Update tests and e2e tests

Checklist

Fixes #6981

Relates to kedacore/keda-docs#1615

@github-actions
Copy link

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:

  • Add an entry in our changelog in alphabetical order and link related issue
  • Update the documentation, if needed
  • Add unit & e2e tests for your changes
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

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.

@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch from 37a8139 to c20e792 Compare August 21, 2025 01:47
@jmickey
Copy link
Contributor Author

jmickey commented Aug 21, 2025

Not sure why that test suddenly fails, can't reproduce locally either. 🤔

@SpiritZhou
Copy link
Contributor

SpiritZhou commented Aug 22, 2025

/run-e2e influxdb
Update: You can check the progress here

@jmickey jmickey requested a review from a team as a code owner August 22, 2025 16:13
@keda-automation keda-automation requested a review from a team August 22, 2025 16:14
@keda-automation keda-automation requested a review from a team August 22, 2025 21:10
@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch 4 times, most recently from 57a177e to e17c427 Compare August 22, 2025 22:06
@zroubalik
Copy link
Member

zroubalik commented Aug 26, 2025

/run-e2e influxdb
Update: You can check the progress here

@jmickey
Copy link
Contributor Author

jmickey commented Sep 16, 2025

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?

@zroubalik zroubalik mentioned this pull request Sep 18, 2025
22 tasks
@JorTurFer
Copy link
Member

JorTurFer commented Sep 18, 2025

this comment is left > https://github.com/kedacore/keda/pull/7001/files#r2355289311

Could you take a look? 🙏

@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch from 0d8795a to be1c3d9 Compare September 19, 2025 09:15
@jmickey
Copy link
Contributor Author

jmickey commented Sep 19, 2025

this comment is left > https://github.com/kedacore/keda/pull/7001/files#r2355289311

Could you take a look? 🙏

Thanks @JorTurFer, that should be sorted now!

@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch from 04a733a to d744160 Compare September 19, 2025 09:27
@rickbrouwer
Copy link
Member

rickbrouwer commented Sep 19, 2025

/run-e2e influxdb
Update: You can check the progress here

@zroubalik zroubalik requested a review from Copilot September 19, 2025 11:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zroubalik
Copy link
Member

zroubalik commented Sep 19, 2025

/run-e2e influxdb
Update: You can check the progress here

@rickbrouwer
Copy link
Member

Hi @jmickey

i see there is still one remaining question from Jan and one merge conflict.

@keda-automation keda-automation requested review from a team September 30, 2025 12:42
@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch 2 times, most recently from aafec84 to 73bbc4b Compare September 30, 2025 12:57
@semgrep-app
Copy link

semgrep-app bot commented Sep 30, 2025

Semgrep found 2 context-todo findings:

Consider to use well-defined context

Semgrep found 1 no-direct-write-to-responsewriter finding:

  • pkg/scalers/azure_pipelines_scaler_test.go

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()'.

jmickey and others added 7 commits September 30, 2025 14:09
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>
@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch from 73bbc4b to 942d1d9 Compare September 30, 2025 13:11
Signed-off-by: Josh Michielsen <github@mickey.dev>
@jmickey jmickey force-pushed the feat/add-influxdbv3-support branch from 942d1d9 to e9e6bed Compare September 30, 2025 13:13
@jmickey
Copy link
Contributor Author

jmickey commented Sep 30, 2025

@rickbrouwer should be good to go now

@wozniakjan
Copy link
Member

wozniakjan commented Sep 30, 2025

/run-e2e influxdb
Update: You can check the progress here

@wozniakjan wozniakjan enabled auto-merge (squash) September 30, 2025 13:59
@wozniakjan wozniakjan merged commit 3fef646 into kedacore:main Sep 30, 2025
24 checks passed
alt-dima pushed a commit to alt-dima/keda that referenced this pull request Dec 13, 2025
…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>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Dec 22, 2025
…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>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Feb 13, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InfluxDB v3 Scaler

7 participants