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

change health check for kafka service #2371

Merged
merged 3 commits into from
Aug 31, 2023
Merged

change health check for kafka service #2371

merged 3 commits into from
Aug 31, 2023

Conversation

johnatannvmd
Copy link
Contributor

@johnatannvmd johnatannvmd commented Aug 29, 2023

Checking kafka topics is a more proper way to check that kafka server is up and running, rather than just checking opened port. You should treat this as pg_isready command.

Before this patch, step with bootstrap-snuba, fails on topics creation with error:

Failed to create topic events (and many others)
Traceback (most recent call last):
  File "/usr/src/snuba/snuba/utils/manage_topics.py", line 31, in create_topics
    future.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/site-packages/confluent_kafka/admin/__init__.py", line 113, in _make_topics_result
    result = f.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
cimpl.KafkaException: KafkaError{code=_TIMED_OUT,val=-185,str="Failed while waiting for response from broker: Local: Timed out"}

After this changes bootstrap-snuba waits for kafka and run smoothly.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

Love it!

@johnatannvmd johnatannvmd requested a review from BYK August 30, 2023 08:50
@johnatannvmd
Copy link
Contributor Author

Is this my fault? Or this error somehow connected with Test Flakiness?

@hubertdeng123
Copy link
Member

Is this my fault? Or this error somehow connected with #2372?

it's with test flakiness 😅, I'm trying to fix that

@hubertdeng123 hubertdeng123 merged commit 69f973a into getsentry:master Aug 31, 2023
6 checks passed
@johnatannvmd johnatannvmd deleted the patch-1 branch August 31, 2023 19:26
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants