Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions .github/scripts/hermetic_library_generation.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
set -exo pipefail
# This script should be run at the root of the repository.
# This script is used to, when a pull request changes the generation
# configuration (generation_config.yaml by default) or Dockerfile:
Expand Down Expand Up @@ -106,9 +106,11 @@ if [[ "${showcase_mode}" == "true" ]]; then
fi

# get changed library list.
changed_libraries=$(python hermetic_build/common/cli/get_changed_libraries.py create \
changed_libraries_file="$(mktemp)"
python hermetic_build/common/cli/get_changed_libraries.py create \
--baseline-generation-config-path="${baseline_generation_config}" \
--current-generation-config-path="${generation_config}")
--current-generation-config-path="${generation_config}" | tee "${changed_libraries_file}"
changed_libraries="$(cat "${changed_libraries_file}")"
echo "Changed libraries are: ${changed_libraries:-"No changed library"}."
Copy link
Member

Choose a reason for hiding this comment

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

I suspect this double quotations included in double quotations. Check this before submitting this.

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 surrounded the whole variable with double quotes now.


# run hermetic code generation docker image.
Expand Down
2 changes: 1 addition & 1 deletion generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
googleapis_commitish: 66ab6ceb69178f5368b130949eaf518b7c28352f
googleapis_commitish: c759e924aa786f3df0e64499daf97d46a27edb31
# the libraries are ordered with respect to library name, which is
# java-{library.library_name} or java-{library.api-shortname} when
# library.library_name is not defined.
Expand Down
10 changes: 8 additions & 2 deletions hermetic_build/common/cli/get_changed_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os

import click as click
# Setup logging
import logging
import sys

logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)

import os
import click

from common.model.generation_config import GenerationConfig
from common.utils.generation_config_comparator import compare_config
Expand Down
6 changes: 4 additions & 2 deletions hermetic_build/common/model/config_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ def get_qualified_commits(
:return: QualifiedCommit objects.
"""
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
# we only need commit history, thus a shadow clone is enough.
repo = Repo.clone_from(url=repo_url, to_path=tmp_dir, filter=["blob:none"])
# We include blobs to avoid unexpected missing git objects when computing
# a diff.
# See https://github.com/googleapis/sdk-platform-java/issues/3745
repo = Repo.clone_from(url=repo_url, to_path=tmp_dir)
commit = repo.commit(self.current_config.googleapis_commitish)
proto_paths = self.current_config.get_proto_path_to_library_name()
qualified_commits = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_rpc_QuotaFailure_Violation_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_rpc_PreconditionFailure_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
Expand Down Expand Up @@ -111,12 +115,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\013retry_delay\030\001 \001(\0132\031.google.protobuf.Duration\"2\n"
+ "\tDebugInfo\022\025\n\r"
+ "stack_entries\030\001 \003(\t\022\016\n"
+ "\006detail\030\002 \001(\t\"y\n"
+ "\006detail\030\002 \001(\t\"\217\003\n"
+ "\014QuotaFailure\0226\n\n"
+ "violations\030\001 \003(\0132\".google.rpc.QuotaFailure.Violation\0321\n"
+ "violations\030\001 \003(\0132\".google.rpc.QuotaFailure.Violation\032\306\002\n"
+ "\tViolation\022\017\n"
+ "\007subject\030\001 \001(\t\022\023\n"
+ "\013description\030\002 \001(\t\"\225\001\n"
+ "\013description\030\002 \001(\t\022\023\n"
+ "\013api_service\030\003 \001(\t\022\024\n"
+ "\014quota_metric\030\004 \001(\t\022\020\n"
+ "\010quota_id\030\005 \001(\t\022Q\n"
+ "\020quota_dimensions\030\006 \003(\01327.google"
+ ".rpc.QuotaFailure.Violation.QuotaDimensionsEntry\022\023\n"
+ "\013quota_value\030\007 \001(\003\022\037\n"
+ "\022future_quota_value\030\010 \001(\003H\000\210\001\001\0326\n"
+ "\024QuotaDimensionsEntry\022\013\n"
+ "\003key\030\001 \001(\t\022\r\n"
+ "\005value\030\002 \001(\t:\0028\001B\025\n"
+ "\023_future_quota_value\"\225\001\n"
+ "\023PreconditionFailure\022=\n\n"
+ "violations\030\001 \003(\0132).google.rpc.PreconditionFailure.Violation\032?\n"
+ "\tViolation\022\014\n"
Expand All @@ -134,8 +149,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "request_id\030\001 \001(\t\022\024\n"
+ "\014serving_data\030\002 \001(\t\"`\n"
+ "\014ResourceInfo\022\025\n\r"
+ "resource_type\030\001 \001(\t\022\025\n"
+ "\r"
+ "resource_type\030\001 \001(\t\022\025\n\r"
+ "resource_name\030\002 \001(\t\022\r\n"
+ "\005owner\030\003 \001(\t\022\023\n"
+ "\013description\030\004 \001(\t\"V\n"
Expand All @@ -147,9 +161,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\020LocalizedMessage\022\016\n"
+ "\006locale\030\001 \001(\t\022\017\n"
+ "\007message\030\002 \001(\tBl\n"
+ "\016com.google.rpcB\021ErrorDetailsProtoP\001Z?go"
+ "ogle.golang.org/genproto/googleapis/rpc/"
+ "errdetails;errdetails\242\002\003RPCb\006proto3"
+ "\016com.google.rpcB\021ErrorDetailsProtoP\001Z?goo"
+ "gle.golang.org/genproto/googleapis/rpc/errdetails;errdetails\242\002\003RPCb\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down Expand Up @@ -199,7 +212,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_rpc_QuotaFailure_Violation_descriptor,
new java.lang.String[] {
"Subject", "Description",
"Subject",
"Description",
"ApiService",
"QuotaMetric",
"QuotaId",
"QuotaDimensions",
"QuotaValue",
"FutureQuotaValue",
});
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor =
internal_static_google_rpc_QuotaFailure_Violation_descriptor.getNestedTypes().get(0);
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_rpc_QuotaFailure_Violation_QuotaDimensionsEntry_descriptor,
new java.lang.String[] {
"Key", "Value",
});
internal_static_google_rpc_PreconditionFailure_descriptor =
getDescriptor().getMessageTypes().get(4);
Expand Down
Loading
Loading