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: pulling consumer subscriber #587

Conversation

astelmashenko
Copy link
Member

@astelmashenko astelmashenko commented Jul 31, 2024

Proposed Changes

  • introducing PullConsumer in parallel with legacy PushConsumer
  • switching e2e tests to test jetstream dispatcher

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 31, 2024
@knative-prow knative-prow bot requested review from Cali0707 and dan-j July 31, 2024 13:42
Copy link

knative-prow bot commented Jul 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astelmashenko

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

@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 31, 2024
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 14.21801% with 362 lines in your changes missing coverage. Please review.

Project coverage is 41.12%. Comparing base (eb80414) to head (7e35dba).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
pkg/channel/jetstream/dispatcher/pull_consumer.go 1.04% 188 Missing and 1 partial ⚠️
pkg/channel/jetstream/dispatcher/push_consumer.go 6.41% 73 Missing ⚠️
pkg/channel/jetstream/dispatcher/defaults.go 24.48% 35 Missing and 2 partials ⚠️
pkg/channel/jetstream/dispatcher/dispatcher.go 50.87% 25 Missing and 3 partials ⚠️
pkg/channel/jetstream/utils/consumerconfig.go 23.07% 20 Missing ⚠️
pkg/tracing/tracing.go 0.00% 11 Missing ⚠️
...channel/jetstream/dispatcher/message_dispatcher.go 55.55% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #587      +/-   ##
==========================================
- Coverage   43.57%   41.12%   -2.45%     
==========================================
  Files          61       62       +1     
  Lines        2678     3664     +986     
==========================================
+ Hits         1167     1507     +340     
- Misses       1430     2072     +642     
- Partials       81       85       +4     

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

@astelmashenko
Copy link
Member Author

/assign @Cali0707

@astelmashenko astelmashenko marked this pull request as ready for review August 5, 2024 14:17
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 5, 2024
@knative-prow knative-prow bot requested a review from creydr August 5, 2024 14:17
@astelmashenko
Copy link
Member Author

@Cali0707 , could you please review.

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

I'm not very familiar with the NATS-specific stuff happening here, but I did my best to do a first pass review @astelmashenko

// you have more time for resources to spin up.
//
// If you have limited resources, you may want to reduce the number of goroutines.
NumBatchGoRoutines = 32
Copy link
Member

Choose a reason for hiding this comment

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

Maybe I'm missing something, but as far as I can tell we aren't using this value anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, you are right, I was planning to introduce later worker pools per subscriber.

Copy link
Member

Choose a reason for hiding this comment

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

should we remove it for now then?

Copy link
Member Author

Choose a reason for hiding this comment

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

agree. removed.

pkg/channel/jetstream/dispatcher/pull_consumer.go Outdated Show resolved Hide resolved
Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

I'm not an expert on any of the NATS parts, but this looks fine to me 👍

/lgtm
/hold for any other reviews

@knative-prow knative-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 3, 2024
@astelmashenko
Copy link
Member Author

astelmashenko commented Oct 4, 2024

@Cali0707 , hey thanks for reviewing it, if you have somebody in mind who can review it then please mention him here, otherwise I do not know why hold, the PR is two months old, enough time to check.
Basically it will not change how it's working by default unless you intentionally pass configuration param to use pulling consumers.

I'm waiting this PR to continue working on the eventing-nats:

  • remove dweprecated (and not supported) nats-streaming
  • introduce a logic to seamlessly switch from deprecated push-consumers

@Cali0707
Copy link
Member

Cali0707 commented Oct 4, 2024

Sure @astelmashenko let's merge it then
/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 2024
@astelmashenko
Copy link
Member Author

Hey, @Cali0707 , could we skip codecov for this PR? In the PR I do:

  • refactor code to support push/pull based consumers (push based is default and without changes)
  • changed github actions to run tests against jetstream implementation (was for legacy nats-streaming)

Because of refactorings and new code there is such codecov that does not allow to merge.

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2024
@dsimansk
Copy link
Contributor

/override codecov/project

Copy link

knative-prow bot commented Oct 21, 2024

@dsimansk: Overrode contexts on behalf of dsimansk: codecov/project

In response to this:

/override codecov/project

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-sigs/prow repository.

@dsimansk
Copy link
Contributor

/override codecov/patch

Copy link

knative-prow bot commented Oct 21, 2024

@dsimansk: Overrode contexts on behalf of dsimansk: codecov/patch

In response to this:

/override codecov/patch

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-sigs/prow repository.

@dsimansk
Copy link
Contributor

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2024
@knative-prow knative-prow bot merged commit c76507b into knative-extensions:main Oct 21, 2024
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants