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

feature: add ping for kafka #199

Merged
merged 6 commits into from
Aug 20, 2023

Conversation

ArtARTs36
Copy link
Contributor

@ArtARTs36 ArtARTs36 commented Aug 20, 2023

Reason for This PR

At the moment, the pipeline starts even with a non-working connection to kafka. For example, I can specify the wrong broker and get no error. I would like to see an error if the connection to kafka is not working.

Description of Changes

I've added a Ping{timeout} structure to the kafka configuration. I did it with a structure, because in the future it may be necessary to supplement the ping or do it more often.

As a user i will get an error:

service-queue-1  | handle_serve_command: Function call error:
service-queue-1  |        serve error from the plugin *jobs.Plugin stopping execution, error: jobs_plugin_serve: kafka_run: ping kafka was failed: unable to dial: dial tcp 172.20.0.5:9093: connect: connection refused

This behavior will be optional to maintain backwards compatibility.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

@ArtARTs36 ArtARTs36 changed the title draft: Add ping for kafka feature: add ping for kafka Aug 20, 2023
@rustatian rustatian self-requested a review August 20, 2023 11:01
@rustatian rustatian added the enhancement New feature or request label Aug 20, 2023
kafkajobs/driver.go Outdated Show resolved Hide resolved
kafkajobs/opts.go Show resolved Hide resolved
@rustatian
Copy link
Member

Thanks for the PR @ArtARTs36 👍🏻
A few things needs to be done as well:

  1. Docs PR: https://github.com/roadrunner-server/roadrunner-docs
  2. End-To-End tests PR: https://github.com/roadrunner-server/rr-e2e-tests. To test this feature, you can use replace to your local folder.
    Here is the docker-compose: link and example on how to run test: link

@rustatian rustatian marked this pull request as draft August 20, 2023 11:14
@ArtARTs36
Copy link
Contributor Author

Docs here: roadrunner-server/roadrunner-docs#146

@ArtARTs36
Copy link
Contributor Author

@rustatian, e2e tests roadrunner-server/rr-e2e-tests#385, check please

kafkajobs/driver.go Outdated Show resolved Hide resolved
Copy link
Member

@rustatian rustatian left a comment

Choose a reason for hiding this comment

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

Good job 👍🏻 Last few fixes 😃

kafkajobs/driver.go Outdated Show resolved Hide resolved
kafkajobs/driver.go Outdated Show resolved Hide resolved
Copy link
Member

@rustatian rustatian left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@rustatian rustatian marked this pull request as ready for review August 20, 2023 16:59
@rustatian rustatian merged commit c98b571 into roadrunner-server:master Aug 20, 2023
2 of 3 checks passed
@rustatian
Copy link
Member

Thank you @ArtARTs36 👍🏻

@ArtARTs36
Copy link
Contributor Author

@rustatian, thanks for your time and review ❤️

Maybe it's worth creating an issue for ping by interval? I think it will be very helpful.

@rustatian
Copy link
Member

You're very welcome @ArtARTs36 👍🏻

Sure, feature requests are super welcome 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Unreleased
Status: SPRINT-21AUG-18SEP
Development

Successfully merging this pull request may close these issues.

2 participants