Skip to content

Commit b0db481

Browse files
committed
manual changes
fix dependency-compatibility test restore generation_config use hermetic image snapshot update docker path test without airlock restore airlock
1 parent e0fbdc8 commit b0db481

Some content is hidden

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

41 files changed

+216
-301
lines changed

.github/workflows/ci.yaml

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,69 @@ jobs:
4141
with:
4242
path: ~/.m2/repository
4343
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
44+
# - name: Install sdk-platform modules
45+
# run: |
46+
# mvn test \
47+
# -B -ntp \
48+
# -Dorg.slf4j.simpleLogger.showDateTime=true \
49+
# -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
50+
# -Dclirr.skip=true \
51+
# -Denforcer.skip=true \
52+
# -Dcheckstyle.skip=true \
53+
# -Dflatten.skip=true \
54+
# -Danimal.sniffer.skip=true \
55+
# -Dmaven.wagon.http.retryHandler.count=5 \
56+
# -T 1C
57+
# working-directory: sdk-platform-java
4458
- run: .kokoro/build.sh
4559
env:
4660
JOB_TYPE: test
4761
JOB_NAME: units-${{matrix.java}}
62+
units-8-runtime:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Get current week within the year
66+
id: date
67+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
68+
- uses: actions/checkout@v4
69+
- uses: actions/setup-java@v4
70+
with:
71+
java-version: 11
72+
distribution: temurin
73+
cache: maven
74+
- run: java -version
75+
- uses: actions/cache@v4
76+
id: mvn-cache
77+
with:
78+
path: ~/.m2/repository
79+
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
80+
- name: Install all modules using Java 11
81+
shell: bash
82+
run: |
83+
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip -Dclirr.skip -Denforcer.skip -Dcheckstyle.skip -Dflatten.skip -Danimal-sniffer.skip -Djacoco.skip
84+
working-directory: sdk-platform-java
85+
- uses: actions/setup-java@v4
86+
with:
87+
java-version: 8
88+
distribution: temurin
89+
- run: java -version
90+
- name: Run tests in Java 8 with the source compiled in Java 11
91+
run: |
92+
mvn test \
93+
-B -ntp \
94+
-Dorg.slf4j.simpleLogger.showDateTime=true \
95+
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
96+
-Dclirr.skip=true \
97+
-Denforcer.skip=true \
98+
-Dcheckstyle.skip=true \
99+
-Dflatten.skip=true \
100+
-Danimal.sniffer.skip=true \
101+
-Dmaven.wagon.http.retryHandler.count=5 \
102+
-T 1C
103+
env:
104+
JOB_TYPE: test
105+
JOB_NAME: units-8-runtime-${{matrix.java}}
106+
working-directory: sdk-platform-java
48107
windows:
49108
runs-on: windows-latest
50109
steps:
@@ -92,7 +151,18 @@ jobs:
92151
- run: java -version
93152
- name: Install Maven modules to local Maven repository
94153
run: |
95-
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip
154+
mvn install \
155+
-B -ntp \
156+
-Dorg.slf4j.simpleLogger.showDateTime=true \
157+
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
158+
-DskipTests \
159+
-Dclirr.skip=true \
160+
-Denforcer.skip=true \
161+
-Dcheckstyle.skip=true \
162+
-Dflatten.skip=true \
163+
-Danimal.sniffer.skip=true \
164+
-Dmaven.wagon.http.retryHandler.count=5 \
165+
-T 1C
96166
- run: java -version
97167
- run: mvn -B -ntp enforcer:enforce@enforce -T 1C
98168
gapic-libraries-bom:
@@ -104,6 +174,10 @@ jobs:
104174
java-version: 11
105175
distribution: temurin
106176
cache: maven
177+
- name: Install sdk-platform-modules to local Maven repository
178+
run: |
179+
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip
180+
working-directory: sdk-platform-java
107181
- name: Install Maven modules to local Maven repository
108182
run: |
109183
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip

