From 1d9d96d3d72cbf826cae3be01c4b50a280e1bb6f Mon Sep 17 00:00:00 2001 From: Tejas Deshpande Date: Thu, 9 Apr 2026 16:32:02 -0400 Subject: [PATCH 1/4] Update verified versions to fix compat test --- .../perf/plugin/transform/InstrumentationApiCompatTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firebase-perf-gradle/src/functionalTest/java/com/google/firebase/perf/plugin/transform/InstrumentationApiCompatTest.java b/firebase-perf-gradle/src/functionalTest/java/com/google/firebase/perf/plugin/transform/InstrumentationApiCompatTest.java index 99ff66a4b22..68236f3f65f 100644 --- a/firebase-perf-gradle/src/functionalTest/java/com/google/firebase/perf/plugin/transform/InstrumentationApiCompatTest.java +++ b/firebase-perf-gradle/src/functionalTest/java/com/google/firebase/perf/plugin/transform/InstrumentationApiCompatTest.java @@ -52,8 +52,8 @@ public class InstrumentationApiCompatTest { private static final String GRADLE_RELEASES_URL = "https://api.github.com/repos/gradle/gradle/releases/latest"; // Latest verified versions. Update these as new versions are released and verified. - private static final String VERIFIED_AGP_VERSION = "9.2.0-alpha05"; - private static final String VERIFIED_GRADLE_VERSION = "9.5.0-milestone-5"; + private static final String VERIFIED_AGP_VERSION = "9.2.0-alpha08"; + private static final String VERIFIED_GRADLE_VERSION = "9.4.1"; private final OkHttpClient client = new OkHttpClient(); @RegisterExtension public GradleBuildProject gradleBuildProject = new GradleBuildProject(); @@ -130,7 +130,6 @@ private String latestGradleVersion() { JsonObject releaseObject = JsonParser.parseString(response.body().string()).getAsJsonObject(); return releaseObject.get("name").getAsString(); } catch (Exception e) { - // Catch all exceptions (IO, XML parsing, etc.) and wrap them throw new RuntimeException( "Failed to fetch or parse latest Gradle version: " + e.getMessage(), e); } From 30c12246292f762f2cb52f4991be4079597fe585 Mon Sep 17 00:00:00 2001 From: Tejas Deshpande Date: Thu, 9 Apr 2026 17:11:23 -0400 Subject: [PATCH 2/4] Add issue creation --- .../perf-gradle-compatibility-tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/perf-gradle-compatibility-tests.yml b/.github/workflows/perf-gradle-compatibility-tests.yml index 158291a398b..2c9c59ccebe 100644 --- a/.github/workflows/perf-gradle-compatibility-tests.yml +++ b/.github/workflows/perf-gradle-compatibility-tests.yml @@ -30,3 +30,21 @@ jobs: ./gradlew \ :firebase-perf-gradle:functionalTest --tests \ "com.google.firebase.perf.plugin.transform.InstrumentationApiCompatTest.gradleBuildRunsInstrumentationForAllVariants_latestGradleAndAgp" + create-issue-on-failure: + needs: performance-plugin + if: failure() + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Create issue + uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: 'Perf Gradle Compatibility test failed', + assignees: ['tejasd'], + labels: ['bug', 'automated'] + }) \ No newline at end of file From 3ec19dc4045474379da22ecd3f6ffd64f0eca4b3 Mon Sep 17 00:00:00 2001 From: Tejas Deshpande Date: Fri, 10 Apr 2026 11:07:20 -0400 Subject: [PATCH 3/4] Add a check if the issue exists and add the link tothe issue --- .../perf-gradle-compatibility-tests.yml | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/perf-gradle-compatibility-tests.yml b/.github/workflows/perf-gradle-compatibility-tests.yml index 2c9c59ccebe..6932fdc34ab 100644 --- a/.github/workflows/perf-gradle-compatibility-tests.yml +++ b/.github/workflows/perf-gradle-compatibility-tests.yml @@ -41,10 +41,19 @@ jobs: uses: actions/github-script@v7 with: script: | - await github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: 'Perf Gradle Compatibility test failed', - assignees: ['tejasd'], - labels: ['bug', 'automated'] - }) \ No newline at end of file + const issueTitle = 'Perf Gradle Compatibility test failed'; + + const { data: searchResults } = await github.rest.search.issuesAndPullRequests({ + q: `is:issue is:open repo:${context.repo.owner}/${context.repo.repo} in:title "${issueTitle}"`, + }); + + if (searchResults.total_count === 0) { + await github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: issueTitle, + body: `https://github.com/firebase/firebase-android-sdk/actions/workflows/perf-gradle-compatibility-tests.yml` + assignees: ['tejasd'], + labels: ['bug', 'automated'] + }) + } \ No newline at end of file From f3752667da8175a2f8ced61a5663e6427b49666d Mon Sep 17 00:00:00 2001 From: Tejas Deshpande Date: Fri, 10 Apr 2026 11:49:05 -0400 Subject: [PATCH 4/4] github action commit --- .github/workflows/perf-gradle-compatibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf-gradle-compatibility-tests.yml b/.github/workflows/perf-gradle-compatibility-tests.yml index 6932fdc34ab..e7c29bf7893 100644 --- a/.github/workflows/perf-gradle-compatibility-tests.yml +++ b/.github/workflows/perf-gradle-compatibility-tests.yml @@ -38,7 +38,7 @@ jobs: issues: write steps: - name: Create issue - uses: actions/github-script@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | const issueTitle = 'Perf Gradle Compatibility test failed';