This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipo02mix
approved these changes
Oct 8, 2020
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.
nice work
marians
reviewed
Oct 13, 2020
Comment on lines
+117
to
+134
clientWrapper, err := client.NewWithConfig(arguments.apiEndpoint, arguments.userProvidedToken) | ||
if err != nil { | ||
handleError(microerror.Mask(err)) | ||
os.Exit(1) | ||
} | ||
|
||
releases, err := listReleases(clientWrapper, arguments) | ||
if err != nil { | ||
client.HandleErrors(err) | ||
errors.HandleCommonErrors(err) | ||
handleError(microerror.Mask(err)) | ||
os.Exit(1) | ||
} | ||
|
||
if clientErr, ok := err.(*clienterror.APIError); ok { | ||
fmt.Println(color.RedString(clientErr.ErrorMessage)) | ||
if clientErr.ErrorDetails != "" { | ||
fmt.Println(clientErr.ErrorDetails) | ||
} | ||
} else { | ||
fmt.Println(color.RedString("Error: %s", err.Error())) | ||
} | ||
releaseInfoConfig := releaseinfo.Config{ | ||
ClientWrapper: clientWrapper, | ||
} | ||
releaseInfo, err := releaseinfo.New(releaseInfoConfig) | ||
if err != nil { | ||
handleError(microerror.Mask(err)) |
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.
Should all this happen inside the printResult function?
marians
approved these changes
Oct 13, 2020
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.
I'm not in the way here. Thanks!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards https://github.com/giantswarm/giantswarm/issues/13439
This PR adds support for displaying if the Kubernetes version is EOL or will be EOL soon in various commands. This data comes from the GS API
/v4/info/
response.The common functionality is handled in all commands by a helper structure called
ReleaseInfo
. This fetches all the releases from the GS API and is able to compute the different K8s version properties for each given release version.Preview
list releases command
show release (EOL k8s release)
show release (soon to be EOL k8s release)
show cluster (EOL k8s release)
show cluster (soon to be EOL k8s release)