From 92d70fb46c31be265b52b9c42b8707e40625f17a Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Mon, 14 Apr 2025 16:31:08 +0000 Subject: [PATCH 1/2] 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/scripts/update_generation_config.sh | 11 +++++- .github/workflows/renovate_config_check.yaml | 4 +- .../workflows/update_generation_config.yaml | 6 ++- .kokoro/build.sh | 8 +--- .kokoro/presubmit/graalvm-a.cfg | 38 +++++++++++++++++++ .kokoro/presubmit/graalvm-b.cfg | 38 +++++++++++++++++++ .kokoro/presubmit/graalvm-c.cfg | 38 +++++++++++++++++++ renovate.json | 1 - 9 files changed, 132 insertions(+), 13 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 c644a24e1..e58cdcbad 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/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index 91434688c..fff56bf5d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -15,8 +15,15 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1) - echo "${latest}" + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + if [[ -z "${latest}" ]]; then + echo "The latest version of ${group_id}:${artifact_id} is empty." + echo "The returned json from maven.org is invalid: ${json_content}" + exit 1 + else + echo "${latest}" + fi } # Update a key to a new value in the generation config. diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 7c5ec7865..47b9e87c9 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 3cf773992..cd2d5fd5a 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -21,13 +21,14 @@ 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 steps: - uses: actions/checkout@v4 with: + fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - name: Update params in generation config to latest shell: bash @@ -36,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/build.sh b/.kokoro/build.sh index 06e31b082..677aaf766 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -42,6 +42,7 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) fi + RETURN_CODE=0 set +e @@ -75,11 +76,6 @@ graalvm) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test RETURN_CODE=$? ;; -graalvm17) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test - RETURN_CODE=$? - ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. @@ -132,4 +128,4 @@ then fi echo "exiting with ${RETURN_CODE}" -exit ${RETURN_CODE} +exit ${RETURN_CODE} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-a.cfg b/.kokoro/presubmit/graalvm-a.cfg new file mode 100644 index 000000000..24accde47 --- /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: "graalvm" +} + +# 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 000000000..24accde47 --- /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: "graalvm" +} + +# 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 000000000..24accde47 --- /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: "graalvm" +} + +# 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/renovate.json b/renovate.json index 70aef506b..ec5e9bf0e 100644 --- a/renovate.json +++ b/renovate.json @@ -63,7 +63,6 @@ "^org.jacoco:", "^org.codehaus.mojo:", "^org.sonatype.plugins:", - "^com.coveo:", "^com.google.cloud:google-cloud-shared-config" ], "semanticCommitType": "build", From 5b3fa83fb619636b5ff9db1b712a42a428284688 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Mon, 14 Apr 2025 16:33:27 +0000 Subject: [PATCH 2/2] chore: generate libraries at Mon Apr 14 16:31:50 UTC 2025 --- renovate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/renovate.json b/renovate.json index ec5e9bf0e..70aef506b 100644 --- a/renovate.json +++ b/renovate.json @@ -63,6 +63,7 @@ "^org.jacoco:", "^org.codehaus.mojo:", "^org.sonatype.plugins:", + "^com.coveo:", "^com.google.cloud:google-cloud-shared-config" ], "semanticCommitType": "build",