-
Notifications
You must be signed in to change notification settings - Fork 42
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
add Channel NatsJetStreamChannel to support JetStream #182
add Channel NatsJetStreamChannel to support JetStream #182
Conversation
/wip |
/hold |
Codecov Report
@@ Coverage Diff @@
## main #182 +/- ##
==========================================
- Coverage 77.25% 73.43% -3.83%
==========================================
Files 10 17 +7
Lines 299 399 +100
==========================================
+ Hits 231 293 +62
- Misses 53 90 +37
- Partials 15 16 +1
Continue to review full report at Codecov.
|
/unhold |
469278c
to
58cc8bd
Compare
@@ -0,0 +1,32 @@ | |||
# Copyright 2019 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Some of these files have the wrong copyright year. Copy/paste leftover?
name: jetstream-ch-dispatcher | ||
namespace: knative-eventing | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be natsjsm?
Just like here:
https://github.com/knative-sandbox/eventing-natss/pull/182/files#diff-a9bd98b0e5248a4625de7f3a112db792e398a7fd49924ac9bd40bec7f0a788fdR20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaikas Or we should be nats
(include natss and natsjsm)? We release both to together. What do you think about?
name: nats-jsm-ch-controller | ||
namespace: knative-eventing | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: nats-jsm-ch-dispatcher | ||
namespace: knative-eventing | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here, natsjsm?
@@ -0,0 +1,44 @@ | |||
# Copyright 2019 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021?
metadata: | ||
name: natsjetstreamchannels.messaging.knative.dev | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
natsjsm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nats
name: jetstream-ch-controller | ||
namespace: knative-eventing | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
natsjsm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
name: jetstream-ch-dispatcher | ||
namespace: knative-eventing | ||
labels: | ||
nats.eventing.knative.dev/release: devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
natsjsm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nats
echo "Tagged release, updating release labels to natss.eventing.knative.dev/release: \"${TAG}\"" | ||
LABEL_YAML_CMD=(sed -e "s|natss.eventing.knative.dev/release: devel|natss.eventing.knative.dev/release: \"${TAG}\"|") | ||
echo "Tagged release, updating release labels to nats.eventing.knative.dev/release: \"${TAG}\"" | ||
LABEL_YAML_CMD=(sed -e "s|nats.eventing.knative.dev/release: devel|nats.eventing.knative.dev/release: \"${TAG}\"|") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably need to add something about replacing the natsjsm.eventing release labels too?
FilterFunc: filterFunc, | ||
Handler: controller.HandleAll(grCh), | ||
}) | ||
serviceInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm wrong. But this sets up the (what looks to be a single dispatcher for all the channels?) and that causes a global resync, which I think makes sense since if the dispatcher is used by all the channels, they all need to be reconciled. However, there's another Service thats created here (obvs if it doesn't exist):
https://github.com/knative-sandbox/eventing-natss/pull/182/files#diff-a9bd98b0e5248a4625de7f3a112db792e398a7fd49924ac9bd40bec7f0a788fdR20
For that I'd expect us to set up a tracker so that only one channel get's reconciled when that Service changes.
Updated, add service eventhandler |
/lgtm Looks like a great start, I reckon we should get this in and continue as per the PR description, this is only the first part. I added a hold since today is a release day and seems like a major change that we wouldn't want to go in at the last minute (esp, since there are no e2e tests (future work as per the issue)). Feel free to remove the hold once the release is cut. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vaikas, zhaojizhuang 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 |
@vaikas OK, thank you. It's ok to aprove after release day. I have already tracked the things to be done in the issue task #145 |
@zhaojizhuang it's already been approved so you can just remove the hold label after the release has been cut, you can do this yourself (or should be able to :) ) so just do it at will. |
/unhold |
Working in progress...
Part 1 of #145
Proposed Changes
add
NatsJetStreamChannel
support JetStreamRelease Note
Docs