Skip to content

Commit 0630fdf

Browse files
Merge branch 'main' into fix-httpjson-retry-metrics
2 parents 2120960 + 816b160 commit 0630fdf

File tree

141 files changed

+1828
-1240
lines changed

Some content is hidden

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

141 files changed

+1828
-1240
lines changed

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 4 additions & 2 deletions
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.39.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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 1 deletion
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.39.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

Lines changed: 3 additions & 1 deletion
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.39.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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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.49.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

Lines changed: 47 additions & 26 deletions
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.49.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" ]

0 commit comments

Comments
 (0)