Skip to content

Commit e1c3a57

Browse files
authored
---
yaml --- r: 9371 b: refs/heads/spanner-gapic-migration c: 3dc830e h: refs/heads/master i: 9369: 1664809 9367: 0db072b
1 parent 3e51020 commit e1c3a57

129 files changed

Lines changed: 2448 additions & 687 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.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ refs/tags/v0.34.0: bf31760a31a66acb239322a70dcd03dbe1d0c7ca
8080
refs/tags/v0.35.0: c28951c5f4cc97a1be07900d19df6984115a4bd6
8181
refs/tags/v0.36.0: 6b75c61f73e6827b3ca379bd54f88f750290162f
8282
refs/tags/v0.37.0: db2e142f92601709fdd48db159776f905742e30f
83-
refs/heads/spanner-gapic-migration: c8597ab06e4f204fff3974c2b8edae7e603cae1b
83+
refs/heads/spanner-gapic-migration: 3dc830ea7d536c808eed3cdea8ea77c59f725719
8484
refs/tags/v0.38.0: c235ee4df5e1248e1769dae3f86a0d7ab7fd8301
8585
refs/tags/v0.39.0: ab231c9d22475242a43d6d9554aa4a3f736dab01
8686
refs/tags/v0.40.0: a1d5b05206cce7734365f1b910396a2c9d6605ec

branches/spanner-gapic-migration/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ If you are using Maven, add this to your pom.xml file
5959
<dependency>
6060
<groupId>com.google.cloud</groupId>
6161
<artifactId>google-cloud</artifactId>
62-
<version>0.42.0-alpha</version>
62+
<version>0.43.0-alpha</version>
6363
</dependency>
6464
```
6565
If you are using Gradle, add this to your dependencies
6666
```Groovy
67-
compile 'com.google.cloud:google-cloud:0.42.0-alpha'
67+
compile 'com.google.cloud:google-cloud:0.43.0-alpha'
6868
```
6969
If you are using SBT, add this to your dependencies
7070
```Scala
71-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.42.0-alpha"
71+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.43.0-alpha"
7272
```
7373
[//]: # ({x-version-update-end})
7474

@@ -292,7 +292,7 @@ The easiest way to solve version conflicts is to use google-cloud's BOM. In Mave
292292
<dependency>
293293
<groupId>com.google.cloud</groupId>
294294
<artifactId>google-cloud-bom</artifactId>
295-
<version>0.42.0-alpha</version>
295+
<version>0.43.0-alpha</version>
296296
<type>pom</type>
297297
<scope>import</scope>
298298
</dependency>

branches/spanner-gapic-migration/RELEASING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,9 @@ Go to the [releases page](https://github.com/GoogleCloudPlatform/google-cloud-ja
109109

110110
Ensure that the format is consistent with previous releases (for an example, see the [0.1.0 release](https://github.com/GoogleCloudPlatform/google-cloud-java/releases/tag/v0.1.0)). After adding any missing updates and reformatting as necessary, publish the draft.
111111

112-
11. Create a new draft for the next release. Note any commits not included in the release that have been submitted before the release commit, to ensure they are documented in the next release.
112+
11. Run `python utilities/bump_versions.py next_snapshot patch` to include "-SNAPSHOT" in the current project version (Alternatively, update the versions in `versions.txt` to the correct versions for the next release.). Then, run `python utilities/replace_versions.py` to update the `pom.xml` files. (If you see updates in `README.md` files at this step, you probably did something wrong.)
113113

114-
12. Run `python utilities/bump_versions.py next_snapshot patch` to include "-SNAPSHOT" in the current project version (Alternatively, update the versions in `versions.txt` to the correct versions for the next release.). Then, run `python utilities/replace_versions.py` to update the `pom.xml` files. (If you see updates in `README.md` files at this step, you probably did something wrong.)
115-
116-
13. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/google-cloud-java/pull/227).
114+
13. Create and merge in another PR to reflect the updated project version.
117115

118116
Improvements
119117
============

branches/spanner-gapic-migration/google-cloud-bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ If you are using Maven, add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>google-cloud-bigquery</artifactId>
23-
<version>1.24.0</version>
23+
<version>1.25.0</version>
2424
</dependency>
2525
```
2626
If you are using Gradle, add this to your dependencies
2727
```Groovy
28-
compile 'com.google.cloud:google-cloud-bigquery:1.24.0'
28+
compile 'com.google.cloud:google-cloud-bigquery:1.25.0'
2929
```
3030
If you are using SBT, add this to your dependencies
3131
```Scala
32-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.24.0"
32+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.25.0"
3333
```
3434
[//]: # ({x-version-update-end})
3535

branches/spanner-gapic-migration/google-cloud-bigquery/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-bigquery</artifactId>
5-
<version>1.24.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery:current} -->
5+
<version>1.25.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud BigQuery</name>
88
<url>https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigquery</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.42.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
15+
<version>0.43.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

