Skip to content

Commit 28bf7ca

Browse files
committed
Merge branch 'master' into autosynth-monitoring
2 parents d43a2e6 + d122744 commit 28bf7ca

71 files changed

Lines changed: 428 additions & 381 deletions

File tree

Some content is hidden

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

.kokoro/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=tr
2525

2626
# prepend Kokoro root directory onto GOOGLE_APPLICATION_CREDENTIALS path
2727
if [ ! -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
28-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}
28+
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
2929
fi
3030

3131
case $JOB_TYPE in
@@ -40,7 +40,7 @@ javadoc)
4040
mvn javadoc:javadoc javadoc:test-javadoc
4141
;;
4242
integration)
43-
./utilities/verify_single_it.sh $INTEGRATION_TEST_ARGS
43+
mvn -B -pl ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify
4444
;;
4545
*)
4646
;;

README.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -320,45 +320,6 @@ a higher priority.
320320
are more likely to get backwards-incompatible updates. Additionally, it's possible for Alpha
321321
libraries to get deprecated and deleted before ever being promoted to Beta or GA.
322322
323-
Old Version Combinations
324-
------------------
325-
326-
If you are having compatbility problems with google-cloud prior to version 0.32.0-alpha, use the
327-
following table as a reference to make sure that your versions are compatible. Definitions:
328-
329-
* **alpha**: The version of any alpha package in google-cloud
330-
* **beta**: The version of any beta package in google-cloud
331-
* **GA**: The version of any GA package in google-cloud
332-
* **gax**: The version of com.google.api:gax
333-
* **gax-grpc**: The version of com.google.api:gax-grpc
334-
335-
Something to be aware of is that a package can be promoted from alpha -> beta or beta -> GA between versions, which
336-
means that after a certain point for any given package, the alpha or beta version won't be valid any more.
337-
338-
alpha | beta | GA | gax | gax-grpc
339-
------------- | ------------ | ---------- | ---------- | --------
340-
0.30.0-alpha | 0.30.0-beta | 1.12.0 | 1.15.0 | 1.15.0
341-
0.29.0-alpha | 0.29.0-beta | 1.11.0 | 1.15.0 | 1.15.0
342-
0.28.0-alpha | 0.28.0-beta | 1.10.0 | 1.14.0 | 1.14.0
343-
0.27.0-alpha | 0.27.0-beta | 1.9.0 | 1.13.0 | 0.30.0
344-
0.26.0-alpha | 0.26.0-beta | 1.8.0 | 1.9.0 | 0.26.0
345-
0.25.0-alpha | 0.25.0-beta | 1.7.0 | 1.8.1 | 0.25.1
346-
0.24.0-alpha | 0.24.0-beta | 1.6.0 | 1.8.1 | 0.25.1
347-
0.23.1-alpha | 0.23.1-beta | 1.5.1 | 1.8.1 | 0.25.1
348-
0.23.0-alpha | 0.23.0-beta | 1.5.0 | 1.5.0 | 0.22.0
349-
0.22.0-alpha | 0.22.0-beta | 1.4.0 | 1.5.0 | 0.22.0
350-
0.21.1-alpha | 0.21.1-beta | 1.3.1 | 1.5.0 | 0.22.0
351-
0.21.0-alpha | 0.21.0-beta | 1.3.0 | 1.5.0 | 0.22.0
352-
0.20.3-alpha | 0.20.3-beta | 1.2.3 | 1.4.2 | 0.21.2
353-
0.20.2-alpha | 0.20.2-beta | 1.2.2 | 1.4.2 | 0.21.2
354-
0.20.1-alpha | 0.20.1-beta | 1.2.1 | 1.4.1 | 0.21.1
355-
0.20.0-alpha | 0.20.0-beta | 1.2.0 | 1.3.1 | 0.20.0
356-
0.19.0-alpha | 0.19.0-beta | 1.1.0 | 1.3.0 | 0.19.0
357-
0.18.0-alpha | 0.18.0-beta | 1.0.2 | 1.1.0 | 0.17.0
358-
0.17.2-alpha | 0.17.2-beta | 1.0.1 | 1.0.0 | 0.16.0
359-
0.17.1-alpha | 0.17.1-beta | 1.0.0 | 1.0.0 | 0.16.0
360-
0.17.0-alpha | 0.17.0-beta | 1.0.0-rc4 | 1.0.0-rc1 | 0.15.0
361-
362323
Contributing
363324
------------
364325

