From 07a86e42918714541f80066a62324a2863ddb79f Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Thu, 10 Apr 2025 23:59:59 +0000 Subject: [PATCH 1/3] chore: demo of changes from sdk-platform-java#3737 See [sdk-platform-java#3737](https://github.com/googleapis/sdk-platform-java/pull/3737) for more context. TL;DR: we are introducing an additional Kokoro job to run native tests against GraalVM for JDK 17.0.9 --- .github/generated-files-bot.yml | 1 + .github/workflows/renovate_config_check.yaml | 4 +- .github/workflows/samples.yaml | 2 +- .../workflows/update_generation_config.yaml | 5 ++- .kokoro/presubmit/graalvm-a.cfg | 38 +++++++++++++++++++ .kokoro/presubmit/graalvm-b.cfg | 38 +++++++++++++++++++ .kokoro/presubmit/graalvm-c.cfg | 38 +++++++++++++++++++ 7 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 .kokoro/presubmit/graalvm-a.cfg create mode 100644 .kokoro/presubmit/graalvm-b.cfg create mode 100644 .kokoro/presubmit/graalvm-c.cfg diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index c644a24e11..e58cdcbad6 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -6,6 +6,7 @@ externalManifests: file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' ignoreAuthors: +- 'cloud-java-bot' - 'renovate-bot' - 'yoshi-automation' - 'release-please[bot]' diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 47b9e87c98..7c5ec7865e 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -7,7 +7,7 @@ on: jobs: renovate_bot_config_validation: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '22' + node-version: '20' - name: Install Renovate and Config Validator run: | diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index f833b80225..03b2939567 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 8 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check working-directory: samples/snippets diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index 648a97b243..f7b089f349 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -21,7 +21,7 @@ on: jobs: update-generation-config: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 env: # the branch into which the pull request is merged base_branch: main @@ -37,7 +37,8 @@ jobs: [ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com" [ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot" bash .github/scripts/update_generation_config.sh \ - --base_branch "${base_branch}"\ + --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + diff --git a/.kokoro/presubmit/graalvm-a.cfg b/.kokoro/presubmit/graalvm-a.cfg new file mode 100644 index 0000000000..660cee204f --- /dev/null +++ b/.kokoro/presubmit/graalvm-a.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmA" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-b.cfg b/.kokoro/presubmit/graalvm-b.cfg new file mode 100644 index 0000000000..2f5c3f1355 --- /dev/null +++ b/.kokoro/presubmit/graalvm-b.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmB" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-c.cfg b/.kokoro/presubmit/graalvm-c.cfg new file mode 100644 index 0000000000..a8407c0981 --- /dev/null +++ b/.kokoro/presubmit/graalvm-c.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmC" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} + +env_vars: { + key: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file From b35dee1898446bc1736c180c31e0766d31142203 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Fri, 11 Apr 2025 19:28:50 +0000 Subject: [PATCH 2/3] update demo changes --- .kokoro/presubmit/graalvm-a.cfg | 2 +- .kokoro/presubmit/graalvm-b.cfg | 2 +- .kokoro/presubmit/graalvm-c.cfg | 2 +- CONTRIBUTING.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/presubmit/graalvm-a.cfg b/.kokoro/presubmit/graalvm-a.cfg index 660cee204f..24accde475 100644 --- a/.kokoro/presubmit/graalvm-a.cfg +++ b/.kokoro/presubmit/graalvm-a.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "JOB_TYPE" - value: "graalvmA" + value: "graalvm" } # TODO: remove this after we've migrated all tests and scripts diff --git a/.kokoro/presubmit/graalvm-b.cfg b/.kokoro/presubmit/graalvm-b.cfg index 2f5c3f1355..24accde475 100644 --- a/.kokoro/presubmit/graalvm-b.cfg +++ b/.kokoro/presubmit/graalvm-b.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "JOB_TYPE" - value: "graalvmB" + value: "graalvm" } # TODO: remove this after we've migrated all tests and scripts diff --git a/.kokoro/presubmit/graalvm-c.cfg b/.kokoro/presubmit/graalvm-c.cfg index a8407c0981..24accde475 100644 --- a/.kokoro/presubmit/graalvm-c.cfg +++ b/.kokoro/presubmit/graalvm-c.cfg @@ -8,7 +8,7 @@ env_vars: { env_vars: { key: "JOB_TYPE" - value: "graalvmC" + value: "graalvm" } # TODO: remove this after we've migrated all tests and scripts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b65dd279c9..ff092b68e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,7 +84,7 @@ Code in this repo is formatted with [google-java-format](https://github.com/google/google-java-format). To run formatting on your project, you can run: ``` -mvn com.coveo:fmt-maven-plugin:format +mvn com.spotify.fmt:fmt-maven-plugin:format ``` [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account From 74e55834065dd5e6ed0d9f93de7464e7e336a198 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Fri, 11 Apr 2025 19:31:42 +0000 Subject: [PATCH 3/3] update ubuntu version --- .github/workflows/renovate_config_check.yaml | 4 ++-- .github/workflows/update_generation_config.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 7c5ec7865e..47b9e87c98 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -7,7 +7,7 @@ on: jobs: renovate_bot_config_validation: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Install Renovate and Config Validator run: | diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index f7b089f349..cd2d5fd5a8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -21,7 +21,7 @@ on: jobs: update-generation-config: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: # the branch into which the pull request is merged base_branch: main