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

Kafka producer should raise an exception when it fails to connect to broker #636

Merged
merged 4 commits into from
May 14, 2020

Conversation

junhui096
Copy link
Collaborator

What this PR does / why we need it:
In an ingestion job from the Python SDK, the producer should throw an exception if it fails to push data to the Kafka broker.
Which issue(s) this PR fixes:

Fixes #626

Does this PR introduce a user-facing change?:

NONE

@feast-ci-bot
Copy link
Collaborator

Hi @junhui096. Thanks for your PR.

I'm waiting for a gojek member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Collaborator Author

@junhui096 junhui096 left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@woop
Copy link
Member

woop commented May 2, 2020

/retest

@woop
Copy link
Member

woop commented May 2, 2020

/test test-end-to-end-batch

@junhui096 junhui096 force-pushed the exception_handling branch from 471ccbb to 0adc1ef Compare May 2, 2020 06:43
@junhui096 junhui096 force-pushed the exception_handling branch from 9c55971 to 57cb981 Compare May 3, 2020 03:41
@woop woop changed the title Producer throws an exception when it fails to connect to broker Kafka producer should raise an exception when it fails to connect to broker May 3, 2020
@woop woop added the kind/bug label May 3, 2020
@@ -129,7 +129,12 @@ def flush(self, timeout: Optional[int]):
Returns:
int: Number of messages still in queue.
"""
return self.producer.flush(timeout=timeout)
messages = self.producer.flush(timeout=timeout)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be better to fail fast using produce() callbacks rather than wait for the timeout/queue to clear.

@junhui096 junhui096 force-pushed the exception_handling branch from 56381d4 to b56747a Compare May 11, 2020 03:12
@zhilingc
Copy link
Collaborator

/approve

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: junhui096, zhilingc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop
Copy link
Member

woop commented May 13, 2020

/lgtm

@feast-ci-bot feast-ci-bot removed the lgtm label May 13, 2020
@woop
Copy link
Member

woop commented May 13, 2020

/lgtm

@zhilingc
Copy link
Collaborator

/test test-end-to-end-batch

@feast-ci-bot feast-ci-bot merged commit 561b621 into feast-dev:master May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No exception when connecting to Kafka fails
4 participants