Skip to content

Commit 805e1c4

Browse files
committed
feat: fix merge conflicts
Signed-off-by: Calum Murray <cmurray@redhat.com>
2 parents 27d5040 + 68f5c37 commit 805e1c4

183 files changed

Lines changed: 24677 additions & 6037 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/kind-e2e.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
fail-fast: false # Keep running if one leg fails.
1616
matrix:
1717
k8s-version:
18-
- v1.31.4
18+
- v1.33.1
1919

2020
eventing-version:
2121
- knative-v1.16.0
2222

2323
# Map between K8s and KinD versions.
2424
# This is attempting to make it a bit clearer what's being tested.
25-
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.9.0
25+
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.29.0
2626
include:
27-
- k8s-version: v1.31.4
28-
kind-version: v0.26.0
29-
kind-image-sha: sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30
27+
- k8s-version: v1.33.1
28+
kind-version: v0.29.0
29+
kind-image-sha: sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f
3030
env:
3131
KO_DOCKER_REPO: kind.local
3232
SYSTEM_NAMESPACE: knative-eventing

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ linters:
1616
- legacy
1717
- std-error-handling
1818
paths:
19-
- third_party$
19+
- third_party
2020
- builtin$
2121
- examples$
2222
formatters:

go.mod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module knative.dev/eventing-natss
22

3-
go 1.24.0
3+
go 1.24.4
44

