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

fix: panic when getting envoy version #687

Closed
wants to merge 1 commit into from
Closed

fix: panic when getting envoy version #687

wants to merge 1 commit into from

Conversation

hexiaodai
Copy link
Contributor

Signed-off-by: hexiaodai jianmin.he@daocloud.io

Signed-off-by: hexiaodai <jianmin.he@daocloud.io>
@hexiaodai hexiaodai requested a review from a team as a code owner November 3, 2022 09:56
@@ -36,7 +36,11 @@ func getVersionsCommand() *cobra.Command {

// versions shows the versions of the Envoy Gateway.
func versions(envOutput bool) error {
envoyVersion := strings.Split(ir.DefaultProxyImage, ":")[1]
parts := strings.Split(ir.DefaultProxyImage, ":")
Copy link
Contributor

Choose a reason for hiding this comment

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

curious when will we get here ? isn't DefaultProxyImage always a sane constant ?

Copy link
Member

Choose a reason for hiding this comment

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

I can understand the PR tries to check the slice lower bounds of the default proxy image. But honestly saying, this does not make more sence, because the default image is always naming with a : to sparate the image tag.

If we support custom proxy image, which is not a const but a string parsing from configs, this kind of checks will make more meaningful. But as for the default image, this is no needed for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. I agree with you completely.

@hexiaodai hexiaodai closed this Nov 5, 2022
@LanceEa LanceEa mentioned this pull request Jul 12, 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