Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 59f79a1

Browse files
yoshi-automationchingor13
authored andcommitted
feat: regenerate client - add BigQueryDestination (#12)
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * fix: allow protobuf interface changes
1 parent 579b6c6 commit 59f79a1

25 files changed

Lines changed: 2238 additions & 215 deletions

.kokoro/build.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ echo ${JOB_TYPE}
2626

2727
mvn install -B -V \
2828
-DskipTests=true \
29+
-Dclirr.skip=true \
2930
-Dmaven.javadoc.skip=true \
3031
-Dgcloud.download.skip=true \
3132
-T 1C
@@ -37,8 +38,9 @@ fi
3738

3839
case ${JOB_TYPE} in
3940
test)
40-
mvn test -B
41+
mvn test -B -Dclirr.skip=true
4142
bash ${KOKORO_GFILE_DIR}/codecov.sh
43+
bash .kokoro/coerce_logs.sh
4244
;;
4345
lint)
4446
mvn com.coveo:fmt-maven-plugin:check
@@ -47,7 +49,11 @@ javadoc)
4749
mvn javadoc:javadoc javadoc:test-javadoc
4850
;;
4951
integration)
50-
mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify
52+
mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify
53+
bash .kokoro/coerce_logs.sh
54+
;;
55+
clirr)
56+
mvn -B clirr:check
5157
;;
5258
*)
5359
;;

.kokoro/coerce_logs.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
# Copyright 2019 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# This script finds and moves sponge logs so that they can be found by placer
17+
# and are not flagged as flaky by sponge.
18+
19+
set -eo pipefail
20+
21+
## Get the directory of the build script
22+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
23+
## cd to the parent directory, i.e. the root of the git repo
24+
cd ${scriptDir}/..
25+
26+
job=$(basename ${KOKORO_JOB_NAME})
27+
28+
echo "coercing sponge logs..."
29+
for xml in `find . -name *-sponge_log.xml`
30+
do
31+
echo "processing ${xml}"
32+
class=$(basename ${xml} | cut -d- -f2)
33+
dir=$(dirname ${xml})/${job}/${class}
34+
text=$(dirname ${xml})/${class}-sponge_log.txt
35+
mkdir -p ${dir}
36+
mv ${xml} ${dir}/sponge_log.xml
37+
mv ${text} ${dir}/sponge_log.txt
38+
done

.kokoro/continuous/common.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
action {
55
define_artifacts {
66
regex: "**/*sponge_log.xml"
7+
regex: "**/*sponge_log.txt"
78
}
89
}
910

.kokoro/nightly/common.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
action {
55
define_artifacts {
66
regex: "**/*sponge_log.xml"
7+
regex: "**/*sponge_log.txt"
78
}
89
}
910

.kokoro/presubmit/clirr.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
5+
env_vars: {
6+
key: "TRAMPOLINE_IMAGE"
7+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
8+
}
9+
10+
env_vars: {
11+
key: "JOB_TYPE"
12+
value: "clirr"
13+
}

.kokoro/presubmit/common.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
action {
55
define_artifacts {
66
regex: "**/*sponge_log.xml"
7+
regex: "**/*sponge_log.txt"
78
}
89
}
910

.kokoro/release/snapshot.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ source $(dirname "$0")/common.sh
1919
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
2020
pushd $(dirname "$0")/../../
2121

22+
# ensure we're trying to push a snapshot (no-result returns non-zero exit code)
23+
grep SNAPSHOT versions.txt
24+
2225
setup_environment_secrets
2326
create_settings_xml_file "settings.xml"
2427

@@ -27,4 +30,4 @@ mvn clean install deploy -B \
2730
-DperformRelease=true \
2831
-Dgpg.executable=gpg \
2932
-Dgpg.passphrase=${GPG_PASSPHRASE} \
30-
-Dgpg.homedir=${GPG_HOMEDIR}
33+
-Dgpg.homedir=${GPG_HOMEDIR}

.kokoro/release/stage.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ create_settings_xml_file "settings.xml"
2828

