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

InitialCooldownPeriod should be *int32 not int32 #6423

Closed
zroubalik opened this issue Dec 16, 2024 · 0 comments · Fixed by #6424
Closed

InitialCooldownPeriod should be *int32 not int32 #6423

zroubalik opened this issue Dec 16, 2024 · 0 comments · Fixed by #6424
Labels
bug Something isn't working

Comments

@zroubalik
Copy link
Member

zroubalik commented Dec 16, 2024

Report

InitialCooldownPeriod introduced in #5478 should be pointer, to be aligned with the cooldownPeriod paramter. Also this field is marked as optional thus another point for pointers.

Another problem with #5478 is that zz_generated.deepcopy.go been regerenerated with this PR, so InitialCooldownPeriod is completely missing there:

func (in *ScaledObjectSpec) DeepCopyInto(out *ScaledObjectSpec) {
*out = *in
if in.ScaleTargetRef != nil {
in, out := &in.ScaleTargetRef, &out.ScaleTargetRef
*out = new(ScaleTarget)
**out = **in
}
if in.PollingInterval != nil {
in, out := &in.PollingInterval, &out.PollingInterval
*out = new(int32)
**out = **in
}
if in.CooldownPeriod != nil {
in, out := &in.CooldownPeriod, &out.CooldownPeriod
*out = new(int32)
**out = **in
}
if in.IdleReplicaCount != nil {
in, out := &in.IdleReplicaCount, &out.IdleReplicaCount
*out = new(int32)
**out = **in
}
if in.MinReplicaCount != nil {
in, out := &in.MinReplicaCount, &out.MinReplicaCount
*out = new(int32)
**out = **in
}
if in.MaxReplicaCount != nil {
in, out := &in.MaxReplicaCount, &out.MaxReplicaCount
*out = new(int32)
**out = **in
}
if in.Advanced != nil {
in, out := &in.Advanced, &out.Advanced
*out = new(AdvancedConfig)
(*in).DeepCopyInto(*out)
}
if in.Triggers != nil {
in, out := &in.Triggers, &out.Triggers
*out = make([]ScaleTriggers, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Fallback != nil {
in, out := &in.Fallback, &out.Fallback
*out = new(Fallback)
**out = **in
}
}
hasn't

Expected Behavior

InitialCooldownPeriod should be *int32

Actual Behavior

InitialCooldownPeriodis int32

Steps to Reproduce the Problem

  1. consume API

Logs from KEDA operator

No response

KEDA Version

2.14.0

Kubernetes Version

None

Platform

None

Scaler Details

No response

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready To Ship
Development

Successfully merging a pull request may close this issue.

1 participant