From 97fbd79505b8005f9c199b7b5422628195a87564 Mon Sep 17 00:00:00 2001 From: Daniel Bradley Date: Fri, 8 Nov 2024 12:26:27 +0000 Subject: [PATCH 1/2] Stop filtering on search token when finding applicable issues This might be running very quickly after the issue was created and it might not yet be indexed. Instead, just list the latest 100 issues and filter on exact title format instead. The current rate of issue creation is low enough that the latest 100 issues should safely include all open upgrade issues. Fixes https://github.com/pulumi/upgrade-provider/issues/291 We'll continue to use the token for issue de-duplication as this only happens once per day and so is reliably in the GH issue search index. --- upgrade/steps_helpers.go | 1 - 1 file changed, 1 deletion(-) diff --git a/upgrade/steps_helpers.go b/upgrade/steps_helpers.go index 44de597..cc67b9e 100644 --- a/upgrade/steps_helpers.go +++ b/upgrade/steps_helpers.go @@ -620,7 +620,6 @@ var getExpectedTargetFromIssues = stepv2.Func11E("From Issues", func(ctx context "--state=open", "--repo="+name, "--limit=100", - fmt.Sprintf("--search=%q", upgradeIssueToken), "--json=title,number") titles := []struct { Title string `json:"title"` From c649aad1a5c50e051f68621899bda17ae7258f95 Mon Sep 17 00:00:00 2001 From: Daniel Bradley Date: Fri, 8 Nov 2024 13:03:08 +0000 Subject: [PATCH 2/2] Fix tests --- upgrade/steps_helpers_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/upgrade/steps_helpers_test.go b/upgrade/steps_helpers_test.go index af8c22f..efa63d1 100644 --- a/upgrade/steps_helpers_test.go +++ b/upgrade/steps_helpers_test.go @@ -275,7 +275,6 @@ func TestGetExpectedTargetFromTarget(t *testing.T) { "--state=open", "--repo=pulumi/pulumi-cloudflare", "--limit=100", - "--search=\"pulumiupgradeproviderissue\"", "--json=title,number" ] ],