kedacore / keda-olm-operator

Operator for deploying KEDA Controller on OperatorHub.io/OLM
Apache License 2.0
30 stars 23 forks source link

Handle non-numeric suffix when detecting OpenShift minor version #230

Closed joelsmith closed 1 month ago

joelsmith commented 1 month ago
jkyros commented 1 month ago

https://github.com/kedacore/keda-olm-operator/blob/4d893f03d628947c9de451a739285bb3c48e7812/controllers/keda/util/util.go#L103 is a mouthful but I think that's a simple as we can make it :smile:

That ginkgo flag error in the Validation test is a little weird, we didn't touch it.

/lgtm

joelsmith commented 1 month ago

https://github.com/kedacore/keda-olm-operator/blob/4d893f03d628947c9de451a739285bb3c48e7812/controllers/keda/util/util.go#L103

is a mouthful but I think that's a simple as we can make it 😄

Surely there must be a more idiomatic way to get a rune-wise substring, right? That's the best I could come up with, and now I'm googling it and finding other people saying to do it the same way. One more knock against Go, I guess. https://stackoverflow.com/questions/28718682/how-to-get-a-substring-from-a-string-of-runes-in-golang