google-api-grpc/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@
813813
<plugin>
814814
<groupId>org.apache.maven.plugins</groupId>
815815
<artifactId>maven-javadoc-plugin</artifactId>
816-
<version>2.10.3</version>
816+
<version>3.0.1</version>
817817
<reportSets>
818818
<reportSet>
819819
<id>html</id>
@@ -927,7 +927,7 @@
927927
<plugin>
928928
<groupId>org.apache.maven.plugins</groupId>
929929
<artifactId>maven-javadoc-plugin</artifactId>
930-
<version>2.10.3</version>
930+
<version>3.0.1</version>
931931
<executions>
932932
<execution>
933933
<id>attach-javadocs</id>

google-cloud-bom/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,6 @@
339339
<artifactId>google-cloud-core</artifactId>
340340
<version>1.54.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-core:current} -->
341341
</dependency>
342-
<dependency>
343-
<groupId>com.google.cloud</groupId>
344-
<artifactId>google-cloud-core</artifactId>
345-
<version>1.54.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-core:current} -->
346-
<type>test-jar</type>
347-
</dependency>
348342
<dependency>
349343
<groupId>com.google.cloud</groupId>
350344
<artifactId>google-cloud-core-grpc</artifactId>

google-cloud-clients/google-cloud-asset/pom.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@
4242
<groupId>io.grpc</groupId>
4343
<artifactId>grpc-auth</artifactId>
4444
</dependency>
45-
<dependency>
46-
<groupId>${project.groupId}</groupId>
47-
<artifactId>google-cloud-core</artifactId>
48-
<type>test-jar</type>
49-
<scope>test</scope>
50-
</dependency>
45+
46+
<!-- Test dependencies -->
5147
<dependency>
5248
<groupId>junit</groupId>
5349
<artifactId>junit</artifactId>
@@ -58,6 +54,7 @@
5854
<artifactId>grpc-google-cloud-asset-v1beta1</artifactId>
5955
<scope>test</scope>
6056
</dependency>
57+
<!-- Need testing utility classes for generated gRPC clients tests -->
6158
<dependency>
6259
<groupId>com.google.api</groupId>
6360
<artifactId>gax-grpc</artifactId>

google-cloud-clients/google-cloud-automl/pom.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@
4242
<groupId>io.grpc</groupId>
4343
<artifactId>grpc-auth</artifactId>
4444
</dependency>
45-
<dependency>
46-
<groupId>${project.groupId}</groupId>
47-
<artifactId>google-cloud-core</artifactId>
48-
<type>test-jar</type>
49-
<scope>test</scope>
50-
</dependency>
45+
46+
<!-- Test dependencies -->
5147
<dependency>
5248
<groupId>junit</groupId>
5349
<artifactId>junit</artifactId>
@@ -58,6 +54,7 @@
5854
<artifactId>grpc-google-cloud-automl-v1beta1</artifactId>
5955
<scope>test</scope>
6056
</dependency>
57+
<!-- Need testing utility classes for generated gRPC clients tests -->
6158
<dependency>
6259
<groupId>com.google.api</groupId>
6360
<artifactId>gax-grpc</artifactId>

