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

Add ping heartbeat command #3

Closed
wants to merge 3 commits into from
Closed

Add ping heartbeat command #3

wants to merge 3 commits into from

Conversation

QuentinBisson
Copy link
Contributor

@QuentinBisson QuentinBisson requested a review from a team August 31, 2022 09:25
@QuentinBisson QuentinBisson self-assigned this Aug 31, 2022
@QuentinBisson QuentinBisson force-pushed the add-ping-command branch 10 times, most recently from 6c16cc6 to fa7859a Compare September 5, 2022 15:39
@QuentinBisson
Copy link
Contributor Author

@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 {

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?

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.

Copy link
Contributor Author

@QuentinBisson QuentinBisson Sep 6, 2022

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 :)

Copy link
Member

@TheoBrigitte TheoBrigitte left a 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
Copy link
Member

Choose a reason for hiding this comment

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

What about other registries?

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