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

refactor(scaler): compare error with errors.Is #4004

Merged
merged 8 commits into from
Jan 2, 2023
Merged

refactor(scaler): compare error with errors.Is #4004

merged 8 commits into from
Jan 2, 2023

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Dec 12, 2022

Starting from Go 1.13, errors.Is is the preferable way to compare error equality.

Reference: https://go.dev/blog/go1.13-errors

Checklist

@Juneezee Juneezee requested a review from a team as a code owner December 12, 2022 13:33
@JorTurFer
Copy link
Member

JorTurFer commented Dec 12, 2022

/run-e2e gcp*
Update: You can check the progress here

@JorTurFer
Copy link
Member

Nice improvement! Could you also update the other occurrences https://github.com/search?q=repo%3Akedacore%2Fkeda%20strings.Contains(err.Error()&type=code?

@Juneezee Juneezee marked this pull request as draft December 12, 2022 15:35
@Juneezee
Copy link
Contributor Author

Nice improvement! Could you also update the other occurrences https://github.com/search?q=repo%3Akedacore%2Fkeda%20strings.Contains(err.Error()&type=code?

@JorTurFer Sure! I'll push new commits soon

@Juneezee Juneezee changed the title refactor(gcp_storage_scaler): compare error with errors.Is refactor(scaler): compare error with errors.Is Dec 12, 2022
@Juneezee Juneezee marked this pull request as ready for review December 12, 2022 16:42
@Juneezee
Copy link
Contributor Author

@JorTurFer Please take a look again 😃

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement

@JorTurFer
Copy link
Member

Please @zroubalik , take a look too

Starting from Go 1.13, errors.Is is the preferable way to compare error
equality [1].

[1]: https://go.dev/blog/go1.13-errors

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
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.

LGTM, thanks!

@zroubalik
Copy link
Member

zroubalik commented Jan 2, 2023

/run-e2e
Update: You can check the progress here

@JorTurFer JorTurFer merged commit b60b7d1 into kedacore:main Jan 2, 2023
JorTurFer pushed a commit to JorTurFer/keda that referenced this pull request Jan 9, 2023
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