google-cloud-clients/google-cloud-bigquery/pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@
4040
<groupId>com.google.apis</groupId>
4141
<artifactId>google-api-services-bigquery</artifactId>
4242
<scope>compile</scope>
43-
<exclusions>
44-
<exclusion>
45-
<groupId>com.google.guava</groupId>
46-
<artifactId>guava-jdk5</artifactId>
47-
</exclusion>
48-
</exclusions>
4943
</dependency>
44+
45+
<!-- Test dependencies -->
5046
<dependency>
5147
<groupId>${project.groupId}</groupId>
5248
<artifactId>google-cloud-core</artifactId>

google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
import com.google.common.base.Function;
4242
import com.google.common.base.Strings;
4343
import com.google.common.base.Supplier;
44+
import com.google.common.collect.FluentIterable;
4445
import com.google.common.collect.ImmutableList;
4546
import com.google.common.collect.Iterables;
46-
import com.google.common.collect.Lists;
4747
import com.google.common.collect.Maps;
4848
import java.util.List;
4949
import java.util.Map;
@@ -548,17 +548,18 @@ public InsertAllResponse insertAll(InsertAllRequest request) {
548548
// an anonymous inner class.
549549
final boolean[] allInsertIdsSet = {true};
550550
List<Rows> rowsPb =
551-
Lists.transform(
552-
request.getRows(),
553-
new Function<RowToInsert, Rows>() {
554-
@Override
555-
public Rows apply(RowToInsert rowToInsert) {
556-
allInsertIdsSet[0] &= rowToInsert.getId() != null;
557-
return new Rows()
558-
.setInsertId(rowToInsert.getId())
559-
.setJson(rowToInsert.getContent());
560-
}
561-
});
551+
FluentIterable.from(request.getRows())
552+
.transform(
553+
new Function<RowToInsert, Rows>() {
554+
@Override
555+
public Rows apply(RowToInsert rowToInsert) {
556+
allInsertIdsSet[0] &= rowToInsert.getId() != null;
557+
return new Rows()
558+
.setInsertId(rowToInsert.getId())
559+
.setJson(rowToInsert.getContent());
560+
}
561+
})
562+
.toList();
562563
requestPb.setRows(rowsPb);
563564

564565
TableDataInsertAllResponse responsePb;

google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.google.api.services.bigquery.model.JobConfigurationTableCopy;
2222
import com.google.common.base.Function;
2323
import com.google.common.base.MoreObjects.ToStringHelper;
24+
import com.google.common.base.Strings;
2425
import com.google.common.collect.ImmutableList;
2526
import com.google.common.collect.Lists;
2627
import java.util.List;
@@ -216,10 +217,15 @@ CopyJobConfiguration setProjectId(final String projectId) {
216217
new Function<TableId, TableId>() {
217218
@Override
218219
public TableId apply(TableId tableId) {
219-
return tableId.setProjectId(projectId);
220+
if (Strings.isNullOrEmpty(tableId.getProject())) {
221+
return tableId.setProjectId(projectId);
222+
}
223+
return tableId;
220224
}
221225
}));
222-
builder.setDestinationTable(getDestinationTable().setProjectId(projectId));
226+
if (Strings.isNullOrEmpty(getDestinationTable().getProject())) {
227+
builder.setDestinationTable(getDestinationTable().setProjectId(projectId));
228+
}
223229
return builder.build();
224230
}
225231

google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ExtractJobConfiguration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import com.google.api.services.bigquery.model.JobConfigurationExtract;
2222
import com.google.common.base.MoreObjects.ToStringHelper;
23+
import com.google.common.base.Strings;
2324
import com.google.common.collect.ImmutableList;
2425
import java.util.List;
2526
import java.util.Objects;
@@ -215,7 +216,10 @@ public int hashCode() {
215216

216217
@Override
217218
ExtractJobConfiguration setProjectId(String projectId) {
218-
return toBuilder().setSourceTable(getSourceTable().setProjectId(projectId)).build();
219+
if (Strings.isNullOrEmpty(getSourceTable().getProject())) {
220+
return toBuilder().setSourceTable(getSourceTable().setProjectId(projectId)).build();
221+
}
222+
return this;
219223
}
220224

221225
@Override

0 commit comments

Comments
 (0)