Skip to content

Commit

Permalink
Adding missing vendor patches and adding them to 'apply list' on rele…
Browse files Browse the repository at this point in the history
…ase generation (#1080)

Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew authored May 7, 2024
1 parent 208c7c1 commit 2621387
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 38 deletions.
74 changes: 74 additions & 0 deletions openshift/patches/backport_1056.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
From 8668bbe21ccd155d86fb37da523722b9b3c59153 Mon Sep 17 00:00:00 2001
From: Marek Schmidt <[email protected]>
Date: Mon, 15 Apr 2024 10:44:35 +0200
Subject: [PATCH] backport fix ManyTriggers possible starvation of Setup
features

---
.../test/rekt/features/broker/feature.go | 46 +++++++++++--------
1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/vendor/knative.dev/eventing/test/rekt/features/broker/feature.go b/vendor/knative.dev/eventing/test/rekt/features/broker/feature.go
index 80063a5670..5651422af9 100644
--- a/vendor/knative.dev/eventing/test/rekt/features/broker/feature.go
+++ b/vendor/knative.dev/eventing/test/rekt/features/broker/feature.go
@@ -118,32 +118,40 @@ func ManyTriggers() *feature.FeatureSet {

for _, testcase := range tests {

+ testcase := testcase // capture variable
f := feature.NewFeatureNamed(testcase.name)

// Create the broker
brokerName := feature.MakeRandomK8sName("broker")
- f.Setup("install broker", broker.Install(brokerName, broker.WithEnvConfig()...))
- f.Setup("broker is ready", broker.IsReady(brokerName))
- f.Setup("broker is addressable", broker.IsAddressable(brokerName))
-
- for sink, eventFilter := range testcase.eventFilters {
- f.Setup("install sink", eventshub.Install(sink, eventshub.StartReceiver))
- filter := eventingv1.TriggerFilterAttributes{
- "type": eventFilter.Type,
- "source": eventFilter.Source,
- }

- // Point the Trigger subscriber to the sink svc.
- cfg := []manifest.CfgFn{
- trigger.WithSubscriber(service.AsKReference(sink), ""),
- trigger.WithFilter(filter),
- trigger.WithExtensions(eventFilter.Extensions),
+ f.Setup("install broker, sinks and triggers", func(ctx context.Context, t feature.T) {
+ broker.Install(brokerName, broker.WithEnvConfig()...)(ctx, t)
+
+ for sink, eventFilter := range testcase.eventFilters {
+ eventshub.Install(sink, eventshub.StartReceiver)(ctx, t)
+
+ filter := eventingv1.TriggerFilterAttributes{
+ "type": eventFilter.Type,
+ "source": eventFilter.Source,
+ }
+
+ // Point the Trigger subscriber to the sink svc.
+ cfg := []manifest.CfgFn{
+ trigger.WithSubscriber(service.AsKReference(sink), ""),
+ trigger.WithFilter(filter),
+ trigger.WithExtensions(eventFilter.Extensions),
+ }
+
+ trigger.Install(sink, brokerName, cfg...)(ctx, t)
}

- // Install the trigger
- f.Setup("install trigger", trigger.Install(sink, brokerName, cfg...))
- f.Setup("trigger goes ready", trigger.IsReady(sink))
- }
+ broker.IsReady(brokerName)(ctx, t)
+ broker.IsAddressable(brokerName)(ctx, t)
+
+ for sink := range testcase.eventFilters {
+ trigger.IsReady(sink)(ctx, t)
+ }
+ })

for _, event := range testcase.eventsToSend {
eventToSend := cloudevents.NewEvent()
38 changes: 0 additions & 38 deletions openshift/patches/disable-ko-publish-rekt.patch

This file was deleted.

1 change: 1 addition & 0 deletions openshift/release/generate-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -euo pipefail
source $(dirname $0)/resolve.sh

GITHUB_ACTIONS=true $(dirname $0)/../../hack/update-codegen.sh
git apply openshift/patches/backport_1056.patch

# Eventing core will bring the config tracing ConfigMap, so remove it from heret
rm -f control-plane/config/eventing-kafka-broker/200-controller/100-config-tracing.yaml
Expand Down

0 comments on commit 2621387

Please sign in to comment.