Skip to content

Commit d203d95

Browse files
authored
Merge branch 'main' into suztomo-patch-3
2 parents 8ec3a2e + 473e1a6 commit d203d95

124 files changed

Lines changed: 2755 additions & 697 deletions

File tree

Some content is hidden

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

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

Lines changed: 1 addition & 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.50.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.52.3-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.16.1'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'

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

Lines changed: 1 addition & 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.50.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.52.3-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.16.1'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'

.cloudbuild/graalvm/cloudbuild-test-c.yaml

Lines changed: 1 addition & 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.50.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.52.3-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.16.1'
1919
options:
2020
machineType: 'E2_HIGHCPU_8'

.cloudbuild/graalvm/cloudbuild.yaml

Lines changed: 1 addition & 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.50.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
17+
_SHARED_DEPENDENCIES_VERSION: '3.52.3-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
1818
_JAVA_SHARED_CONFIG_VERSION: '1.16.1'
1919
steps:
2020
# GraalVM A build

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
timeout: 7200s # 2 hours
1616
substitutions:
17-
_GAPIC_GENERATOR_JAVA_VERSION: '2.60.1-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
17+
_GAPIC_GENERATOR_JAVA_VERSION: '2.62.3-SNAPSHOT' # {x-version-update:gapic-generator-java:current}
1818
_PRIVATE_IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/private-resources/java-library-generation"
1919
_PRIVATE_SHA_IMAGE_ID: "${_PRIVATE_IMAGE_NAME}:${COMMIT_SHA}"
2020
_PRIVATE_LATEST_IMAGE_ID: "${_PRIVATE_IMAGE_NAME}:latest"

.cloudbuild/library_generation/library_generation.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FROM docker.io/library/maven:3.9.9-eclipse-temurin-17-alpine@sha256:969014ee8852
2121
WORKDIR /sdk-platform-java
2222
COPY . .
2323
# {x-version-update-start:gapic-generator-java:current}
24-
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.60.1-SNAPSHOT"
24+
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.62.3-SNAPSHOT"
2525
# {x-version-update-end}
2626

2727
# Download the java formatter

.cloudbuild/library_generation/library_generation_airlock.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FROM us-docker.pkg.dev/artifact-foundry-prod/docker-3p-trusted/maven@sha256:d3f0
2121
WORKDIR /sdk-platform-java
2222
COPY . .
2323
# {x-version-update-start:gapic-generator-java:current}
24-
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.60.1-SNAPSHOT"
24+
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.62.3-SNAPSHOT"
2525
# {x-version-update-end}
2626

2727
# Download the java formatter

