From 3fb88cfa4525cfb287d44d2972b6e35ccd27912e Mon Sep 17 00:00:00 2001 From: KCarretto Date: Tue, 7 Jan 2025 03:52:31 +0000 Subject: [PATCH 1/2] [Tavern] Fix gcppubsub typo --- tavern/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tavern/config.go b/tavern/config.go index 3c2d674cc..9c26b8626 100644 --- a/tavern/config.go +++ b/tavern/config.go @@ -197,9 +197,9 @@ func (cfg *Config) NewShellMuxes(ctx context.Context) (wsMux *stream.Mux, grpcMu shellOutputTopic := client.Topic(strings.TrimPrefix(topicShellOutput, gcpPrefix)) // Overwrite env var specification with newly created GCP PubSub Subscriptions - subShellInput = fmt.Sprintf("gcpubsub://%s", createGCPSubscription(ctx, shellInputTopic)) + subShellInput = fmt.Sprintf("gcppubsub://%s", createGCPSubscription(ctx, shellInputTopic)) slog.DebugContext(ctx, "created GCP PubSub subscription for shell input", "subscription_name", subShellInput) - subShellOutput = fmt.Sprintf("gcpubsub://%s", createGCPSubscription(ctx, shellOutputTopic)) + subShellOutput = fmt.Sprintf("gcppubsub://%s", createGCPSubscription(ctx, shellOutputTopic)) slog.DebugContext(ctx, "created GCP PubSub subscription for shell output", "subscription_name", subShellOutput) } From f099d571d024f58ddcde7762e26691d30fa773f5 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Tue, 7 Jan 2025 03:53:25 +0000 Subject: [PATCH 2/2] rename variable for clarity --- tavern/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tavern/config.go b/tavern/config.go index 9c26b8626..544349a97 100644 --- a/tavern/config.go +++ b/tavern/config.go @@ -144,7 +144,7 @@ func (cfg *Config) Connect(options ...ent.Option) (*ent.Client, error) { func (cfg *Config) NewShellMuxes(ctx context.Context) (wsMux *stream.Mux, grpcMux *stream.Mux) { var ( projectID = EnvGCPProjectID.String() - gcpPrefix = fmt.Sprintf("gcppubsub://projects/%s/topics/", projectID) + gcpTopicPrefix = fmt.Sprintf("gcppubsub://projects/%s/topics/", projectID) topicShellInput = EnvPubSubTopicShellInput.String() topicShellOutput = EnvPubSubTopicShellOutput.String() subShellInput = EnvPubSubSubscriptionShellInput.String() @@ -193,8 +193,8 @@ func (cfg *Config) NewShellMuxes(ctx context.Context) (wsMux *stream.Mux, grpcMu return name } - shellInputTopic := client.Topic(strings.TrimPrefix(topicShellInput, gcpPrefix)) - shellOutputTopic := client.Topic(strings.TrimPrefix(topicShellOutput, gcpPrefix)) + shellInputTopic := client.Topic(strings.TrimPrefix(topicShellInput, gcpTopicPrefix)) + shellOutputTopic := client.Topic(strings.TrimPrefix(topicShellOutput, gcpTopicPrefix)) // Overwrite env var specification with newly created GCP PubSub Subscriptions subShellInput = fmt.Sprintf("gcppubsub://%s", createGCPSubscription(ctx, shellInputTopic))