diff --git a/.github/workflows/perf-gradle-compatibility-tests.yml b/.github/workflows/perf-gradle-compatibility-tests.yml index 158291a398b..e7c29bf7893 100644 --- a/.github/workflows/perf-gradle-compatibility-tests.yml +++ b/.github/workflows/perf-gradle-compatibility-tests.yml @@ -30,3 +30,30 @@ 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@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + 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 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); }