Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b4151db
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
renovate-bot Mar 27, 2025
26ad207
chore: update groupId of formatter to `com.spotify.fmt`
diegomarquezp Mar 28, 2025
2808286
chore: format with google-java-format 1.25.2
diegomarquezp Mar 28, 2025
58f59e9
chore(ci): run lint check job on java 17
diegomarquezp Mar 28, 2025
d854040
chore(ci): skip fmt check in java 11 mvn tasks
diegomarquezp Mar 28, 2025
4f46aa2
feat(hermetic-build): use java 17 in Docker image
diegomarquezp Mar 28, 2025
c824163
chore: generate libraries at Fri Mar 28 20:33:10 UTC 2025
cloud-java-bot Mar 28, 2025
e454b1e
Revert "chore: generate libraries at Fri Mar 28 20:33:10 UTC 2025"
diegomarquezp Mar 28, 2025
1443660
temporarily prevent cloud java bot updates
diegomarquezp Mar 28, 2025
3dedf0c
chore: format java-showcase
diegomarquezp Mar 28, 2025
1973ef5
chore: format showcase test files
diegomarquezp Mar 28, 2025
1d55f6c
chore: update shared dependencies to java 17
diegomarquezp Mar 28, 2025
da1a26f
chore: formatter dependency is managed by java-shared-config
diegomarquezp Mar 28, 2025
11ce72a
Merge branch 'update-sharedconfig-and-lint' of https://github.com/goo…
diegomarquezp Mar 28, 2025
d5527da
chore: skip fmt check in Airlock docker image
diegomarquezp Mar 28, 2025
134a4a2
chore: infer the google-java-format version in the Airlock Docker image
diegomarquezp Mar 28, 2025
76c1846
chore: use java 17 in java8 compatibility check
diegomarquezp Mar 28, 2025
7147c8e
chore: format showcase files
diegomarquezp Mar 28, 2025
5292d7a
chore: update contribution guidelines to use spotify group ID
diegomarquezp Mar 31, 2025
36d9ee4
chore: update fmt plugin in gapic showcase
diegomarquezp Mar 31, 2025
57e530f
chore: revert format changes temporarily for review
diegomarquezp Mar 31, 2025
e975139
Revert "chore: revert format changes temporarily for review"
diegomarquezp Apr 1, 2025
6b5c220
restore hermetic generation workflow
diegomarquezp Apr 1, 2025
23681cc
Revert "restore hermetic generation workflow"
diegomarquezp Apr 1, 2025
a3e10d0
chore: generate libraries at Tue Apr 1 18:42:50 UTC 2025
cloud-java-bot Apr 1, 2025
0023fab
sync dockerfiles
diegomarquezp Apr 2, 2025
454a933
Merge remote-tracking branch 'origin' into update-sharedconfig-and-lint
diegomarquezp Apr 2, 2025
0942ea3
Merge remote-tracking branch 'refs/remotes/origin/update-sharedconfig…
diegomarquezp Apr 2, 2025
5bfdf7f
update Dockerfile
diegomarquezp Apr 2, 2025
403bedf
do not transfer problematic file
diegomarquezp Apr 2, 2025
808c115
no cache
diegomarquezp Apr 2, 2025
a18245b
update golden and generator in cloudbuild job
diegomarquezp Apr 2, 2025
2bd03cb
fix jar copy
diegomarquezp Apr 2, 2025
14f689e
remove redundant switch
diegomarquezp Apr 2, 2025
ea4d580
restore library generation
diegomarquezp Apr 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-a-downstream-kms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.45.2-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-b-downstream-kms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.30.1-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild-test-b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.45.2-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
options:
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY
Expand Down
2 changes: 1 addition & 1 deletion .cloudbuild/graalvm/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
timeout: 7200s # 2 hours
substitutions:
_SHARED_DEPENDENCIES_VERSION: '3.45.2-SNAPSHOT' # {x-version-update:google-cloud-shared-dependencies:current}
_JAVA_SHARED_CONFIG_VERSION: '1.15.0'
_JAVA_SHARED_CONFIG_VERSION: '1.15.1'
steps:
# GraalVM A build
- name: gcr.io/cloud-builders/docker
Expand Down
4 changes: 2 additions & 2 deletions .cloudbuild/library_generation/library_generation.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# install gapic-generator-java in a separate layer so we don't overload the image
# with the transferred source code and jars

FROM docker.io/library/maven:3.9.9-eclipse-temurin-11-alpine@sha256:456f60c1643cf70e3c1d630884387fbfa207ad5975d17b0323cc36030dc13c40 AS ggj-build
FROM docker.io/library/maven:3.9.9-eclipse-temurin-17-alpine@sha256:969014ee8852c9910ff5ef09de17541c2587819364b79d7dc044634dfb8a3388 AS ggj-build

WORKDIR /sdk-platform-java
COPY . .
Expand Down Expand Up @@ -62,7 +62,7 @@ ENV HOME=/home
ENV OS_ARCHITECTURE="linux-x86_64"

# install OS tools
RUN apk update && apk add unzip curl rsync openjdk11 jq bash nodejs npm git
RUN apk update && apk add unzip curl rsync openjdk17 jq bash nodejs npm git

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

Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is library_generation_airlock.Dockerfile used for? What is the difference between it and library_generation.Dockerfile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a Airlock variant of our Dockerfile. It was introduced in #3472 and it seemingly is a reflection of the original one, but fetching the images from Airlock (this is compatible with Cloud Build).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a way to share the common code between the two, or maybe only keep the airlock one if it can be used locally as well. Otherwise these two files can easily get diverged from each other as they evolve. This is a separate future enhancement though.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ COPY . .
ENV DOCKER_GAPIC_GENERATOR_VERSION="2.55.2-SNAPSHOT"
# {x-version-update-end}

