Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/java-storage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.103.0
Choose a base ref
...
head repository: googleapis/java-storage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.103.1
Choose a head ref
  • 15 commits
  • 17 files changed
  • 6 contributors

Commits on Jan 7, 2020

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    fd64695 View commit details
  2. chore: release 1.103.1-SNAPSHOT (#34)

    * updated versions.txt [ci skip]
    
    * updated google-cloud-storage/pom.xml [ci skip]
    
    * updated pom.xml [ci skip]
    release-please[bot] authored and chingor13 committed Jan 7, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    f2bc608 View commit details
  3. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    17ba0cb View commit details

Commits on Jan 13, 2020

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    4c0f03a View commit details

Commits on Jan 14, 2020

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    d467d96 View commit details

Commits on Jan 15, 2020

  1. fix deprecations and other warnings (#66)

    * fix deprecations and other warnings
    elharo authored Jan 15, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2e46ab3 View commit details
  2. Update BOM to 3.2.0 (#63)

    @kolea2 deliberately staying off 3.3.0 until a bug is fixed here
    elharo authored Jan 15, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    180ee5e View commit details
  3. Copy the full SHA
    3cedc8f View commit details

Commits on Jan 16, 2020

  1. Copy the full SHA
    7fb1f6c View commit details

Commits on Jan 17, 2020

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    ba41749 View commit details

Commits on Jan 22, 2020

  1. Copy the full SHA
    164654a View commit details
  2. Copy the full SHA
    c1fd39c View commit details
  3. update guava and GAX (#71)

    elharo authored Jan 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b93106b View commit details

Commits on Jan 27, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f8e4a19 View commit details
  2. chore: release 1.103.1 (#81)

    * updated CHANGELOG.md [ci skip]
    
    * updated README.md [ci skip]
    
    * updated versions.txt [ci skip]
    
    * updated google-cloud-storage/pom.xml [ci skip]
    
    * updated pom.xml [ci skip]
    release-please[bot] authored and JesseLovelace committed Jan 27, 2020
    Copy the full SHA
    4ab4af7 View commit details
15 changes: 14 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -44,13 +44,26 @@ test)
bash .kokoro/coerce_logs.sh
;;
lint)
mvn com.coveo:fmt-maven-plugin:check
mvn \
-Penable-samples \
com.coveo:fmt-maven-plugin:check
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} \
-Penable-integration-tests \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-fae \
verify
bash .kokoro/coerce_logs.sh
;;
samples)
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
31 changes: 31 additions & 0 deletions .kokoro/continuous/samples.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "samples"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
}
31 changes: 31 additions & 0 deletions .kokoro/nightly/samples.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "samples"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
}
31 changes: 31 additions & 0 deletions .kokoro/presubmit/samples.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "JOB_TYPE"
value: "samples"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

### [1.103.1](https://www.github.com/googleapis/java-storage/compare/v1.103.0...v1.103.1) (2020-01-27)


### Bug Fixes

