-
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 new gitlab-runner-scaler #6087
Conversation
62e89d9
to
1bc0dd1
Compare
Signed-off-by: Fira Curie <fira42073@gmail.com>
… "waiting for resource" status Signed-off-by: Fira Curie <fira42073@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com> Signed-off-by: Fira Curie <fira42073@gmail.com>
* chore: Prepare v2.15.1 Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * fix changelog Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> --------- Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> Signed-off-by: Fira Curie <fira42073@gmail.com>
* chore: Enable Az Pipeline e2e Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * update manifests Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> --------- Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> Signed-off-by: Fira Curie <fira42073@gmail.com>
Signed-off-by: Fira Curie <fira42073@gmail.com>
* chore: Improve azure e2e coverage Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> * add missing vars Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> --------- Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es> Signed-off-by: Fira Curie <fira42073@gmail.com>
…dacore#6072) * Update Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com> * Update ChangeLog Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com> * Update Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com> --------- Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com> Signed-off-by: Fira Curie <fira42073@gmail.com>
* add errorWhenMetricValueEmpty Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fix golangci-lint Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * improve error message for empty results Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * add error when empty metric values to changelog Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * rename errorWhenMetricValuesEmpty -> errorWhenNullValues Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * use getParameterFromConfigV2 to read config for errorWhenNullValues Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * add e2e for error state for cw, and improve e2e for min values for cw Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * remove erroneous print statement Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * remove unused vars Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * rename errorWhenMetricValuesEmpty -> ignoreNullValues Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * move towards shared package for e2e aws Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * minMetricValue optionality based on ignoreNullValues Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fail fast Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * Update tests/scalers/aws/aws_cloudwatch_ignore_null_values_false/aws_cloudwatch_ignore_null_values_false_test.go Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * Apply suggestions from code review Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fail fast Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fix broken new line Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fix broken new lines Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * assert no scaling changes in e2e, and set false for required in minMetricValue Signed-off-by: robpickerill <r.pickerill@gmail.com> * fix ci checks Signed-off-by: robpickerill <r.pickerill@gmail.com> * Update tests/scalers/aws/aws_cloudwatch_min_metric_value/aws_cloudwatch_min_metric_value_test.go fix invalid check Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * fix merge conflicts Signed-off-by: robpickerill <r.pickerill@gmail.com> * fix e2e package names Signed-off-by: robpickerill <r.pickerill@gmail.com> --------- Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> Signed-off-by: robpickerill <r.pickerill@gmail.com> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Fira Curie <fira42073@gmail.com>
* add a static connection name Signed-off-by: robpickerill <r.pickerill@gmail.com> * Update pkg/scalers/rabbitmq_scaler.go Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> * add improvement to changelog Signed-off-by: robpickerill <r.pickerill@gmail.com> * add namepace and so name to conn name Signed-off-by: robpickerill <r.pickerill@gmail.com> * Update comment Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> --------- Signed-off-by: robpickerill <r.pickerill@gmail.com> Signed-off-by: Rob Pickerill <r.pickerill@gmail.com> Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Fira Curie <fira42073@gmail.com>
Signed-off-by: Fira Curie <fira42073@gmail.com>
Signed-off-by: Fira Curie <fira42073@gmail.com>
Signed-off-by: Fira Curie <fira42073@gmail.com>
9c9782b
to
0de7956
Compare
I don't know why, but I'm shown as coauthor of some commits that I haven't been a part of. |
func setConfigValueURL(_ Params, valFromConfig string, field reflect.Value) error { | ||
u, err := url.Parse(valFromConfig) | ||
if err != nil { | ||
return fmt.Errorf("expected url.URL or *url.URL, unable to parse %q: %w", valFromConfig, err) | ||
} | ||
|
||
// If the field type is a pointer to url.URL (`*url.URL`), set the value directly | ||
if field.Kind() == reflect.Ptr && field.Type().Elem() == reflect.TypeOf(url.URL{}) { | ||
field.Set(reflect.ValueOf(u)) | ||
return nil | ||
} | ||
|
||
return nil | ||
} |
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.
can you please add a simple unit test for this? you can take an inspiration in
func TestBasicTypedConfig(t *testing.T) { |
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.
Done
@@ -273,6 +273,22 @@ func setConfigValueURLParams(params Params, valFromConfig string, field reflect. | |||
return nil | |||
} | |||
|
|||
// setConfigValueURL is a function that sets the value of the url.URL field | |||
func setConfigValueURL(_ Params, valFromConfig string, field reflect.Value) 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.
per our discussion in #5616 (comment), you don't have to pass arguments that the function body doesn't need
func setConfigValueURL(_ Params, valFromConfig string, field reflect.Value) error { | |
func setConfigValueURL(valFromConfig string, field reflect.Value) 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.
Thanks! Fixed that
…b scaler; apply code review suggestions Signed-off-by: Fira Curie <fira42073@gmail.com>
… gitlab-runner-scaler
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. |
Provide a description of what has been changed
Checklist
Fixes #5616