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

Commit

Permalink
deps: test building with newer library version (#453)
Browse files Browse the repository at this point in the history
'No need to review.'
  • Loading branch information
mpeddada1 committed Oct 10, 2022
1 parent d232131 commit 6800fd0
Show file tree
Hide file tree
Showing 102 changed files with 8,156 additions and 11,456 deletions.
117 changes: 63 additions & 54 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,78 +1,87 @@
'on':
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
# Github action job to test core java library features on
# downstream client libraries before they are released.
on:
push:
branches:
- 2.8.x
pull_request: null
- main
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- 8
- 11
- 17
java: [8, 11, 17]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.bat
env:
JOB_TYPE: test
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.bat
env:
JOB_TYPE: test
dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
java:
- 8
- 11
- 17
java: [8, 11, 17]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
clirr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<github.global.server>github</github.global.server>
<site.installationModule>google-iam-parent</site.installationModule>
<protobuf.version>3.19.4</protobuf.version>
<protobuf.version>3.19.6</protobuf.version>
<junit.version>4.13.2</junit.version>
<grpc.version>1.45.1</grpc.version>
<grpc.version>1.45.2</grpc.version>
<guava.version>31.0.1-android</guava.version>
</properties>

Expand Down
110 changes: 45 additions & 65 deletions proto-google-common-protos/src/main/java/com/google/api/Advice.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,50 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}

private Advice(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18:
{
java.lang.String s = input.readStringRequireUtf8();

description_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}

public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_descriptor;
}
Expand Down Expand Up @@ -177,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
unknownFields.writeTo(output);
getUnknownFields().writeTo(output);
}

@java.lang.Override
Expand All @@ -189,7 +145,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
size += unknownFields.getSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
Expand All @@ -205,7 +161,7 @@ public boolean equals(final java.lang.Object obj) {
com.google.api.Advice other = (com.google.api.Advice) obj;

if (!getDescription().equals(other.getDescription())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}

Expand All @@ -218,7 +174,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
Expand Down Expand Up @@ -344,17 +300,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}

// Construct using com.google.api.Advice.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder() {}

private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}

private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}

@java.lang.Override
Expand Down Expand Up @@ -441,7 +390,7 @@ public Builder mergeFrom(com.google.api.Advice other) {
description_ = other.description_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
Expand All @@ -456,17 +405,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Advice parsedMessage = null;
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18:
{
description_ = input.readStringRequireUtf8();

break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Advice) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
onChanged();
} // finally
return this;
}

Expand Down Expand Up @@ -613,7 +582,18 @@ public Advice parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Advice(input, extensionRegistry);
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};

Expand Down
Loading

0 comments on commit 6800fd0

Please sign in to comment.