.github/workflows/generated_files_sync.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
pull_request:
1818
name: generation diff
1919
env:
20-
library_generation_image_tag: 2.67.0
20+
library_generation_image_tag: 2.67.1-SNAPSHOT
2121
jobs:
2222
root-pom:
2323
# root pom.xml does not have diff from generated one
@@ -164,12 +164,15 @@ jobs:
164164
165165
# java/com/google : This is the standard package
166166
# samples : Samples are not shipped as a library
167+
# test : test classes are not shipped as a library
167168
# grafeas : java-grafeas is known to have special package name
168169
# cloud-build v2 : java_package was not configured when we published
169170
# the Cloud Build V2 client library
170171
# the rest : the same as above
171172
invalid_files=$(find . -name '*.java' \
172173
|grep --invert-match 'java/com/google' \
174+
|grep --invert-match '/test/' \
175+
|grep --invert-match '/tests/' \
173176
|grep --invert-match samples \
174177
|grep --invert-match grafeas \
175178
|grep --invert-match 'cloud-build.*v2' \

.github/workflows/hermetic_library_generation.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
40-
- uses: googleapis/sdk-platform-java/.github/scripts@v2.67.0
40+
- uses: ./sdk-platform-java/.github/scripts
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
base_ref: ${{ github.base_ref }}
4444
head_ref: ${{ github.head_ref }}
4545
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
46+
image_tag: 2.67.1-SNAPSHOT

.github/workflows/sdk-platform-java-ci.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ on:
33
branches:
44
- main
55
pull_request:
6-
name: sdk-platform-java ci
7-
env:
8-
BUILD_SUBDIR: sdk-platform-java
6+
name: sdk-platform-java-ci
7+
working-directory: sdk-platform-java
98
jobs:
109
filter:
1110
runs-on: ubuntu-latest
@@ -25,7 +24,7 @@ jobs:
2524
runs-on: ubuntu-22.04
2625
strategy:
2726
matrix:
28-
java: [ 11, 17]
27+
java: [ 11, 17 ]
2928
steps:
3029
- uses: actions/checkout@v4
3130
- uses: actions/setup-java@v4

.github/workflows/sdk-platform-java-dependency_compatibility_test.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,23 @@ jobs:
5555
shell: bash
5656
run: |
5757
if [[ -n "${{ env.DEPENDENCIES_LIST }}" ]]; then
58-
./.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
58+
.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
5959
else
60-
./.github/scripts/test_dependency_compatibility.sh
60+
.github/scripts/test_dependency_compatibility.sh
6161
fi
62+
working-directory: sdk-platform-java
6263

6364
# Install the modules for showcase (Shared-Deps is required to run showcase)
6465
- name: Install sdk-platform-java's modules
6566
# gapic-generator-java requires Java 8 and is irrelevant for this CI
6667
run: mvn -q -B -ntp install --projects '!gapic-generator-java' -Dcheckstyle.skip -Dfmt.skip -DskipTests -Dclirr.skip -T 1C
68+
working-directory: sdk-platform-java
6769

6870
# Set up local showcase server to run the showcase ITs
6971
- name: Parse showcase version
70-
working-directory: java-showcase/gapic-showcase
72+
working-directory: sdk-plaform-java/java-showcase/gapic-showcase
7173
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
74+
working-directory: sdk-platform-java
7275
- name: Install showcase server
7376
run: |
7477
sudo mkdir -p /usr/src/showcase
@@ -78,15 +81,16 @@ jobs:
7881
tar -xf showcase-*
7982
./gapic-showcase run &
8083
cd -
84+
working-directory: sdk-platform-java
8185

8286
# Run Showcase's Integration Tests
8387
- name: Perform Dependency Compatibility Integration Testing (Showcase Tests)
8488
shell: bash
8589
# Need to cd out of the directory to get the scripts as this step is run inside the java-showcase directory
8690
run: |
8791
if [[ -n "${{ env.DEPENDENCIES_LIST }}" ]]; then
88-
../.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
92+
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
8993
else
90-
../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
94+
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
9195
fi
92-
working-directory: java-showcase
96+
working-directory: sdk-platform-java/java-showcase

.github/workflows/sdk-platform-java-downstream.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
repo:
34-
- google-cloud-java
3534
- java-bigtable
3635
- java-bigquery
3736
- java-firestore
@@ -53,9 +52,9 @@ jobs:
5352
sudo apt-get update
5453
sudo apt-get -y install libxml2-utils
5554
- name: Test helper scripts
56-
run: ./.kokoro/presubmit/common_test.sh
55+
run: ./sdk-platform-java/.kokoro/presubmit/common_test.sh
5756
- name: Perform downstream compatibility testing
58-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" ./.kokoro/presubmit/downstream-compatibility.sh
57+
run: REPOS_UNDER_TEST="${{ matrix.repo }}" ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility.sh
5958
downstream-compatibility-spring-generator:
6059
needs: filter
6160
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -74,4 +73,4 @@ jobs:
7473
sudo apt-get update
7574
sudo apt-get -y install libxml2-utils
7675
- name: Perform downstream compatibility testing
77-
run: ./.kokoro/presubmit/downstream-compatibility-spring.sh
76+
run: ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility-spring.sh

.github/workflows/sdk-platform-java-downstream_protobuf_compatibility_check_nightly.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ jobs:
4444
- google-cloud-java
4545
- java-bigtable
4646
- java-bigquery
47-
- java-bigquerystorage
48-
- java-datastore
4947
- java-firestore
50-
- java-logging
51-
- java-logging-logback
5248
- java-pubsub
5349
- java-pubsublite
5450
- java-spanner-jdbc

.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
- main
55
pull_request:
66
paths:
7-
- .github/workflows/downstream_unmanaged_dependency_check.yaml
8-
- java-shared-dependencies/**
7+
- .github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml
8+
- sdk-platform-java/java-shared-dependencies/**
99

1010
name: sdk-platform-java Downstream Unmanaged Dependency Check
1111
env:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Checkout sdk-platform-java
3939
uses: actions/checkout@v3
4040
with:
41-
path: sdk-platform-java
41+
path: google-cloud-java
4242
- name: Checkout the downstream repo
4343
uses: actions/checkout@v4
4444
with:
@@ -57,17 +57,19 @@ jobs:
5757
cache: maven
5858
- name: Install the modules of sdk-platform-java
5959
shell: bash
60-
working-directory: sdk-platform-java
60+
working-directory: google-cloud-java/sdk-platform-java
6161
run: |
6262
set -euo pipefail
6363
# gapic-generator-java is irrelevant
64-
mvn -q -B -ntp install --projects '!gapic-generator-java' \
64+
mvn -q -B -ntp install \
6565
-Dcheckstyle.skip -Dfmt.skip -DskipTests -T 1C
6666
- name: Build unmanaged dependency check
6767
shell: bash
68-
working-directory: sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
68+
working-directory: google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
6969
run: |
7070
set -euo pipefail
71+
pwd
72+
pwd
7173
echo "Install Unmanaged Dependency Check in $(pwd)"
7274
mvn clean install -V --batch-mode --no-transfer-progress -DskipTests
7375
- name: Install the modules of the downstream repository
@@ -85,7 +87,7 @@ jobs:
8587
# BOM to list the artifacts generated by that repository.
8688
bom_dir=$(find ${{ matrix.repo }} -type d -name 'google-*-bom' ! -name '*-deps-bom')
8789
bom_absolute_path=$(realpath "${bom_dir}/pom.xml")
88-
cd sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
90+
cd google-cloud-java/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
8991
echo "Running Unmanaged Dependency Check against ${bom_absolute_path}"
9092
unmanaged_dependencies=$(mvn exec:java -Dexec.args="../pom.xml ${bom_absolute_path}" -q)
9193
if [[ "${unmanaged_dependencies}" != "[]" ]]; then

.github/workflows/sdk-platform-java-java_compatibility_check.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ jobs:
4242
java-version: 17
4343
distribution: temurin
4444
cache: maven
45-
- name: Install Maven modules to local Maven repository
45+
- name: Install sdk-platform-modules to local Maven repository
4646
run: |
4747
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip
48+
working-directory: sdk-platform-java
4849
- name: Check Java 8 compatibility for class files
4950
shell: bash
5051
run: |
@@ -60,3 +61,4 @@ jobs:
6061
fi
6162
done
6263
echo "All class files are compatible with Java 8."
64+
working-directory: sdk-platform-java

.github/workflows/sdk-platform-java-shared_dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
4242
- name: Check the BOM content satisfies the upper-bound-check test case
4343
run: mvn -B -V -ntp verify -Dcheckstyle.skip
44-
working-directory: java-shared-dependencies/upper-bound-check
44+
working-directory: sdk-plaform-java/java-shared-dependencies/upper-bound-check

0 commit comments

Comments
 (0)