-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
eksctl info command #3354
eksctl info command #3354
Conversation
@aclevername 👋🏽 this is a rough first attempt of the |
Thanks @neha-viswanathan ! Looks good, could we do some error handling? For example if we fail to discover the kubectl client we should just present |
0f3144d
to
c1b3ab9
Compare
@aclevername ready for review! |
acb84b8
to
c973b97
Compare
79d08f6
to
dd81808
Compare
6681020
to
d5096e3
Compare
@Callisto13 Hi! I'll need your guidance here - I don't understand why the |
No problem 😃 . So the linter is reporting this error:
Because the You can use the line below in Hope this helps, let me know if you have any more questions or if anything is unclear 👍 |
d5096e3
to
ee316d4
Compare
@Callisto13 for some reason that file did not get committed earlier. 😕 Thanks for pointing it out. 😃 |
Gah! that's annoying 😅 |
pkg/info/info.go
Outdated
} | ||
|
||
// GetVersion returns versions info | ||
func GetVersion() Version { |
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.
Is is possible to have some tests for this file please?
ee316d4
to
6bd5bdc
Compare
Hey @neha-viswanathan! Just checking in on the status of this, do you plan to finish or would you like it taken over? Thanks! |
Hi @Callisto13 I'll try and wrap this up within the next week or so. I will keep you posted in any case. |
Awesome 🎉 |
6bd5bdc
to
8d250c6
Compare
efd238f
to
0e80219
Compare
pkg/info/info.go
Outdated
func String() string { | ||
if data, err := json.Marshal(GetInfo()); err == nil { | ||
return string(data) | ||
} | ||
return "" | ||
} |
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.
let's print something here when the marshal fails, just so users don't get confused about why the command returned nothing:
func String() string { | |
if data, err := json.Marshal(GetInfo()); err == nil { | |
return string(data) | |
} | |
return "" | |
} | |
func String() string { | |
data, err := json.Marshal(GetInfo()) | |
if err != nil { | |
return fmt.Sprintf("failed to marshal info into json: %q", err) | |
} | |
return string(data) | |
} |
928e6fc
to
2a57545
Compare
2a57545
to
68bf92f
Compare
Expect(err).NotTo(HaveOccurred()) | ||
|
||
oses := []string{"aix", "android", "darwin", "dragonfly", "freebsd", "hurd", "illumos", "ios", "js", "linux", "nacl", "netbsd", "openbsd", "plan9", "solaris", "windows", "zos"} | ||
Expect(result.OS).To(BeElementOf(oses)) |
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.
oooh i didn't know BeElementOf
was a thing! nice!
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.
LGTM 🚀 thanks for working on this!
Closes #3029
Description
This MR contains an implementation of the
eksctl info
commandChecklist
README.md
, or theuserdocs
directory)area/nodegroup
) and kind (e.g.kind/improvement
)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