.github/release-please.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ extraFiles:
1010
- .cloudbuild/graalvm/cloudbuild-test-b.yaml
1111
- .cloudbuild/graalvm/cloudbuild-test-c.yaml
1212
- .cloudbuild/library_generation/cloudbuild-library-generation-release.yaml
13-
- hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-a.cfg
14-
- hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-b.cfg
15-
- hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-c.cfg
13+
- >-
14+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-a.cfg
15+
- >-
16+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-b.cfg
17+
- >-
18+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-c.cfg
1619
- generation_config.yaml
1720
branches:
1821
- branch: 2.23.x
@@ -28,3 +31,24 @@ branches:
2831
handleGHRelease: true
2932
manifest: true
3033
branch: 2.54.x
34+
- releaseType: java-backport
35+
bumpMinorPreMajor: true
36+
handleGHRelease: true
37+
primaryBranch: main
38+
manifest: true
39+
extraFiles:
40+
- WORKSPACE
41+
- .cloudbuild/graalvm/cloudbuild.yaml
42+
- .cloudbuild/graalvm/cloudbuild-test-a.yaml
43+
- .cloudbuild/graalvm/cloudbuild-test-b.yaml
44+
- .cloudbuild/graalvm/cloudbuild-test-c.yaml
45+
- >-
46+
.cloudbuild/library_generation/cloudbuild-library-generation-release.yaml
47+
- >-
48+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-a.cfg
49+
- >-
50+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-b.cfg
51+
- >-
52+
hermetic_build/library_generation/owlbot/templates/java_library/.kokoro/presubmit/graalvm-native-c.cfg
53+
- generation_config.yaml
54+
branch: 2.59.x
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/bash
2+
3+
# This script generates a maven command to test unit and integration tests for
4+
# the repo. The outputted maven command will be in the rough following format
5+
# `mvn verify ... -D{dependency.name}.version={dependency.version]`. The variables
6+
# ${dependency.name} and ${dependency.version} are parsed from the input to the script.
7+
#
8+
# Default invocation ./.github/scripts/test_dependency_compatibility.sh will use the default
9+
# upper-bounds dependency file at the root of the repo.
10+
# There are two potential inputs to the script:
11+
# 1. -f {file}: Custom file/path for the upper-bound dependencies to test
12+
# 2. -l {deps_list}: Comma-separated list of dependencies to test (e.g. protobuf=4.31.0,guava=33.4.8-jre)
13+
# Note: Do not include the `-D` prefix or `.version` suffix. Those values will be appended when generating
14+
# the maven command.
15+
#
16+
# If both inputs are supplied, the deps_list input has precedence. For Github Actions workflow,
17+
# the default workflow will run with the upper-bounds file. A `workflow_dispatch` option takes in
18+
# an input for the deps_list to manually run a subset of dependencies.
19+
#
20+
# The default upper-bound dependencies file is `dependencies.txt` located in the root
21+
# of sdk-platform-java. The upper-bound dependencies file will be in the format of:
22+
# ${dependency.name}=${dependency.version}
23+
24+
set -ex
25+
26+
function print_help() {
27+
echo "Unexpected input argument for this script."
28+
echo "Use -f {file} for the directory of the upper-bound dependencies file."
29+
echo "Use -l {deps_list} for a comma-separated list of dependencies to test (Format: dep1=1.0,dep2=2.0)"
30+
}
31+
32+
# Function to parse a dependency string and append it to the Maven command
33+
function add_dependency_to_maven_command() {
34+
local dep_pair=$1
35+
if [[ ! "${dep_pair}" =~ .*=.* ]]; then
36+
echo "Malformed dependency string: ${dep_pair}. Expected format: dependency=version"
37+
exit 1
38+
fi
39+
local dependency=$(echo "${dep_pair}" | cut -d'=' -f1 | tr -d '[:space:]')
40+
local version=$(echo "${dep_pair}" | cut -d'=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
41+
MAVEN_COMMAND+=" -D${dependency}.version=${version}"
42+
}
43+
44+
# Default to the upper bounds file in the root of the repo
45+
file='dependencies.txt'
46+
dependency_list=''
47+
48+
# The colon (:) after the letter means that there is an input associated with the flag
49+
while getopts 'f:l:' flag; do
50+
case "${flag}" in
51+
f) file="${OPTARG}" ;;
52+
l) dependency_list="${OPTARG}" ;;
53+
*) print_help && exit 1
54+
esac
55+
done
56+
57+
# Error if both the file and deps_list inputs is empty
58+
if [[ -z "${file}" && -z "${dependency_list}" ]]; then
59+
print_help && exit 1
60+
fi
61+
62+
MAVEN_COMMAND="mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip -Denforcer.skip "
63+
64+
# Check if a list of dependencies was provided as an argument. If the list of dependency inputted
65+
# is empty, then run with the upper-bound dependencies file
66+
if [ -z "${dependency_list}" ]; then
67+
UPPER_BOUND_DEPENDENCY_FILE=$file
68+
69+
if [ ! -e "${UPPER_BOUND_DEPENDENCY_FILE}" ]; then
70+
echo "The inputted upper-bound dependency file '${UPPER_BOUND_DEPENDENCY_FILE}' cannot be found"
71+
exit 1
72+
fi
73+
74+
# Read the file line by line
75+
while IFS= read -r line; do
76+
# Ignore any comments and blank lines
77+
if [[ "${line}" =~ ^[[:space:]]*# ]] || [[ -z "${line}" ]]; then
78+
continue
79+
fi
80+
add_dependency_to_maven_command "${line}"
81+
done < "${UPPER_BOUND_DEPENDENCY_FILE}"
82+
else # This else block means that a list of dependencies was inputted
83+
# Set the Internal Field Separator (IFS) to a comma.
84+
# This tells 'read' to split the string by commas into an array named DEPS.
85+
# The 'read -ra' command reads the input into an array.
86+
IFS=',' read -ra DEPS <<< "${dependency_list}"
87+
88+
# Loop through each item in the DEPS array.
89+
for DEP_PAIR in "${DEPS[@]}"; do
90+
# Skip any empty items that might result from trailing commas.
91+
if [ -z "${DEP_PAIR}" ]; then
92+
continue
93+
fi
94+
add_dependency_to_maven_command "${DEP_PAIR}"
95+
done
96+
fi
97+
98+
# Run the generated maven command to test with the dependency versions
99+
$MAVEN_COMMAND

.github/sync-repo-settings.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,50 @@ branchProtectionRules:
124124
- showcase-native
125125
- showcase (11)
126126
- showcase (17)
127+
- pattern: 2.59.x
128+
isAdminEnforced: true
129+
requiredApprovingReviewCount: 1
130+
requiresCodeOwnerReviews: true
131+
requiresStrictStatusChecks: false
132+
requiredStatusCheckContexts:
133+
- build(8) except for gapic-generator-java
134+
- build(8) for gapic-generator-java
135+
- build (11)
136+
- build (17)
137+
- cla/google
138+
- compatibility
139+
- graalvm-presubmit-sdk-platform-java-a (java-graalvm-ci-prod)
140+
- graalvm-presubmit-sdk-platform-java-b (java-graalvm-ci-prod)
141+
- graalvm-presubmit-sdk-platform-java-c (java-graalvm-ci-prod)
142+
- >-
143+
graalvm-presubmit-sdk-platform-java-a-downstream-kms
144+
(java-graalvm-ci-prod)
145+
- >-
146+
graalvm-presubmit-sdk-platform-java-b-downstream-kms
147+
(java-graalvm-ci-prod)
148+
- >-
149+
graalvm-presubmit-sdk-platform-java-c-downstream-kms
150+
(java-graalvm-ci-prod)
151+
- >-
152+
graalvm-presubmit-sdk-platform-java-a-downstream-kmsinventory
153+
(java-graalvm-ci-prod)
154+
- >-
155+
graalvm-presubmit-sdk-platform-java-b-downstream-kmsinventory
156+
(java-graalvm-ci-prod)
157+
- >-
158+
graalvm-presubmit-sdk-platform-java-c-downstream-kmsinventory
159+
(java-graalvm-ci-prod)
160+
- library_generation
161+
- library-generation-integration-test (java-hermetic-build-prod)
162+
- library-generation-lint-python
163+
- library-generation-lint-shell
164+
- library-generation-unit-tests
165+
- lint
166+
- should-run-library-generation-tests
167+
- showcase (11)
168+
- showcase (17)
169+
- showcase (21)
170+
- showcase (24)
127171
permissionRules:
128172
- team: cloud-java-team-teamsync
129173
permission: admin

0 commit comments

Comments
 (0)