Skip to content

Commit e22b459

Browse files
diegomarquezpcloud-java-bot
authored andcommitted
chore: update generation config (#3749)
`Empty commit messages, skip creating pull request description.` Fixes #3745 --------- Co-authored-by: cloud-java-bot <[email protected]>
1 parent 3bc7d10 commit e22b459

File tree

7 files changed

+2037
-88
lines changed

7 files changed

+2037
-88
lines changed

.github/scripts/hermetic_library_generation.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -ex
2+
set -exo pipefail
33
# This script should be run at the root of the repository.
44
# This script is used to, when a pull request changes the generation
55
# configuration (generation_config.yaml by default) or Dockerfile:
@@ -106,9 +106,11 @@ if [[ "${showcase_mode}" == "true" ]]; then
106106
fi
107107

108108
# get changed library list.
109-
changed_libraries=$(python hermetic_build/common/cli/get_changed_libraries.py create \
109+
changed_libraries_file="$(mktemp)"
110+
python hermetic_build/common/cli/get_changed_libraries.py create \
110111
--baseline-generation-config-path="${baseline_generation_config}" \
111-
--current-generation-config-path="${generation_config}")
112+
--current-generation-config-path="${generation_config}" | tee "${changed_libraries_file}"
113+
changed_libraries="$(cat "${changed_libraries_file}")"
112114
echo "Changed libraries are: ${changed_libraries:-"No changed library"}."
113115

114116
# run hermetic code generation docker image.

generation_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
googleapis_commitish: 66ab6ceb69178f5368b130949eaf518b7c28352f
1+
googleapis_commitish: c759e924aa786f3df0e64499daf97d46a27edb31
22
# the libraries are ordered with respect to library name, which is
33
# java-{library.library_name} or java-{library.api-shortname} when
44
# library.library_name is not defined.

hermetic_build/common/cli/get_changed_libraries.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
import os
1514

16-
import click as click
15+
# Setup logging
16+
import logging
17+
import sys
18+
19+
logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
20+
21+
import os
22+
import click
1723

1824
from common.model.generation_config import GenerationConfig
1925
from common.utils.generation_config_comparator import compare_config

hermetic_build/common/model/config_change.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ def get_qualified_commits(
106106
:return: QualifiedCommit objects.
107107
"""
108108
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
109-
# we only need commit history, thus a shadow clone is enough.
110-
repo = Repo.clone_from(url=repo_url, to_path=tmp_dir, filter=["blob:none"])
109+
# We include blobs to avoid unexpected missing git objects when computing
110+
# a diff.
111+
# See https://github.com/googleapis/sdk-platform-java/issues/3745
112+
repo = Repo.clone_from(url=repo_url, to_path=tmp_dir)
111113
commit = repo.commit(self.current_config.googleapis_commitish)
112114
proto_paths = self.current_config.get_proto_path_to_library_name()
113115
qualified_commits = []

java-common-protos/proto-google-common-protos/src/main/java/com/google/rpc/ErrorDetailsProto.java

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
5252
internal_static_google_rpc_QuotaFailure_Violation_descriptor;
5353
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
5454
internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable;
55+
static final com.google.protobuf.Descriptors.Descriptor
56+
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor;
57+
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
58+
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_fieldAccessorTable;
5559
static final com.google.protobuf.Descriptors.Descriptor
5660
internal_static_google_rpc_PreconditionFailure_descriptor;
5761
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -111,12 +115,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
111115
+ "\013retry_delay\030\001 \001(\0132\031.google.protobuf.Duration\"2\n"
112116
+ "\tDebugInfo\022\025\n\r"
113117
+ "stack_entries\030\001 \003(\t\022\016\n"
114-
+ "\006detail\030\002 \001(\t\"y\n"
118+
+ "\006detail\030\002 \001(\t\"\217\003\n"
115119
+ "\014QuotaFailure\0226\n\n"
116-
+ "violations\030\001 \003(\0132\".google.rpc.QuotaFailure.Violation\0321\n"
120+
+ "violations\030\001 \003(\0132\".google.rpc.QuotaFailure.Violation\032\306\002\n"
117121
+ "\tViolation\022\017\n"
118122
+ "\007subject\030\001 \001(\t\022\023\n"
119-
+ "\013description\030\002 \001(\t\"\225\001\n"
123+
+ "\013description\030\002 \001(\t\022\023\n"
124+
+ "\013api_service\030\003 \001(\t\022\024\n"
125+
+ "\014quota_metric\030\004 \001(\t\022\020\n"
126+
+ "\010quota_id\030\005 \001(\t\022Q\n"
127+
+ "\020quota_dimensions\030\006 \003(\01327.google"
128+
+ ".rpc.QuotaFailure.Violation.QuotaDimensionsEntry\022\023\n"
129+
+ "\013quota_value\030\007 \001(\003\022\037\n"
130+
+ "\022future_quota_value\030\010 \001(\003H\000\210\001\001\0326\n"
131+
+ "\024QuotaDimensionsEntry\022\013\n"
132+
+ "\003key\030\001 \001(\t\022\r\n"
133+
+ "\005value\030\002 \001(\t:\0028\001B\025\n"
134+
+ "\023_future_quota_value\"\225\001\n"
120135
+ "\023PreconditionFailure\022=\n\n"
121136
+ "violations\030\001 \003(\0132).google.rpc.PreconditionFailure.Violation\032?\n"
122137
+ "\tViolation\022\014\n"
@@ -134,8 +149,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
134149
+ "request_id\030\001 \001(\t\022\024\n"
135150
+ "\014serving_data\030\002 \001(\t\"`\n"
136151
+ "\014ResourceInfo\022\025\n\r"
137-
+ "resource_type\030\001 \001(\t\022\025\n"
138-
+ "\r"
152+
+ "resource_type\030\001 \001(\t\022\025\n\r"
139153
+ "resource_name\030\002 \001(\t\022\r\n"
140154
+ "\005owner\030\003 \001(\t\022\023\n"
141155
+ "\013description\030\004 \001(\t\"V\n"
@@ -147,9 +161,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
147161
+ "\020LocalizedMessage\022\016\n"
148162
+ "\006locale\030\001 \001(\t\022\017\n"
149163
+ "\007message\030\002 \001(\tBl\n"
150-
+ "\016com.google.rpcB\021ErrorDetailsProtoP\001Z?go"
151-
+ "ogle.golang.org/genproto/googleapis/rpc/"
152-
+ "errdetails;errdetails\242\002\003RPCb\006proto3"
164+
+ "\016com.google.rpcB\021ErrorDetailsProtoP\001Z?goo"
165+
+ "gle.golang.org/genproto/googleapis/rpc/errdetails;errdetails\242\002\003RPCb\006proto3"
153166
};
154167
descriptor =
155168
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -199,7 +212,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
199212
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
200213
internal_static_google_rpc_QuotaFailure_Violation_descriptor,
201214
new java.lang.String[] {
202-
"Subject", "Description",
215+
"Subject",
216+
"Description",
217+
"ApiService",
218+
"QuotaMetric",
219+
"QuotaId",
220+
"QuotaDimensions",
221+
"QuotaValue",
222+
"FutureQuotaValue",
223+
});
224+
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor =
225+
internal_static_google_rpc_QuotaFailure_Violation_descriptor.getNestedTypes().get(0);
226+
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_fieldAccessorTable =
227+
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
228+
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor,
229+
new java.lang.String[] {
230+
"Key", "Value",
203231
});
204232
internal_static_google_rpc_PreconditionFailure_descriptor =
205233
getDescriptor().getMessageTypes().get(4);

0 commit comments

Comments
 (0)