Skip to content

Commit 1664809

Browse files
---
yaml --- r: 9369 b: refs/heads/spanner-gapic-migration c: c6c0e57 h: refs/heads/master i: 9367: 0db072b
1 parent c488d93 commit 1664809

159 files changed

Lines changed: 1056 additions & 3207 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: 02f0bc79c1255e1bb4188f97f9865d373014ce32
83+
refs/heads/spanner-gapic-migration: c6c0e57e6782eb47ae41ee5486d7e47ff6934778
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.43.0-alpha</version>
62+
<version>0.42.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.43.0-alpha'
67+
compile 'com.google.cloud:google-cloud:0.42.0-alpha'
6868
```
6969
If you are using SBT, add this to your dependencies
7070
```Scala
71-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.43.0-alpha"
71+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.42.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.43.0-alpha</version>
295+
<version>0.42.0-alpha</version>
296296
<type>pom</type>
297297
<scope>import</scope>
298298
</dependency>

branches/spanner-gapic-migration/RELEASING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,11 @@ 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. 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.)
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.
113113

114-
13. Create and merge in another PR to reflect the updated project version.
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).
115117

116118
Improvements
117119
============

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.25.0</version>
23+
<version>1.24.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.25.0'
28+
compile 'com.google.cloud:google-cloud-bigquery:1.24.0'
2929
```
3030
If you are using SBT, add this to your dependencies
3131
```Scala
32-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.25.0"
32+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.24.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.25.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery:current} -->
5+
<version>1.24.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.43.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
15+
<version>0.42.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: 43 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -19,106 +19,89 @@
1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

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

27-
/** Google BigQuery Job identity. */
28-
@AutoValue
29-
public abstract class JobId implements Serializable {
27+
/**
28+
* Google BigQuery Job identity.
29+
*/
30+
public final class JobId implements Serializable {
3031

31-
private static final long serialVersionUID = 1225914835379688977L;
32+
private static final long serialVersionUID = 1225914835379688976L;
3233

33-
JobId() {
34-
// Users cannot extend this, but AutoValue can.
35-
}
34+
private final String project;
35+
private final String job;
3636

37-
/**
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.
42-
*/
43-
@Nullable
44-
public abstract String getProject();
4537

4638
/**
47-
* Returns the job's id.
48-
*
49-
* <p>The server returns null job id for dry-run queries.
39+
* Returns project's user-defined id.
5040
*/
51-
@Nullable
52-
public abstract String getJob();
41+
public String getProject() {
42+
return project;
43+
}
44+
5345

5446
/**
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".
47+
* Returns the job's user-defined id.
5948
*/
60-
@Nullable
61-
abstract String getLocation();
62-
63-
public abstract Builder toBuilder();
64-
65-
public static Builder newBuilder() {
66-
return new AutoValue_JobId.Builder();
49+
public String getJob() {
50+
return job;
6751
}
6852

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();
53+
private JobId(String project, String job) {
54+
this.project = project;
55+
this.job = job;
8356
}
8457

8558
/**
8659
* Creates a job identity given project's and job's user-defined id.
8760
*/
8861
public static JobId of(String project, String job) {
89-
return newBuilder().setProject(checkNotNull(project)).setJob(checkNotNull(job)).build();
62+
return new JobId(checkNotNull(project), checkNotNull(job));
9063
}
9164

9265
/**
9366
* Creates a job identity given only its user-defined id.
9467
*/
9568
public static JobId of(String job) {
96-
return newBuilder().setJob(checkNotNull(job)).build();
69+
return new JobId(null, checkNotNull(job));
9770
}
9871

9972
/**
10073
* Creates a job identity with autogenerated id and no project specified.
10174
*/
10275
public static JobId of() {
103-
return newBuilder().setRandomJob().build();
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();
10494
}
10595

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

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

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

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.43.0-beta</version>
28+
<version>0.42.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.43.0-beta'
33+
compile 'com.google.cloud:google-cloud-bigquerydatatransfer:0.42.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.43.0-beta"
37+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "0.42.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.43.1-beta-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquerydatatransfer:current} -->
5+
<version>0.42.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.43.1-alpha-SNAPSHOT</version><!-- {x-version-update:google-cloud-pom:current} -->
15+
<version>0.42.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: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,12 @@
2020
import com.google.common.base.Preconditions;
2121
import java.util.logging.Level;
2222
import java.util.logging.Logger;
23-
import org.junit.Test;
2423

2524
@javax.annotation.Generated("by GAPIC")
2625
public class DataTransferServiceSmokeTest {
2726
private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
2827
private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
2928

30-
@Test
31-
public void run() {
32-
main(null);
33-
}
34-
3529
public static void main(String args[]) {
3630
Logger.getLogger("").setLevel(Level.WARNING);
3731
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.43.0-alpha</version>
26+
<version>0.42.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.43.0-alpha'
31+
compile 'com.google.cloud:google-cloud-bigtable:0.42.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.43.0-alpha"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "0.42.0-alpha"
3636
```
3737
[//]: # ({x-version-update-end})
3838

0 commit comments

Comments
 (0)