Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SpiritZhou
Copy link
Contributor

@SpiritZhou SpiritZhou commented May 22, 2024

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

Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@SpiritZhou SpiritZhou requested a review from a team as a code owner May 22, 2024 02:45
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
@@ -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 {
Copy link
Member

@wozniakjan wozniakjan May 23, 2024

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?

Copy link
Contributor Author

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.

@wozniakjan wozniakjan mentioned this pull request May 23, 2024
4 tasks
Copy link

stale bot commented Jul 26, 2024

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jul 26, 2024
Copy link

stale bot commented Aug 3, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this Aug 3, 2024
@wozniakjan
Copy link
Member

I will reopen this as a reminder to continue the discussion
from #6262 (comment), maybe this is desirable after all

@wozniakjan wozniakjan reopened this Oct 24, 2024
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Oct 24, 2024
Copy link
Member

@zroubalik zroubalik left a 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?

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.

3 participants