55
require (
66
github.com/cloudevents/sdk-go/protocol/nats_jetstream/v2 v2.15.2
@@ -10,9 +10,11 @@ require (
1010
github.com/hashicorp/go-cleanhttp v0.5.2
1111
github.com/hashicorp/golang-lru v1.0.2
1212
github.com/kelseyhightower/envconfig v1.4.0
13-
github.com/nats-io/nats-server/v2 v2.10.18
14-
github.com/nats-io/nats.go v1.36.0
15-
github.com/nats-io/nkeys v0.4.7
13+
github.com/nats-io/nats-server/v2 v2.11.6
14+
github.com/nats-io/nats.go v1.43.0
15+
github.com/nats-io/nkeys v0.4.11
16+
github.com/pkg/errors v0.9.1 // indirect
17+
go.opencensus.io v0.24.0 // indirect
1618
go.uber.org/zap v1.27.0
1719
k8s.io/api v0.33.1
1820
k8s.io/apimachinery v0.33.1
@@ -66,6 +68,7 @@ require (
6668
github.com/gogo/protobuf v1.3.2 // indirect
6769
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
6870
github.com/google/gnostic-models v0.6.9 // indirect
71+
github.com/google/go-tpm v0.9.5 // indirect
6972
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
7073
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7174
github.com/josharian/intern v1.0.0 // indirect
@@ -76,10 +79,9 @@ require (
7679
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7780
github.com/modern-go/reflect2 v1.0.2 // indirect
7881
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
79-
github.com/nats-io/jwt/v2 v2.5.8 // indirect
82+
github.com/nats-io/jwt/v2 v2.7.4 // indirect
8083
github.com/nats-io/nuid v1.0.1 // indirect
8184
github.com/openzipkin/zipkin-go v0.4.3 // indirect
82-
github.com/pkg/errors v0.9.1 // indirect
8385
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
8486
github.com/prometheus/client_golang v1.22.0 // indirect
8587
github.com/prometheus/client_model v0.6.2 // indirect
@@ -91,7 +93,6 @@ require (
9193
github.com/spf13/pflag v1.0.6 // indirect
9294
github.com/valyala/bytebufferpool v1.0.0 // indirect
9395
github.com/x448/float16 v0.8.4 // indirect
94-
go.opencensus.io v0.24.0 // indirect
9596
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
9697
go.opentelemetry.io/contrib/instrumentation/runtime v0.62.0 // indirect
9798
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.37.0 // indirect

go.sum

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
6363
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
6464
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
6565
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
66+
github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op h1:+OSa/t11TFhqfrX0EOSqQBDJ0YlpmK0rDSiB19dg9M0=
67+
github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
6668
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves=
6769
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
6870
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -255,6 +257,8 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8
255257
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
256258
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
257259
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
260+
github.com/google/go-tpm v0.9.5 h1:ocUmnDebX54dnW+MQWGQRbdaAcJELsa6PqZhJ48KwVU=
261+
github.com/google/go-tpm v0.9.5/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
258262
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
259263
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
260264
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -405,14 +409,14 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
405409
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
406410
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
407411
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
408-
github.com/nats-io/jwt/v2 v2.5.8 h1:uvdSzwWiEGWGXf+0Q+70qv6AQdvcvxrv9hPM0RiPamE=
409-
github.com/nats-io/jwt/v2 v2.5.8/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A=
410-
github.com/nats-io/nats-server/v2 v2.10.18 h1:tRdZmBuWKVAFYtayqlBB2BuCHNGAQPvoQIXOKwU3WSM=
411-
github.com/nats-io/nats-server/v2 v2.10.18/go.mod h1:97Qyg7YydD8blKlR8yBsUlPlWyZKjA7Bp5cl3MUE9K8=
412-
github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU=
413-
github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
414-
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
415-
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
412+
github.com/nats-io/jwt/v2 v2.7.4 h1:jXFuDDxs/GQjGDZGhNgH4tXzSUK6WQi2rsj4xmsNOtI=
413+
github.com/nats-io/jwt/v2 v2.7.4/go.mod h1:me11pOkwObtcBNR8AiMrUbtVOUGkqYjMQZ6jnSdVUIA=
414+
github.com/nats-io/nats-server/v2 v2.11.6 h1:4VXRjbTUFKEB+7UoaKL3F5Y83xC7MxPoIONOnGgpkHw=
415+
github.com/nats-io/nats-server/v2 v2.11.6/go.mod h1:2xoztlcb4lDL5Blh1/BiukkKELXvKQ5Vy29FPVRBUYs=
416+
github.com/nats-io/nats.go v1.43.0 h1:uRFZ2FEoRvP64+UUhaTokyS18XBCR/xM2vQZKO4i8ug=
417+
github.com/nats-io/nats.go v1.43.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g=
418+
github.com/nats-io/nkeys v0.4.11 h1:q44qGV008kYd9W1b1nEBkNzvnWxtRSQ7A8BoqRrcfa0=
419+
github.com/nats-io/nkeys v0.4.11/go.mod h1:szDimtgmfOi9n25JpfIdGw12tZFYXqhGxjhVxsatHVE=
416420
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
417421
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
418422
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=

pkg/channel/jetstream/controller/resources/dispatcher.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ func (b *DispatcherDeploymentBuilder) WithArgs(args *DispatcherDeploymentArgs) *
8686
func (b *DispatcherDeploymentBuilder) Build() *v1.Deployment {
8787
replicas := b.args.Replicas
8888

89-
b.deployment.ObjectMeta.Namespace = b.args.DispatcherNamespace
90-
b.deployment.ObjectMeta.OwnerReferences = []metav1.OwnerReference{b.args.OwnerRef}
91-
b.deployment.ObjectMeta.Annotations = commonconfig.JoinStringMaps(b.deployment.ObjectMeta.Annotations, b.args.DeploymentAnnotations)
92-
b.deployment.ObjectMeta.Labels = commonconfig.JoinStringMaps(b.deployment.ObjectMeta.Labels, b.args.DeploymentLabels)
89+
b.deployment.Namespace = b.args.DispatcherNamespace
90+
b.deployment.OwnerReferences = []metav1.OwnerReference{b.args.OwnerRef}
91+
b.deployment.Annotations = commonconfig.JoinStringMaps(b.deployment.Annotations, b.args.DeploymentAnnotations)
92+
b.deployment.Labels = commonconfig.JoinStringMaps(b.deployment.Labels, b.args.DeploymentLabels)
9393

9494
b.deployment.Spec.Replicas = &replicas
9595
defaultAnnotations := map[string]string{constants.ConfigMapHashAnnotationKey: b.args.ConfigMapHash}
96-
b.deployment.Spec.Template.ObjectMeta.Annotations = commonconfig.JoinStringMaps(defaultAnnotations, b.args.PodAnnotations)
97-
b.deployment.Spec.Template.ObjectMeta.Labels = commonconfig.JoinStringMaps(b.deployment.Spec.Template.ObjectMeta.Labels, b.args.PodLabels)
96+
b.deployment.Spec.Template.Annotations = commonconfig.JoinStringMaps(defaultAnnotations, b.args.PodAnnotations)
97+
b.deployment.Spec.Template.Labels = commonconfig.JoinStringMaps(b.deployment.Spec.Template.Labels, b.args.PodLabels)
9898
b.deployment.Spec.Template.Spec.ServiceAccountName = b.args.ServiceAccount
9999

100100
b.deployment.Spec.Template.Spec.NodeSelector = b.args.DeploymentNodeSelector
@@ -117,7 +117,7 @@ func (b *DispatcherDeploymentBuilder) Build() *v1.Deployment {
117117
if b.args.ConfigMapName != "" {
118118
for i, v := range b.deployment.Spec.Template.Spec.Volumes {
119119
if v.Name == constants.SettingsConfigMapName {
120-
b.deployment.Spec.Template.Spec.Volumes[i].VolumeSource.ConfigMap.Name = b.args.ConfigMapName
120+
b.deployment.Spec.Template.Spec.Volumes[i].ConfigMap.Name = b.args.ConfigMapName
121121

122122
break
123123
}

pkg/channel/jetstream/controller/resources/dispatcher_service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func (b *DispatcherServiceBuilder) WithArgs(args *DispatcherServiceArgs) *Dispat
5959
}
6060

6161
func (b *DispatcherServiceBuilder) Build() *corev1.Service {
62-
b.service.ObjectMeta.Namespace = b.args.DispatcherNamespace
63-
b.service.ObjectMeta.Annotations = commonconfig.JoinStringMaps(b.service.Annotations, b.args.ServiceAnnotations)
64-
b.service.ObjectMeta.Labels = commonconfig.JoinStringMaps(b.service.Labels, b.args.ServiceLabels)
62+
b.service.Namespace = b.args.DispatcherNamespace
63+
b.service.Annotations = commonconfig.JoinStringMaps(b.service.Annotations, b.args.ServiceAnnotations)
64+
b.service.Labels = commonconfig.JoinStringMaps(b.service.Labels, b.args.ServiceLabels)
6565
return b.service
6666
}
6767

pkg/channel/jetstream/controller/resources/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func MakeK8sService(kc *v1alpha1.NatsJetStreamChannel, opts ...ServiceOption) (*
6565
Kind: "Service",
6666
},
6767
ObjectMeta: metav1.ObjectMeta{
68-
Name: MakeJSMChannelServiceName(kc.ObjectMeta.Name),
68+
Name: MakeJSMChannelServiceName(kc.Name),
6969
Namespace: kc.Namespace,
7070
Labels: map[string]string{
7171
MessagingRoleLabel: MessagingRole,

pkg/channel/jetstream/dispatcher/dispatcher_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ import (
4343

4444
"knative.dev/eventing-natss/pkg/apis/messaging/v1alpha1"
4545
"knative.dev/eventing-natss/pkg/channel/jetstream/utils"
46-
reconciletesting "knative.dev/eventing-natss/pkg/reconciler/testing"
4746
"knative.dev/eventing/pkg/channel"
4847
)
4948

5049
func TestDispatcher_RegisterChannelHost(t *testing.T) {
51-
nc := reconciletesting.NewNatsJetStreamChannel(testNS, ncName)
50+
nc := reconcilertesting.NewNatsJetStreamChannel(testNS, ncName)
5251
config := createChannelConfig(nc)
5352

5453
d := &Dispatcher{}
@@ -116,7 +115,7 @@ func TestDispatcher_ReconcileConsumers(t *testing.T) {
116115
eventRecorder := record.NewFakeRecorder(10)
117116
ctx = controller.WithEventRecorder(ctx, eventRecorder)
118117

119-
nc := reconciletesting.NewNatsJetStreamChannel(testNS, ncName, reconciletesting.WithNatsJetStreamChannelSubscribers(subscribers))
118+
nc := reconcilertesting.NewNatsJetStreamChannel(testNS, ncName, reconcilertesting.WithNatsJetStreamChannelSubscribers(subscribers))
120119
sub := fanout.Subscription{
121120
RetryConfig: &kncloudevents.RetryConfig{
122121
RequestTimeout: time.Second,

pkg/channel/jetstream/dispatcher/reconciler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ func (r *Reconciler) newConfigFromChannel(nc *v1alpha1.NatsJetStreamChannel) Cha
285285
HostName: nc.Status.Address.URL.Host,
286286
ConsumerConfigTemplate: nc.Spec.ConsumerConfigTemplate,
287287
}
288-
if nc.Spec.SubscribableSpec.Subscribers != nil {
289-
newSubs := make([]Subscription, len(nc.Spec.SubscribableSpec.Subscribers))
290-
for i, source := range nc.Spec.SubscribableSpec.Subscribers {
288+
if nc.Spec.Subscribers != nil {
289+
newSubs := make([]Subscription, len(nc.Spec.Subscribers))
290+
for i, source := range nc.Spec.Subscribers {
291291
innerSub, _ := fanout.SubscriberSpecToFanoutConfig(source)
292292

293293
// This functionality cannot be configured via the Subscription CRD. The default implementation is

pkg/reconciler/testing/factory.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"knative.dev/pkg/logging"
3737
logtesting "knative.dev/pkg/logging/testing"
3838
"knative.dev/pkg/reconciler"
39-
. "knative.dev/pkg/reconciler/testing"
39+
reconcilertesting "knative.dev/pkg/reconciler/testing"
4040
)
4141

4242
const (
@@ -49,8 +49,8 @@ const (
4949
type Ctor func(context.Context, *Listers) controller.Reconciler
5050

5151
// MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
52-
func MakeFactory(ctor Ctor) Factory {
53-
return func(t *testing.T, r *TableRow) (controller.Reconciler, ActionRecorderList, EventList) {
52+
func MakeFactory(ctor Ctor) reconcilertesting.Factory {
53+
return func(t *testing.T, r *reconcilertesting.TableRow) (controller.Reconciler, reconcilertesting.ActionRecorderList, reconcilertesting.EventList) {
5454
ls := NewListers(r.Objects)
5555

5656
ctx := logging.WithLogger(context.Background(), logtesting.TestLogger(t))
@@ -77,14 +77,14 @@ func MakeFactory(ctor Ctor) Factory {
7777

7878
// Validate all Create operations through the eventing client.
7979
client.PrependReactor("create", "*", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
80-
return ValidateCreates(context.Background(), action)
80+
return reconcilertesting.ValidateCreates(context.Background(), action)
8181
})
8282
client.PrependReactor("update", "*", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
83-
return ValidateUpdates(context.Background(), action)
83+
return reconcilertesting.ValidateUpdates(context.Background(), action)
8484
})
8585

86-
actionRecorderList := ActionRecorderList{dynamicClient, client, kubeClient}
87-
eventList := EventList{Recorder: eventRecorder}
86+
actionRecorderList := reconcilertesting.ActionRecorderList{dynamicClient, client, kubeClient}
87+
eventList := reconcilertesting.EventList{Recorder: eventRecorder}
8888

8989
if r.Ctx == nil {
9090
r.Ctx = ctx

0 commit comments

Comments
 (0)