branches/spanner-gapic-migration/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/JobId.java

Lines changed: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,89 +19,106 @@
1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

2121
import com.google.api.services.bigquery.model.JobReference;
22-
22+
import com.google.auto.value.AutoValue;
2323
import java.io.Serializable;
24-
import java.util.Objects;
2524
import java.util.UUID;
25+
import javax.annotation.Nullable;
2626

27-
/**
28-
* Google BigQuery Job identity.
29-
*/
30-
public final class JobId implements Serializable {
31-
32-
private static final long serialVersionUID = 1225914835379688976L;
27+
/** Google BigQuery Job identity. */
28+
@AutoValue
29+
public abstract class JobId implements Serializable {
3330

34-
private final String project;
35-
private final String job;
31+
private static final long serialVersionUID = 1225914835379688977L;
3632

33+
JobId() {
34+
// Users cannot extend this, but AutoValue can.
35+
}
3736

3837
/**
39-
* Returns project's user-defined id.
38+
* Returns job's project id.
39+
*
40+
* <p>When sending requests with null project, the client will attempt to infer the project name
41+
* from the environment.
4042
*/
41-
public String getProject() {
42-
return project;
43-
}
43+
@Nullable
44+
public abstract String getProject();
4445

46+
/**
47+
* Returns the job's id.
48+
*
49+
* <p>The server returns null job id for dry-run queries.
50+
*/
51+
@Nullable
52+
public abstract String getJob();
4553

4654
/**
47-
* Returns the job's user-defined id.
55+
* Returns the job's location.
56+
*
57+
* <p>When sending requests, the location must be specified for jobs whose location not "US" or
58+
* "EU".
4859
*/
49-
public String getJob() {
50-
return job;
60+
@Nullable
61+
abstract String getLocation();
62+
63+
public abstract Builder toBuilder();
64+
65+
public static Builder newBuilder() {
66+
return new AutoValue_JobId.Builder();
5167
}
5268

53-
private JobId(String project, String job) {
54-
this.project = project;
55-
this.job = job;
69+
@AutoValue.Builder
70+
public abstract static class Builder {
71+
public abstract Builder setProject(String project);
72+
73+
public abstract Builder setJob(String job);
74+
75+
/** {@code setJob} to a pseudo-random string. */
76+
public Builder setRandomJob() {
77+
return setJob(UUID.randomUUID().toString());
78+
}
79+
80+
abstract Builder setLocation(String location);
81+
82+
public abstract JobId build();
5683
}
5784

5885
/**
5986
* Creates a job identity given project's and job's user-defined id.
6087
*/
6188
public static JobId of(String project, String job) {
62-
return new JobId(checkNotNull(project), checkNotNull(job));
89+
return newBuilder().setProject(checkNotNull(project)).setJob(checkNotNull(job)).build();
6390
}
6491

6592
/**
6693
* Creates a job identity given only its user-defined id.
6794
*/
6895
public static JobId of(String job) {
69-
return new JobId(null, checkNotNull(job));
96+
return newBuilder().setJob(checkNotNull(job)).build();
7097
}
7198

7299
/**
73100
* Creates a job identity with autogenerated id and no project specified.
74101
*/
75102
public static JobId of() {
76-
return new JobId(null, UUID.randomUUID().toString());
77-
}
78-
79-
@Override
80-
public boolean equals(Object obj) {
81-
return obj == this
82-
|| obj instanceof JobId
83-
&& Objects.equals(toPb(), ((JobId) obj).toPb());
84-
}
85-
86-
@Override
87-
public int hashCode() {
88-
return Objects.hash(project, job);
89-
}
90-
91-
@Override
92-
public String toString() {
93-
return toPb().toString();
103+
return newBuilder().setRandomJob().build();
94104
}
95105

96106
JobId setProjectId(String projectId) {
97-
return getProject() != null ? this : JobId.of(projectId, getJob());
107+
return getProject() != null ? this : toBuilder().setProject(projectId).build();
98108
}
99109

100110
JobReference toPb() {
101-
return new JobReference().setProjectId(project).setJobId(job);
111+
return new JobReference()
112+
.setProjectId(getProject())
113+
.setJobId(getJob())
114+
.setLocation(getLocation());
102115
}
103116

104117
static JobId fromPb(JobReference jobRef) {
105-
return new JobId(jobRef.getProjectId(), jobRef.getJobId());
118+
return newBuilder()
119+
.setProject(jobRef.getProjectId())
120+
.setJob(jobRef.getJobId())
121+
.setLocation(jobRef.getLocation())
122+
.build();
106123
}
107124
}

branches/spanner-gapic-migration/google-cloud-bigquerydatatransfer/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ Add this to your pom.xml file
2525
<dependency>
2626
<groupId>com.google.cloud</groupId>
2727
<artifactId>google-cloud-bigquerydatatransfer</artifactId>
28-
<version>0.42.0-beta</version>
28+
<version>0.43.0-beta</version>
2929
</dependency>
3030
```
3131
If you are using Gradle, add this to your dependencies
3232
```Groovy
33-
compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.42.0-beta'
33+
compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.43.0-beta'
3434
```
3535
If you are using SBT, add this to your dependencies
3636
```Scala
37-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "0.42.0-beta"
37+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "0.43.0-beta"
3838
```
3939
[//]: # ({x-version-update-end})
4040

branches/spanner-gapic-migration/google-cloud-bigquerydatatransfer/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>google-cloud-bigquerydatatransfer</artifactId>
5-
<version>0.42.1-beta-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquerydatatransfer:current} -->
5+
<version>0.43.1-beta-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquerydatatransfer:current} -->
66
<packaging>jar</packaging>
77
<name>Google Cloud Bigquery Data Transfer</name>
88
<url>https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigquerydatatransfer</url>
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.42.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
15+
<version>0.43.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquerydatatransfer</site.installationModule>

branches/spanner-gapic-migration/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSmokeTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@
2020
import com.google.common.base.Preconditions;
2121
import java.util.logging.Level;
2222
import java.util.logging.Logger;
23+
import org.junit.Test;
2324

2425
@javax.annotation.Generated("by GAPIC")
2526
public class DataTransferServiceSmokeTest {
2627
private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
2728
private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
2829

30+
@Test
31+
public void run() {
32+
main(null);
33+
}
34+
2935
public static void main(String args[]) {
3036
Logger.getLogger("").setLevel(Level.WARNING);
3137
try {

branches/spanner-gapic-migration/google-cloud-bigtable/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ If you are using Maven, add this to your pom.xml file
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>google-cloud-bigtable</artifactId>
26-
<version>0.42.0-alpha</version>
26+
<version>0.43.0-alpha</version>
2727
</dependency>
2828
```
2929
If you are using Gradle, add this to your dependencies
3030
```Groovy
31-
compile 'com.google.cloud:google-cloud-bigtable:0.42.0-alpha'
31+
compile 'com.google.cloud:google-cloud-bigtable:0.43.0-alpha'
3232
```
3333
If you are using SBT, add this to your dependencies
3434
```Scala
35-
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.42.0-alpha"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.43.0-alpha"
3636
```
3737
[//]: # ({x-version-update-end})
3838

0 commit comments

Comments
 (0)