2929
mvn clean install deploy -B \
3030
--settings ${MAVEN_SETTINGS_FILE} \
31+
-DskipTests=true \
3132
-DperformRelease=true \
3233
-Dgpg.executable=gpg \
3334
-Dgpg.passphrase=${GPG_PASSPHRASE} \
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
<differences>
4+
<difference>
5+
<differenceType>7012</differenceType>
6+
<className>com/google/cloud/asset/v1/*OrBuilder</className>
7+
<method>* get*(*)</method>
8+
</difference>
9+
<difference>
10+
<differenceType>7012</differenceType>
11+
<className>com/google/cloud/asset/v1/*OrBuilder</className>
12+
<method>boolean contains*(*)</method>
13+
</difference>
14+
<difference>
15+
<differenceType>7012</differenceType>
16+
<className>com/google/cloud/asset/v1/*OrBuilder</className>
17+
<method>boolean has*(*)</method>
18+
</difference>
19+
</differences>

proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
5454
java.lang.String[] descriptorData = {
5555
"\n\"google/cloud/asset/v1/assets.proto\022\025go"
5656
+ "ogle.cloud.asset.v1\032\034google/api/annotati"
57-
+ "ons.proto\032\032google/iam/v1/policy.proto\032\031g"
58-
+ "oogle/protobuf/any.proto\032\034google/protobu"
59-
+ "f/struct.proto\032\037google/protobuf/timestam"
60-
+ "p.proto\"\200\001\n\rTemporalAsset\0221\n\006window\030\001 \001("
61-
+ "\0132!.google.cloud.asset.v1.TimeWindow\022\017\n\007"
62-
+ "deleted\030\002 \001(\010\022+\n\005asset\030\003 \001(\0132\034.google.cl"
63-
+ "oud.asset.v1.Asset\"j\n\nTimeWindow\022.\n\nstar"
64-
+ "t_time\030\001 \001(\0132\032.google.protobuf.Timestamp"
65-
+ "\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf.Tim"
66-
+ "estamp\"\207\001\n\005Asset\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_"
67-
+ "type\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.cl"
68-
+ "oud.asset.v1.Resource\022)\n\niam_policy\030\004 \001("
69-
+ "\0132\025.google.iam.v1.Policy\"\240\001\n\010Resource\022\017\n"
70-
+ "\007version\030\001 \001(\t\022\036\n\026discovery_document_uri"
71-
+ "\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resour"
72-
+ "ce_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001"
73-
+ "(\0132\027.google.protobuf.StructB\225\001\n\031com.goog"
74-
+ "le.cloud.asset.v1B\nAssetProtoP\001Z:google."
75-
+ "golang.org/genproto/googleapis/cloud/ass"
76-
+ "et/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Go"
77-
+ "ogle\\Cloud\\Asset\\V1b\006proto3"
57+
+ "ons.proto\032\031google/api/resource.proto\032\032go"
58+
+ "ogle/iam/v1/policy.proto\032\031google/protobu"
59+
+ "f/any.proto\032\034google/protobuf/struct.prot"
60+
+ "o\032\037google/protobuf/timestamp.proto\"\200\001\n\rT"
61+
+ "emporalAsset\0221\n\006window\030\001 \001(\0132!.google.cl"
62+
+ "oud.asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010"
63+
+ "\022+\n\005asset\030\003 \001(\0132\034.google.cloud.asset.v1."
64+
+ "Asset\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(\0132"
65+
+ "\032.google.protobuf.Timestamp\022,\n\010end_time\030"
66+
+ "\002 \001(\0132\032.google.protobuf.Timestamp\"\260\001\n\005As"
67+
+ "set\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0221\n"
68+
+ "\010resource\030\003 \001(\0132\037.google.cloud.asset.v1."
69+
+ "Resource\022)\n\niam_policy\030\004 \001(\0132\025.google.ia"
70+
+ "m.v1.Policy:\'\352A$\n\037cloudasset.googleapis."
71+
+ "com/Asset\022\001*\"\240\001\n\010Resource\022\017\n\007version\030\001 \001"
72+
+ "(\t\022\036\n\026discovery_document_uri\030\002 \001(\t\022\026\n\016di"
73+
+ "scovery_name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t"
74+
+ "\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google."
75+
+ "protobuf.StructB\230\001\n\031com.google.cloud.ass"
76+
+ "et.v1B\nAssetProtoP\001Z:google.golang.org/g"
77+
+ "enproto/googleapis/cloud/asset/v1;asset\370"
78+
+ "\001\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Clou"
79+
+ "d\\Asset\\V1b\006proto3"
7880
};
7981
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
8082
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -88,6 +90,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
8890
descriptorData,
8991
new com.google.protobuf.Descriptors.FileDescriptor[] {
9092
com.google.api.AnnotationsProto.getDescriptor(),
93+
com.google.api.ResourceProto.getDescriptor(),
9194
com.google.iam.v1.PolicyProto.getDescriptor(),
9295
com.google.protobuf.AnyProto.getDescriptor(),
9396
com.google.protobuf.StructProto.getDescriptor(),
@@ -126,7 +129,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
126129
new java.lang.String[] {
127130
"Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data",
128131
});
132+
com.google.protobuf.ExtensionRegistry registry =
133+
com.google.protobuf.ExtensionRegistry.newInstance();
134+
registry.add(com.google.api.ResourceProto.resource);
135+
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
136+
descriptor, registry);
129137
com.google.api.AnnotationsProto.getDescriptor();
138+
com.google.api.ResourceProto.getDescriptor();
130139
com.google.iam.v1.PolicyProto.getDescriptor();
131140
com.google.protobuf.AnyProto.getDescriptor();
132141
com.google.protobuf.StructProto.getDescriptor();

0 commit comments

Comments
 (0)