Skip to content

Conversation

rickbrouwer
Copy link
Member

@rickbrouwer rickbrouwer commented Oct 10, 2025

This PR fixes the 'unmatched input property' notification which in some cases is wrongly given.

There are currently 3 different cases when this can occur:

  1. The matching can't handle some authModes by (*authentication.AuthMeta). Loki and Pulsar uses this. I've changed Loki to the new method. I've done a quick fix for Pulsar. Changing to authentication.Config for Pulsar and making it backwards compatible is a significant refactoring effort.

  2. The matching can't handle properties that can have multiple values. Like in the Datadog scaler which has targetValue and queryvalue, like:

TargetValue   float64       `keda:"name=targetValue;queryValue, order=triggerMetadata, default=-1"`
  1. The matching can't handle scalers that have parameters outside of TypedConfig if the scaler also uses TypedConfig, like the Datadog scaler (useClusterAgentProxy).

And a little bonus;

  • Replaced msgBacklog for msgBacklogThreshold in the Pulsar test because msgBacklog is unmatched.
  • The other change in the CHANGELOG.md is because the order is not correct and the static checks are falling over it

Checklist

Fixes #7174

Relates to #6763

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.

@keda-automation keda-automation requested review from a team October 10, 2025 16:08
@rickbrouwer rickbrouwer force-pushed the issue-7174 branch 3 times, most recently from 6f408fa to 81bc176 Compare October 10, 2025 16:23
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 10, 2025

/run-e2e loki|datadog|pulsar
Update: You can check the progress here

@rickbrouwer rickbrouwer marked this pull request as ready for review October 10, 2025 18:35
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 10, 2025

/run-e2e loki|datadog|pulsar
Update: You can check the progress here

Signed-off-by: Rick Brouwer <[email protected]>
@keda-automation keda-automation requested review from a team October 13, 2025 07:53
Signed-off-by: Rick Brouwer <[email protected]>
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 13, 2025

/run-e2e loki|datadog|pulsar
Update: You can check the progress here

@rickbrouwer
Copy link
Member Author

Thanks for the review, @wozniakjan . Given the mentioned issue and the number of scalers likely affected by the various issues, I'd really like to nominate this PR for a patch release (2.18.1). We have skipped 2.18 due to this issue and are waiting for a patch release.

Signed-off-by: Rick Brouwer <[email protected]>
@rickbrouwer rickbrouwer marked this pull request as draft October 13, 2025 10:05
@rickbrouwer
Copy link
Member Author

Apparently more scalers have been affected. I need to find out what the additional issue is there.

Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 13, 2025

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

@wozniakjan wozniakjan mentioned this pull request Oct 13, 2025
23 tasks
@wozniakjan
Copy link
Member

Given the mentioned issue and the number of scalers likely affected by the various issues, I'd really like to nominate this PR for a patch release (2.18.1). We have skipped 2.18 due to this issue and are waiting for a patch release.

Apparently more scalers have been affected. I need to find out what the additional issue is there.

good idea, I think we can get 2.18.1 out as soon as the regressions are addressed, feel free to add more items to #7179

@zroubalik
Copy link
Member

Thanks for the review, @wozniakjan . Given the mentioned issue and the number of scalers likely affected by the various issues, I'd really like to nominate this PR for a patch release (2.18.1). We have skipped 2.18 due to this issue and are waiting for a patch release.

Agree, thanks for fixing this!

@rickbrouwer rickbrouwer marked this pull request as ready for review October 13, 2025 13:03
@rickbrouwer
Copy link
Member Author

@wozniakjan

Okay, I've checked the latest report regarding the Prometheus scaler in the issue. In that case, the report is "correct." I've marked the PR as "ready for review" again.

@rickbrouwer
Copy link
Member Author

By the way, the message now is:

Unmatched input property authModes in scaler ScaledObject

I personally find that message strange. I would rather expect the type scaler, such as 'prometheus', so that the message is

Unmatched input property authModes in scaler prometheus

I would therefore like to change:

message := fmt.Sprintf("Unmatched input property %s in scaler %s", key+suffix, sc.ScalableObjectType)
to
message := fmt.Sprintf("Unmatched input property %s in scaler %s", key+suffix, sc.TriggerType)

Agree?

@zroubalik
Copy link
Member

By the way, the message now is:

Unmatched input property authModes in scaler ScaledObject

I personally find that message strange. I would rather expect the type scaler, such as 'prometheus', so that the message is

Unmatched input property authModes in scaler prometheus

I would therefore like to change:

message := fmt.Sprintf("Unmatched input property %s in scaler %s", key+suffix, sc.ScalableObjectType) to message := fmt.Sprintf("Unmatched input property %s in scaler %s", key+suffix, sc.TriggerType)

Agree?

yeah, the original one is obviously a mistake

I would like to really thank you for fixing this issue that quickly!

@zroubalik zroubalik requested a review from Copilot October 13, 2025 14:43
Copy link
Contributor

@Copilot 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 fixes incorrect 'unmatched input property' notifications that were being generated in three different scenarios: handling authentication configurations that use *authentication.AuthMeta, properties with multiple values (like Datadog's targetValue/queryValue), and scalers with parameters outside TypedConfig when also using TypedConfig.

Key changes:

  • Modified typed configuration matching to return all parameter names instead of just the primary name
  • Updated Loki scaler to use the new authentication config pattern
  • Added AuthModes field to Pulsar scaler for better authentication handling
  • Refactored Datadog scaler to use unified TypedConfig approach with separate validation functions

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/scalers/scalersconfig/typed_config.go Fixed parameter name matching to return all names instead of just primary name
pkg/scalers/loki_scaler.go Migrated from AuthMeta to authentication.Config pattern
pkg/scalers/pulsar_scaler.go Added AuthModes field to support authentication configuration
pkg/scalers/datadog_scaler.go Refactored to use unified TypedConfig with separate validation functions
tests/scalers/pulsar/helper/helper.go Fixed test to use correct parameter name
pkg/scalers/scalersconfig/typed_config_test.go Updated test to handle unordered message validation
pkg/scalers/loki_scaler_test.go Updated test to use new authentication methods
pkg/scalers/datadog_scaler_test.go Refactored tests to use helper function for metadata creation
CHANGELOG.md Added entry for the fix and reordered existing entries

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zroubalik
Copy link
Member

You can also include the triggerName in the message (in case it is set)

rickbrouwer and others added 2 commits October 13, 2025 17:16
Signed-off-by: Rick Brouwer <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: Rick Brouwer <[email protected]>
@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 13, 2025

/run-e2e loki|datadog|pulsar|prometheus
Update: You can check the progress here

@rickbrouwer
Copy link
Member Author

rickbrouwer commented Oct 13, 2025

You can also include the triggerName in the message (in case it is set)

Yeah, I like that. I have changed it to:

Without triggerName: Unmatched input property metricName in scaler prometheus
With triggerName: Unmatched input property metricName in scaler prometheus (my-prometheus-trigger)

@JorTurFer JorTurFer merged commit e89626a into kedacore:main Oct 13, 2025
24 checks passed
@JorTurFer
Copy link
Member

awesome fix! thanks for the quick reaction 🙇

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.

Unmatched input property authModes in scaler ScaledObject

5 participants