Skip to content

Commit c415fbf

Browse files
authored
Merge branch 'main' into renovate/junit5-monorepo
2 parents 7ff954d + a31c682 commit c415fbf

File tree

159 files changed

+4017
-1356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+4017
-1356
lines changed

.cloudbuild/graalvm/cloudbuild-test-a-downstream-kms.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ substitutions:
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [

.cloudbuild/graalvm/cloudbuild-test-a-downstream-kmsinventory.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ substitutions:
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [

.cloudbuild/graalvm/cloudbuild-test-a.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
timeout: 7200s # 2 hours
1616
substitutions:
17-
_SHARED_DEPENDENCIES_VERSION: '3.38.0' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.39.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [
@@ -41,4 +42,5 @@ steps:
4142
entrypoint: bash
4243
args: [ './.kokoro/presubmit/showcase-native.sh' ]
4344
waitFor: [ "graalvm-a-build" ]
44-
id: native-showcase
45+
id: native-showcase
46+

.cloudbuild/graalvm/cloudbuild-test-b-downstream-kms.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ substitutions:
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [

.cloudbuild/graalvm/cloudbuild-test-b-downstream-kmsinventory.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ substitutions:
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [

.cloudbuild/graalvm/cloudbuild-test-b.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
timeout: 7200s # 2 hours
1616
substitutions:
17-
_SHARED_DEPENDENCIES_VERSION: '3.38.0' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.39.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'
21+
logging: CLOUD_LOGGING_ONLY
2122
steps:
2223
- name: gcr.io/cloud-builders/docker
2324
args: [

.cloudbuild/graalvm/cloudbuild.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
timeout: 7200s # 2 hours
1616
substitutions:
17-
_SHARED_DEPENDENCIES_VERSION: '3.38.0' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.39.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.11.3'
1919
steps:
2020
# GraalVM A build
@@ -45,6 +45,8 @@ steps:
4545
id: graalvm-b-build
4646
waitFor: [ "-" ]
4747

48+
options:
49+
logging: CLOUD_LOGGING_ONLY
4850

4951
images:
5052
- gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:${_SHARED_DEPENDENCIES_VERSION}

.cloudbuild/library_generation/cloudbuild-library-generation-push-prod.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
timeout: 7200s # 2 hours
1616
substitutions:
1717
_IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/private-resources/java-library-generation"
18-
_GAPIC_GENERATOR_JAVA_VERSION: '2.46.2-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
18+
_GAPIC_GENERATOR_JAVA_VERSION: '2.49.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
1919
_SHA_IMAGE_ID: "${_IMAGE_NAME}:${COMMIT_SHA}"
2020
_LATEST_IMAGE_ID: "${_IMAGE_NAME}:latest"
2121
_VERSIONED_IMAGE_ID: "${_IMAGE_NAME}:${_GAPIC_GENERATOR_JAVA_VERSION}"
@@ -30,6 +30,8 @@ steps:
3030
"--file", ".cloudbuild/library_generation/library_generation.Dockerfile", "."]
3131
id: library-generation-build
3232
waitFor: ["-"]
33+
env:
34+
- 'DOCKER_BUILDKIT=1'
3335

3436
options:
3537
logging: CLOUD_LOGGING_ONLY

.cloudbuild/library_generation/cloudbuild-library-generation-push.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
timeout: 7200s # 2 hours
1616
substitutions:
1717
_IMAGE_NAME: "gcr.io/cloud-devrel-public-resources/java-library-generation"
18-
_GAPIC_GENERATOR_JAVA_VERSION: '2.48.0' # {x-version-update:gapic-generator-java:current}
18+
_GAPIC_GENERATOR_JAVA_VERSION: '2.49.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
1919
_SHA_IMAGE_ID: "${_IMAGE_NAME}:${COMMIT_SHA}"
2020
_LATEST_IMAGE_ID: "${_IMAGE_NAME}:latest"
2121
_VERSIONED_IMAGE_ID: "${_IMAGE_NAME}:${_GAPIC_GENERATOR_JAVA_VERSION}"
@@ -30,6 +30,8 @@ steps:
3030
"--file", ".cloudbuild/library_generation/library_generation.Dockerfile", "."]
3131
id: library-generation-build
3232
waitFor: ["-"]
33+
env:
34+
- 'DOCKER_BUILDKIT=1'
3335

3436
options:
3537
logging: CLOUD_LOGGING_ONLY

.cloudbuild/library_generation/library_generation.Dockerfile

+47-26
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,72 @@
1414

1515
# install gapic-generator-java in a separate layer so we don't overload the image
1616
# with the transferred source code and jars
17-
FROM gcr.io/cloud-devrel-public-resources/java21@sha256:2ceff5eeea72260258df56d42e44ed413e52ee421c1b77393c5f2c9c4d7c41da AS ggj-build
17+
18+
# 3.9.9-eclipse-temurin-11-alpine
19+
FROM docker.io/library/maven@sha256:006d25558f9d5244ed55b5d2bd8eaf34d883e447d0c4b940e67b9f44d21167bf AS ggj-build
1820

1921
WORKDIR /sdk-platform-java
2022
COPY . .
2123
# {x-version-update-start:gapic-generator-java:current}
22-
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.48.0"
24+
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.49.1-SNAPSHOT"
2325
# {x-version-update-end}
2426

2527
RUN mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
2628
RUN cp "/root/.m2/repository/com/google/api/gapic-generator-java/${DOCKER_GAPIC_GENERATOR_VERSION}/gapic-generator-java-${DOCKER_GAPIC_GENERATOR_VERSION}.jar" \
2729
"./gapic-generator-java.jar"
2830

29-
# build from the root of this repo:
30-
FROM gcr.io/cloud-devrel-public-resources/python@sha256:9c5ea427632f195ad164054831968389d86fdde4a15abca651f3fcb2a71268cb
31+
# alpine:3.20.3
32+
FROM docker.io/library/alpine@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d as glibc-compat
33+
34+
RUN apk add git sudo
35+
# This SHA is the latest known-to-work version of this binary compatibility tool
36+
ARG GLIB_MUS_SHA=7717dd4dc26377dd9cedcc92b72ebf35f9e68a2d
37+
WORKDIR /home
38+
39+
# Install compatibility layer to run glibc-based programs (such as the
40+
# grpc plugin).
41+
# Alpine, by default, only supports musl-based binaries, and there is no public
42+
# downloadable distribution of the grpc plugin that is Alpine (musl) compatible.
43+
# This is one of the recommended approaches to ensure glibc-compatibility
44+
# as per https://wiki.alpinelinux.org/wiki/Running_glibc_programs
45+
RUN git clone https://gitlab.com/manoel-linux1/GlibMus-HQ.git
46+
WORKDIR /home/GlibMus-HQ
47+
# We lock the tool to the latest known-to-work version
48+
RUN git checkout "${GLIB_MUS_SHA}"
49+
RUN chmod a+x compile-x86_64-alpine-linux.sh
50+
RUN sh compile-x86_64-alpine-linux.sh
51+
52+
# python:3.12.7-alpine3.20
53+
FROM docker.io/library/python@sha256:38e179a0f0436c97ecc76bcd378d7293ab3ee79e4b8c440fdc7113670cb6e204 as final
3154

32-
SHELL [ "/bin/bash", "-c" ]
3355

3456

3557
ARG OWLBOT_CLI_COMMITTISH=38fe6f89a2339ee75c77739b31b371f601b01bb3
3658
ARG PROTOC_VERSION=25.5
37-
ARG GRPC_VERSION=1.67.1
59+
ARG GRPC_VERSION=1.68.1
3860
ARG JAVA_FORMAT_VERSION=1.7
3961
ENV HOME=/home
4062
ENV OS_ARCHITECTURE="linux-x86_64"
4163

4264
# install OS tools
43-
RUN apt-get update && apt-get install -y \
44-
unzip openjdk-17-jdk rsync maven jq \
45-
&& apt-get clean
65+
RUN apk update && apk add unzip curl rsync openjdk11 jq bash nodejs npm git
66+
67+
SHELL [ "/bin/bash", "-c" ]
68+
69+
# Copy glibc shared objects to enable execution of the grpc plugin.
70+
# This list was obtained via `libtree -pvvv /grpc/*` in the final container as
71+
# well as inspecting the modifications done by compile-x86_64-alpine-linux.sh
72+
# in the glibc-compat stage using the `dive` command.
73+
COPY --from=glibc-compat /etc/libgcc* /etc/
74+
COPY --from=glibc-compat /lib64/ld-linux-x86-64.so.2 /lib64/
75+
COPY --from=glibc-compat /lib/GLIBCFAKE.so.0 /lib/
76+
COPY --from=glibc-compat /lib/ld-linux-x86-64.so.2 /lib/
77+
COPY --from=glibc-compat /lib/libpthread* /lib/
78+
COPY --from=glibc-compat /lib/libucontext* /lib/
79+
COPY --from=glibc-compat /lib/libc.* /lib/
80+
COPY --from=glibc-compat /usr/lib/libgcc* /usr/lib/
81+
COPY --from=glibc-compat /usr/lib/libstdc* /usr/lib/
82+
COPY --from=glibc-compat /usr/lib/libobstack* /usr/lib/
4683

4784
# copy source code
4885
COPY hermetic_build/common /src/common
@@ -72,10 +109,6 @@ ENV DOCKER_GRPC_VERSION="${GRPC_VERSION}"
72109
COPY --from=ggj-build "/sdk-platform-java/gapic-generator-java.jar" "${HOME}/.library_generation/gapic-generator-java.jar"
73110
RUN chmod 755 "${HOME}/.library_generation/gapic-generator-java.jar"
74111

75-
# use python 3.12 (the base image has several python versions; here we define the default one)
76-
RUN rm $(which python3)
77-
RUN ln -s $(which python3.12) /usr/local/bin/python
78-
RUN ln -s $(which python3.12) /usr/local/bin/python3
79112
RUN python -m pip install --upgrade pip
80113

81114
# install main scripts as a python package
@@ -85,25 +118,14 @@ RUN python -m pip install src/common
85118
RUN python -m pip install --require-hashes -r src/library_generation/requirements.txt
86119
RUN python -m pip install src/library_generation
87120

88-
# Install nvm with node and npm
89-
ENV NODE_VERSION 20.12.0
90-
WORKDIR /home
91-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
92-
RUN chmod o+rx /home/.nvm
93-
ENV NODE_PATH=/home/.nvm/versions/node/v${NODE_VERSION}/bin
94-
ENV PATH=${PATH}:${NODE_PATH}
95-
RUN node --version
96-
RUN npm --version
97-
98121
# install the owl-bot CLI
99122
WORKDIR /tools
100123
RUN git clone https://github.com/googleapis/repo-automation-bots
101124
WORKDIR /tools/repo-automation-bots/packages/owl-bot
102125
RUN git checkout "${OWLBOT_CLI_COMMITTISH}"
103126
RUN npm i && npm run compile && npm link
104127
RUN owl-bot copy-code --version
105-
RUN chmod -R o+rx ${NODE_PATH}
106-
RUN ln -sf ${NODE_PATH}/* /usr/local/bin
128+
RUN chmod o+rx $(which owl-bot)
107129

108130
# download the Java formatter
109131
ADD https://maven-central.storage-download.googleapis.com/maven2/com/google/googlejavaformat/google-java-format/${JAVA_FORMAT_VERSION}/google-java-format-${JAVA_FORMAT_VERSION}-all-deps.jar \
@@ -120,7 +142,6 @@ RUN git config --system user.name "Cloud Java Bot"
120142

121143
# allow read-write for /home and execution for binaries in /home/.nvm
122144
RUN chmod -R a+rw /home
123-
RUN chmod -R a+rx /home/.nvm
124145

125146
WORKDIR /workspace
126147
ENTRYPOINT [ "python", "/src/library_generation/cli/entry_point.py", "generate" ]

.github/scripts/action.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ runs:
6060
cd "${GITHUB_WORKSPACE}"
6161
pip install --require-hashes -r hermetic_build/common/requirements.txt
6262
pip install hermetic_build/common
63-
pip install --require-hashes -r hermetic_build/library_generation/requirements.txt
64-
pip install hermetic_build/library_generation
6563
pip install --require-hashes -r hermetic_build/release_note_generation/requirements.txt
6664
pip install hermetic_build/release_note_generation
6765
- name: Generate changed libraries

.github/scripts/hermetic_library_generation.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ git checkout "${current_branch}"
8181
# copy generation configuration from target branch to current branch.
8282
git show "${target_branch}":"${generation_config}" > "${baseline_generation_config}"
8383

84-
# get .m2 folder so it's mapped into the docker container
85-
m2_folder=$(dirname "$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout)")
86-
8784
# download api definitions from googleapis repository
8885
googleapis_commitish=$(grep googleapis_commitish "${generation_config}" | cut -d ":" -f 2 | xargs)
8986
api_def_dir=$(mktemp -d)
@@ -92,18 +89,23 @@ pushd "${api_def_dir}"
9289
git checkout "${googleapis_commitish}"
9390
popd
9491

92+
# get changed library list.
93+
changed_libraries=$(python hermetic_build/common/cli/get_changed_libraries.py create \
94+
--baseline-generation-config-path="${baseline_generation_config}" \
95+
--current-generation-config-path="${generation_config}")
96+
echo "Changed libraries are: ${changed_libraries:-"No changed library"}."
97+
9598
# run hermetic code generation docker image.
9699
docker run \
97100
--rm \
98101
--quiet \
99102
-u "$(id -u):$(id -g)" \
100103
-v "$(pwd):${workspace_name}" \
101-
-v "${m2_folder}":/home/.m2 \
102104
-v "${api_def_dir}:${workspace_name}/googleapis" \
103105
-e GENERATOR_VERSION="${image_tag}" \
104106
gcr.io/cloud-devrel-public-resources/java-library-generation:"${image_tag}" \
105-
--baseline-generation-config-path="${workspace_name}/${baseline_generation_config}" \
106-
--current-generation-config-path="${workspace_name}/${generation_config}" \
107+
--generation-config-path="${workspace_name}/${generation_config}" \
108+
--library-names="${changed_libraries}" \
107109
--api-definitions-path="${workspace_name}/googleapis"
108110

109111
python hermetic_build/release_note_generation/cli/generate_release_note.py generate \

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ target/
2525
**/build/
2626
**/dist/
2727
library_generation/**/*.jar
28-
28+
**/google-java-format.jar

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.48.0"
2+
".": "2.49.0"
33
}

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [2.49.0](https://github.com/googleapis/sdk-platform-java/compare/v2.48.0...v2.49.0) (2024-10-25)
4+
5+
6+
### Features
7+
8+
* Move release note generation to a sub module ([#3299](https://github.com/googleapis/sdk-platform-java/issues/3299)) ([7d6d66a](https://github.com/googleapis/sdk-platform-java/commit/7d6d66a161db5edc538aec065405954acf4434c5))
9+
10+
11+
### Bug Fixes
12+
13+
* add additional potential exceptions when retrieving protobuf manifest file to get version ([#3315](https://github.com/googleapis/sdk-platform-java/issues/3315)) ([ef9e518](https://github.com/googleapis/sdk-platform-java/commit/ef9e5189740ea5be46ad0d51c2ff554cd99ac162))
14+
15+
16+
### Dependencies
17+
18+
* update dependency com.google.errorprone:error_prone_annotations to v2.35.1 ([#3316](https://github.com/googleapis/sdk-platform-java/issues/3316)) ([d7c290f](https://github.com/googleapis/sdk-platform-java/commit/d7c290f3e49c8ec7c480229e2c8ae38fcdcd99f6))
19+
320
## [2.48.0](https://github.com/googleapis/sdk-platform-java/compare/v2.47.0...v2.48.0) (2024-10-22)
421

522

WORKSPACE

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")
5858
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS")
5959
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS")
6060

61-
_gapic_generator_java_version = "2.48.0" # {x-version-update:gapic-generator-java:current}
61+
_gapic_generator_java_version = "2.49.1-SNAPSHOT" # {x-version-update:gapic-generator-java:current}
6262

6363
maven_install(
6464
artifacts = [

api-common-java/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<groupId>com.google.api</groupId>
66
<artifactId>api-common</artifactId>
77
<packaging>jar</packaging>
8-
<version>2.39.0</version><!-- {x-version-update:api-common:current} -->
8+
<version>2.40.1-SNAPSHOT</version><!-- {x-version-update:api-common:current} -->
99
<name>API Common</name>
1010
<description>Common utilities for Google APIs in Java</description>
1111

1212
<parent>
1313
<groupId>com.google.api</groupId>
1414
<artifactId>gapic-generator-java-pom-parent</artifactId>
15-
<version>2.48.0</version><!-- {x-version-update:gapic-generator-java:current} -->
15+
<version>2.49.1-SNAPSHOT</version><!-- {x-version-update:gapic-generator-java:current} -->
1616
<relativePath>../gapic-generator-java-pom-parent</relativePath>
1717
</parent>
1818

coverage-report/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
<dependency>
3232
<groupId>com.google.api</groupId>
3333
<artifactId>gax</artifactId>
34-
<version>2.56.0</version> <!-- {x-version-update:gax:current} -->
34+
<version>2.57.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
3535
</dependency>
3636
<dependency>
3737
<groupId>com.google.api</groupId>
3838
<artifactId>gax-grpc</artifactId>
39-
<version>2.56.0</version> <!-- {x-version-update:gax-grpc:current} -->
39+
<version>2.57.1-SNAPSHOT</version> <!-- {x-version-update:gax-grpc:current} -->
4040
</dependency>
4141
<dependency>
4242
<groupId>com.google.api</groupId>
4343
<artifactId>gax-httpjson</artifactId>
44-
<version>2.56.0</version> <!-- {x-version-update:gax:current} -->
44+
<version>2.57.1-SNAPSHOT</version> <!-- {x-version-update:gax:current} -->
4545
</dependency>
4646
<dependency>
4747
<groupId>com.google.api</groupId>
4848
<artifactId>api-common</artifactId>
49-
<version>2.39.0</version> <!-- {x-version-update:api-common:current} -->
49+
<version>2.40.1-SNAPSHOT</version> <!-- {x-version-update:api-common:current} -->
5050
</dependency>
5151
</dependencies>
5252

0 commit comments

Comments
 (0)