-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add ping heartbeat command #3
Conversation
6c16cc6
to
fa7859a
Compare
fa7859a
to
5a49061
Compare
@giantswarm/team-atlas could I get a review ? |
cmd/ping.go
Outdated
c := ctl.NewCtl(repo) | ||
|
||
pings, err := c.Ping(opts.selectorOptions.ToConfig()) | ||
for hbn, ping := range pings { |
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.
Why you don't handle the error?
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.
Actually, I think it's better to move this logic to the underlying function c.Ping()
so that, we only have one single loop.
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.
The err was handled after the loop, it's fixed now
I disagree with the loop management as logging to the console is a side effect of the function and I'm not sure we are really striving for that much optimization in that sample CLI :)
f518c8f
to
a98e2b3
Compare
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.
Overall looks good.
But I would appreciate when this PR is split into mutliple PRs:
- update the circleci config
- ping command boilerplate
- ping command implementation/logic
- refactoring/renaming
Also showing an example run would be nice.
|
||
- architect/push-to-docker: | ||
name: push-to-docker | ||
image: quay.io/giantswarm/heartbeatctl |
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.
What about other registries?
Towards https://github.com/giantswarm/giantswarm/issues/23238