* make the getStorageClass() method public ([#22](https://www.github.com/googleapis/java-storage/issues/22)) ([7fb1f6c](https://www.github.com/googleapis/java-storage/commit/7fb1f6c2cb8c5d6ebbf9dcaccf1218d2a0aebb09))


### Dependencies

* update dependency com.google.truth:truth to v1.0.1 ([#60](https://www.github.com/googleapis/java-storage/issues/60)) ([3cedc8f](https://www.github.com/googleapis/java-storage/commit/3cedc8f7fcac0d87ca121197895fc7b36fc8f6d7))
* update dependency org.threeten:threetenbp to v1.4.1 ([4c0f03a](https://www.github.com/googleapis/java-storage/commit/4c0f03a3cc22eed03f002bedf11b3a40e57c709e))

## [1.103.0](https://www.github.com/googleapis/java-storage/compare/1.102.0...v1.103.0) (2020-01-06)


104 changes: 103 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -25,4 +25,106 @@ information on using pull requests.
## Community Guidelines

This project follows
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).

## Building the project

To build, package, and run all unit tests run the command

```
mvn clean verify
```

### Running Integration tests

To include integration tests when building the project, you need access to
a GCP Project with a valid service account.

For instructions on how to generate a service account and corresponding
credentials JSON see: [Creating a Service Account][1].

Then run the following to build, package, run all unit tests and run all
integration tests.

```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json
mvn -Penable-integration-tests clean verify
```

## Code Samples

Code Samples must be bundled in separate Maven modules, and guarded by a
Maven profile with the name `enable-samples`.

The samples must be separate from the primary project for a few reasons:
1. Primary projects have a minimum Java version of Java 7 whereas samples have
a minimum Java version of Java 8. Due to this we need the ability to
selectively exclude samples from a build run.
2. Many code samples depend on external GCP services and need
credentials to access the service.
3. Code samples are not released as Maven artifacts and must be excluded from
release builds.

### Building

```bash
mvn -Penable-samples clean verify
```

Some samples require access to GCP services and require a service account:

```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json
mvn -Penable-samples clean verify
```

### Profile Config

1. To add samples in a profile to your Maven project, add the following to your
`pom.xml`

```xml
<project>
[...]
<profiles>
<profile>
<id>enable-samples</id>
<modules>
<module>sample</module>
</modules>
</profile>
</profiles>
[...]
</project>
```

2. [Activate](#profile-activation) the profile.
3. Define your samples in a normal Maven project in the `samples/` directory

### Profile Activation

To include code samples when building and testing the project, enable the
`enable-samples` Maven profile.

#### Command line

To activate the Maven profile on the command line add `-Penable-samples` to your
Maven command.

#### Maven `settings.xml`

To activate the Maven profile in your `~/.m2/settings.xml` add an entry of
`enable-samples` following the instructions in [Active Profiles][2].

This method has the benefit of applying to all projects you build (and is
respected by IntelliJ IDEA) and is recommended if you are going to be
contributing samples to several projects.

#### IntelliJ IDEA

To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in
[Activate Maven profiles][3] to activate `enable-samples`.

[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account
[2]: https://maven.apache.org/settings.html#Active_Profiles
[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ If you are using Maven with Bom, Add this to your pom.xml file.
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>3.0.0</version>
<version>3.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -37,16 +37,16 @@ If you are using Maven without Bom, Add this to your dependencies.
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.103.0</version>
<version>1.103.1</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-storage:1.103.0'
compile 'com.google.cloud:google-cloud-storage:1.103.1'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.103.0"
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "1.103.1"
```
[//]: # ({x-version-update-end})

22 changes: 10 additions & 12 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<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">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-storage</artifactId>
<version>1.103.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>1.103.1</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>jar</packaging>
<name>Google Cloud Storage</name>
<url>https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage</url>
@@ -12,13 +12,21 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>1.103.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>1.103.1</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-storage</site.installationModule>
<hamcrest.version>2.2</hamcrest.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-storage</artifactId>
@@ -71,14 +79,6 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
@@ -137,7 +137,6 @@
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-iam-v1</artifactId>
<version>0.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -169,7 +168,6 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.10</version>
<scope>test</scope>
</dependency>
</dependencies>
Original file line number Diff line number Diff line change
@@ -663,7 +663,7 @@ public String toString() {
.toString();
}

StorageClass getStorageClass() {
public StorageClass getStorageClass() {
return storageClass;
}
}
Original file line number Diff line number Diff line change
@@ -24,9 +24,7 @@
import com.google.cloud.storage.Storage.BlobSourceOption;
import com.google.cloud.storage.Storage.BlobTargetOption;
import com.google.common.collect.ImmutableList;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class CopyRequestTest {

@@ -40,8 +38,6 @@ public class CopyRequestTest {
private static final BlobInfo TARGET_BLOB_INFO =
BlobInfo.newBuilder(TARGET_BLOB_ID).setContentType(TARGET_BLOB_CONTENT_TYPE).build();

@Rule public ExpectedException thrown = ExpectedException.none();

@Test
public void testCopyRequest() {
Storage.CopyRequest copyRequest1 =
Loading