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

Fix context used in kafka consume #3366

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jjcollinge
Copy link
Contributor

@jjcollinge jjcollinge commented Feb 26, 2024

Signed-off-by: Joni Collinge jonathancollinge@live.com

Description

Use the consume context in the backoff retry of consume as the context parameter will be cancelled and not renewed.

Without this change the subscription does not recover once the context has been refreshed and no more messages are consumed.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

ItalyPaleAle and others added 8 commits February 6, 2024 16:45
… a cloud service (dapr#3339)

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: Guido Spadotto <guido.spad8@gmail.com>
Co-authored-by: Guido Spadotto <guido.spad8@gmail.com>
Co-authored-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: yaron2 <schneider.yaron@live.com>
…dapr#3357)

Signed-off-by: Samantha Coyle <sam@diagrid.io>
Co-authored-by: Sam <sam@diagrid.io>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
@jjcollinge jjcollinge requested review from a team as code owners February 26, 2024 18:06
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 30.23256% with 60 lines in your changes are missing coverage. Please review.

Project coverage is 35.26%. Comparing base (e45dcba) to head (6b7c966).
Report is 10 commits behind head on main.

❗ Current head 6b7c966 differs from pull request most recent head 383d336. Consider uploading reports for the commit 383d336 to get more accurate results

Files Patch % Lines
common/component/azure/eventhubs/eventhubs.go 0.00% 25 Missing ⚠️
common/authentication/azure/auth.go 33.33% 10 Missing and 2 partials ⚠️
state/redis/redis_query.go 33.33% 12 Missing ⚠️
common/component/kafka/consumer.go 0.00% 7 Missing ⚠️
configuration/azure/appconfig/appconfig.go 87.50% 1 Missing and 1 partial ⚠️
common/component/kafka/kafka.go 0.00% 1 Missing ⚠️
state/postgresql/v2/postgresql.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3366   +/-   ##
=======================================
  Coverage   35.26%   35.26%           
=======================================
  Files         244      244           
  Lines       30969    30969           
=======================================
+ Hits        10921    10922    +1     
  Misses      19116    19116           
+ Partials      932      931    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ItalyPaleAle ItalyPaleAle left a comment

Choose a reason for hiding this comment

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

Looks like the Kafka conformance tests are failing, can you PTAL?

@yaron2
Copy link
Member

yaron2 commented Feb 26, 2024

Looks like the Kafka conformance tests are failing, can you PTAL?

They still need fixing from an earlier PR. Some tests need to be removed as they checked for non conformant behavior where messages were still expected to be delivered after the subscription was cancelled

Signed-off-by: Joni Collinge <jonathancollinge@live.com>
@jjcollinge
Copy link
Contributor Author

@yaron2 I ended up removing the stop subscribers test. It looked to me that the test didn't have much value once we removed the logic to receive messages after the subscribe contexts had been cancelled. Let me know if you want me to reinstate it.

@ItalyPaleAle
Copy link
Contributor

@yaron2 I ended up removing the stop subscribers test. It looked to me that the test didn't have much value once we removed the logic to receive messages after the subscribe contexts had been cancelled. Let me know if you want me to reinstate it.

Wait please don't remove the entire test. There's a reason for that test, we want to make sure that context cancellation works!

@berndverst
Copy link
Member

This PR should be made against main branch and then cherry picked.

In contrib we do not merge release back to main.

Can you change the base branch @jjcollinge

@berndverst berndverst added this to the v1.14 milestone Feb 27, 2024
@berndverst
Copy link
Member

@yaron2 advised this is not going to be merged for 1.13. So I will update your base branch for that reason also.

@berndverst berndverst changed the base branch from release-1.13 to main February 27, 2024 17:36
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added stale and removed stale labels Mar 28, 2024
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added stale and removed stale labels Apr 27, 2024
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.

None yet

4 participants