From d1251323343ea59c9ef89add033316aed4c548bc Mon Sep 17 00:00:00 2001 From: Selina Fehn Date: Thu, 6 Aug 2026 10:52:48 +0200 Subject: [PATCH 1/4] fix: set max messages to max 32 instead 128 --- pkg/pubsub/subscriber_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pubsub/subscriber_test.go b/pkg/pubsub/subscriber_test.go index 3f303f1..ac1994c 100644 --- a/pkg/pubsub/subscriber_test.go +++ b/pkg/pubsub/subscriber_test.go @@ -76,7 +76,7 @@ var _ = Describe("Pull messages", func() { It("no error is occurring", func(ctx context.Context) { subscriber := pubsub.NewSubscriber(topicId, subscriptionId, pubsub.WithHTTPRoundTripper(rt), pubsub.WithHost(environment)) - resp, err := subscriber.Pull(ctx, pubsub.WithMaxMessages(128)) + resp, err := subscriber.Pull(ctx, pubsub.WithMaxMessages(32)) Expect(resp).ToNot(BeNil()) Expect(err).ToNot(HaveOccurred()) }) From 7206a950081168df72b7df8375bdbecdc76672a0 Mon Sep 17 00:00:00 2001 From: Selina Fehn Date: Thu, 6 Aug 2026 10:55:16 +0200 Subject: [PATCH 2/4] fix: set max messages to max 32 instead 128 or 64 --- pkg/pubsub/subscriber.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pubsub/subscriber.go b/pkg/pubsub/subscriber.go index f4b47af..60d4f74 100644 --- a/pkg/pubsub/subscriber.go +++ b/pkg/pubsub/subscriber.go @@ -134,7 +134,7 @@ func WithMaxMessages(maximum int32) PullOption { func (s *Subscriber) Pull(ctx context.Context, opts ...PullOption) (PullMessages, error) { cfg := &pullOptions{ - maxMessages: 64, + maxMessages: 32, } for _, opt := range opts { From 671b9596e4aa05ce950cf5d0275f3903d491e9c6 Mon Sep 17 00:00:00 2001 From: Selina Fehn Date: Thu, 6 Aug 2026 13:29:50 +0200 Subject: [PATCH 3/4] fix: mise should only use 1.25 go --- mise.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mise.toml b/mise.toml index 280e661..6fbfdec 100644 --- a/mise.toml +++ b/mise.toml @@ -7,6 +7,9 @@ ginkgo = "2.28.1" golangci-lint = "2.8.0" "go:github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" = "v2.7.0" +[env] +GOTOOLCHAIN = "go1.25.0" + [settings] # The go backend is experimental experimental = true From 15ffba5b2a5fb374d07713acde71df39f911ce4d Mon Sep 17 00:00:00 2001 From: Selina Fehn Date: Thu, 6 Aug 2026 14:12:44 +0200 Subject: [PATCH 4/4] fix: change granting access to subscriber and publisher due to changes on api --- scripts/create-pubsub-resources.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/create-pubsub-resources.sh b/scripts/create-pubsub-resources.sh index 282533c..a788e4f 100755 --- a/scripts/create-pubsub-resources.sh +++ b/scripts/create-pubsub-resources.sh @@ -88,33 +88,36 @@ done #ACCESS echo "Granting Publisher Access via curl (Targeting: $REGION)..." -GPARESPONSE=$(curl -sk -w "\n%{http_code}" -X PUT "${BASE_URL}/projects/${PROJECT_ID}/regions/${REGION}/topics/${TOPIC_ID}/publishers/$PUBLISHER_MAIL" \ +GPARESPONSE=$(curl -sk -w "\n%{http_code}" -X PATCH "${BASE_URL}/projects/${PROJECT_ID}/regions/${REGION}/topics/${TOPIC_ID}/publishers" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ - -d "{\"displayName\": \"ci-topic-$(date +%s)\"}") + -d "{\"emailAddress\": \"$PUBLISHER_MAIL\"}") + +HTTP_STATUS=$(echo "$GPARESPONSE" | tail -n 1) +GPABODY=$(echo "$GPARESPONSE" | sed '$d') +echo "Response Body: $GPABODY" if [ "$HTTP_STATUS" -ne 202 ] && [ "$HTTP_STATUS" -ne 200 ]; then echo "API Error (HTTP $HTTP_STATUS)" - echo "Response Granting Publisher Access Body: $GPARESPONSE" + echo "Response Granting Publisher Access Body: $GPABODY" exit 1 fi -echo "Response SUBSCRIPTION Body: $GPARESPONSE" - echo "Granting Subscriber Access via curl (Targeting: $REGION)..." -GSARESPONSE=$(curl -sk -w "\n%{http_code}" -X PUT "${BASE_URL}/projects/${PROJECT_ID}/regions/${REGION}/topics/${TOPIC_ID}/subscriptions/$SUBSCRIPTION_ID/subscribers/$PUBLISHER_MAIL" \ +GSARESPONSE=$(curl -sk -w "\n%{http_code}" -X PATCH "${BASE_URL}/projects/${PROJECT_ID}/regions/${REGION}/topics/${TOPIC_ID}/subscriptions/$SUBSCRIPTION_ID/subscribers" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ - -d "{\"displayName\": \"ci-topic-$(date +%s)\"}") + -d "{\"emailAddress\": \"$PUBLISHER_MAIL\"}") +HTTP_STATUS=$(echo "$GSARESPONSE" | tail -n 1) +GSABODY=$(echo "$GSARESPONSE" | sed '$d') +echo "Response Body: $GSABODY" if [ "$HTTP_STATUS" -ne 202 ] && [ "$HTTP_STATUS" -ne 200 ]; then echo "API Error (HTTP $HTTP_STATUS)" - echo "Response Granting Subscriber Access Body: $GSARESPONSE" + echo "Response Granting Subscriber Access Body: $GSABODY" exit 1 fi -echo "Response SUBSCRIPTION Body: $GSARESPONSE" - echo "Waiting for access permissions to propagate..." sleep 15 \ No newline at end of file