RUN mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
# Download the java formatter
RUN mvn -pl gapic-generator-java-pom-parent help:evaluate -Dexpression='google-java-format.version' -q -DforceStdout > /java-formatter-version
RUN cat /java-formatter-version
RUN V=$(cat /java-formatter-version) && curl -o "/google-java-format.jar" "https://maven-central.storage-download.googleapis.com/maven2/com/google/googlejavaformat/google-java-format/${V}/google-java-format-${V}-all-deps.jar"

# Skipping the fmt check until 3.9.9-eclipse-temurin-17-alpine:969014ee8852 is available in Airlock.
RUN mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
RUN cp "/root/.m2/repository/com/google/api/gapic-generator-java/${DOCKER_GAPIC_GENERATOR_VERSION}/gapic-generator-java-${DOCKER_GAPIC_GENERATOR_VERSION}.jar" \
"./gapic-generator-java.jar"

Expand Down Expand Up @@ -60,7 +66,7 @@ ENV HOME=/home
ENV OS_ARCHITECTURE="linux-x86_64"

# install OS tools
RUN apk update && apk add unzip curl rsync openjdk11 jq bash nodejs npm git
RUN apk update && apk add unzip curl rsync openjdk17 jq bash nodejs npm git

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

Expand Down Expand Up @@ -126,9 +132,8 @@ RUN owl-bot copy-code --version
RUN chmod o+rx $(which owl-bot)
RUN apk del -r npm && apk cache clean

# download the Java formatter
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 \
"${HOME}"/.library_generation/google-java-format.jar
# copy the Java formatter
COPY --from=ggj-build "/google-java-format.jar" "${HOME}"/.library_generation/google-java-format.jar
RUN chmod 755 "${HOME}"/.library_generation/google-java-format.jar
ENV JAVA_FORMATTER_LOCATION="${HOME}/.library_generation/google-java-format.jar"

Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- run: bazelisk version
- name: Install Maven modules
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
- name: Integration Tests
run: |
bazelisk --batch test //test/integration/...
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
- name: Install all modules using Java 11
shell: bash
run: |
mvn -V -B -ntp clean install -DskipTests
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip
- uses: actions/setup-java@v3
with:
java-version: 8
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
cache: maven
- run: java -version
Expand All @@ -211,7 +211,7 @@ jobs:
- name: Compatibility check
# package jar so that gapic-generator-java module can use
# testlib modules of gax
run: mvn package clirr:check -DskipTests
run: mvn package clirr:check -DskipTests -Dfmt.skip

showcase:
runs-on: ubuntu-22.04
Expand All @@ -227,8 +227,9 @@ jobs:
- run: mvn -version
- name: Install Maven modules
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
- name: Java Linter
if: matrix.java >= 17
working-directory: java-showcase
run: |
mvn -B -ntp fmt:check
Expand Down Expand Up @@ -329,7 +330,7 @@ jobs:
cache: maven
- name: Install Maven modules to local Maven repository
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
- name: Validate gapic-generator-java-bom
uses: googleapis/java-cloud-bom/tests/validate-bom@47ad868794c5d38ee7eb95d69371a7a79f84d890
with:
Expand All @@ -352,7 +353,7 @@ jobs:
working-directory: java-shared-dependencies/unmanaged-dependency-check
- name: Install Maven modules
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
- name: Unmanaged dependency check
uses: ./java-shared-dependencies/unmanaged-dependency-check
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# downstream client libraries before they are released.
name: Hermetic library generation upon generation config change through pull requests
on:
pull_request:
# TODO: uncomment this before merging to prevent a formatting regression
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This need to be uncommented now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will uncomment it right after restoring the formatted files. I'll cancel the job once the CIs start.

#pull_request:
workflow_dispatch:

env:
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java_compatibility_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: temurin
cache: maven
- name: Install Maven modules to local Maven repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shared_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
- run: java -version
- name: Install maven modules
run: |
Expand Down
2 changes: 1 addition & 1 deletion api-common-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</configuration>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
3 changes: 1 addition & 2 deletions coverage-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion gapic-generator-java-pom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<relativePath/>
</parent>

Expand Down
3 changes: 1 addition & 2 deletions gapic-generator-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@
</plugin>

<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9.1</version>
</plugin>

<plugin>
Expand Down
2 changes: 1 addition & 1 deletion gax-java/gax-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<relativePath/>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion gax-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"^org.jacoco:",
"^org.codehaus.mojo:",
"^org.sonatype.plugins:",
"^com.coveo:",
"^com.google.cloud:google-cloud-shared-config"
],
"semanticCommitType": "build",
Expand Down
2 changes: 1 addition & 1 deletion java-shared-dependencies/first-party-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<relativePath />
</parent>

Expand Down
2 changes: 1 addition & 1 deletion java-shared-dependencies/upper-bound-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<groupId>com.google.cloud</groupId>
<!-- The shared config has RequireUpperBoundDeps enforcer rule -->
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<relativePath/>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions java-showcase/gapic-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
</executions>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.25</version>
<configuration>
<filesNamePattern>(IT.*\.java)|(.*Test.java)|(TestClientInitializer.java)</filesNamePattern>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion java-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<relativePath/>
</parent>

Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
1 change: 0 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
"/^org.jacoco:/",
"/^org.codehaus.mojo:/",
"/^org.sonatype.plugins:/",
"/^com.coveo:/",
"/^com.google.cloud:google-cloud-shared-config/"
]
},
Expand Down
2 changes: 1 addition & 1 deletion sdk-platform-java-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
</parent>

<properties>
Expand Down
Loading