-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config as parameter to help validate scaler meta data #5819
base: main
Are you sure you want to change the base?
Conversation
@@ -46,7 +46,7 @@ type activeMQMetadata struct { | |||
ActivationTargetQueueSize int64 `keda:"name=activationTargetQueueSize, order=triggerMetadata, optional, default=0"` | |||
} | |||
|
|||
func (a *activeMQMetadata) Validate() error { | |||
func (a *activeMQMetadata) Validate(_ scalersconfig.ScalerConfig) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given there are currently two configs that implement Validate()
and both would ignore this argument, I would like to wait for a little bit before merging the PR.
I understand it will be useful for #5808 but I think it makes sense for now to first see a few more configs refactored and then make a decision. If a good number of configs find it useful, then I'm happy to add it. But if it's just a handful of configs, then perhaps we can consider a different pattern for those that need it without putting restrictions on scaler configs that don't need it, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Let's wait for other scalers or find another way to do it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
I will reopen this as a reminder to continue the discussion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SpiritZhou @wozniakjan what is the status of this, please?
Add config as parameter in the Validator func so that we can move all validator into this func, such as checking some situation under config.AsMetricSource. #5808 (comment)
Checklist
Relates to # #5037